-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support multi-index ES search #57
support multi-index ES search #57
Conversation
@smn @miltontony I'd like your input on this. I'm weighing up the pros and cons of implementing multi-index search vs. using the same index for multiple repos. Multi-index
Single-index, multiple repos
|
How are we going to map the list of workspaces to indexes in the underlying elastig-git |
What if we changed the idea of workspaces to include multiple repositories? ws = EG.workspace(dir1, dir2, dir3) Would we use the same index prefix for all content directories or have separate ones for each and then query multiple indexes with Which, now that I'm reading things again, is what I suppose you're asking too? |
@smn I like upgrading a workspace to have multiple content dirs. I'm slightly inclined towards implementing the same index for all content directories. This approach doesn't break scoring. Is there a good reason to put content dirs in separate indices? @miltontony? |
Are we sure scoring breaks across different indexes? |
No, I'm not sure. I'm basing this on the fact that scoring can be wonky across shards. You can explicitly use a DFS query to fix it, but I can't find mention of similar functionality across indices. It might be because people tend to put different types in different indices. I'm probably going down a rabbit hole though. Ignore and implement separate indices? |
Perhaps we could allow both? Always single indexes, optionally a combined index? |
+1 |
@smn @miltontony feedback on what I've done so far would be much appreciated. So far I've partially converted |
New approach for multi-index search:
Queries return |
@smn @miltontony ready for review. I'm getting a failure locally on repeat test runs because |
@Rizziepit try running that single test with |
@@ -24,25 +35,57 @@ def get_mapping_type_name(cls): | |||
def get_model(self): | |||
return self.model_class | |||
|
|||
def get_object(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should rather raise a NotImplementedError
here instead of removing the function entirely.
Sorry for the questions overload, I'm probably missing some obvious stuff... |
…ub.com:universalcore/elastic-git into feature/issue-57-support-multi-index-ES-search
👍 on the code. |
return obj | ||
|
||
|
||
class SM(S): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smn this could use a re-review. Instead of a single S
class, there is now S
and SM
where SM
is explicitly instantiated with model_class
and in_
. Workspace
still uses S
so that it can specify the read-write mapping type.
👍 from me on the S() -> SM() changes. |
👍 again |
No description provided.