Support multiple indecies in TolerantIndexBuilder#2795
Support multiple indecies in TolerantIndexBuilder#2795mamazu wants to merge 5 commits intophpactor:masterfrom
Conversation
|
Can you describe the architecture you envision for this feature? Also beware, as is evident from other PRs, I haven't really got the time or motivation to deep dive into complex topics with Phpactor. |
|
Well my main goal is to reduce the dependency on the index as a constructor argument and move it to the methods that actually need it. Furthermore I'm trying to split up the |
|
So I don't think this is necessarily the way to go, I need to know what this will look like before knowing how to refactor it. |
|
I've dumped some research here: https://github.com/phpactor/phpactor/blob/645e8e8fd167352a96e8184a2554f14601d245da/doc/adr/0004-indexer.md |
|
Looks like a good idea. In the end I was thinking of the same thing. But I wasn't sure where to best place to put the distinction which index to use was. But I think the lower the better. So that the amount of classes having to actually deal with an index is as small as possible. |
The indexer had a constructor argument that is the
Index. This is suboptimal if we want to support multiple indices. So now it's an argument when trying to index a file (or list of files).