forked from apache/lucene-solr
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Keep SearchGroupsResultTransformer concrete #231
Closed
diegoceccarelli
wants to merge
17
commits into
bloomberg:SOLR-11831
from
diegoceccarelli:SOLR-11831-delegate-transform
Closed
Keep SearchGroupsResultTransformer concrete #231
diegoceccarelli
wants to merge
17
commits into
bloomberg:SOLR-11831
from
diegoceccarelli:SOLR-11831-delegate-transform
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…gas patch) Summary: In cases where we do grouping and ask for {{group.limit=1}} only it is possible to skip the second grouping step. In our test datasets it improved speed by around 40%. Essentially, in the first grouping step each shard returns the top K groups based on the highest scoring document in each group. The top K groups from each shard are merged in the federator and in the second step we ask all the shards to return the top documents from each of the top ranking groups. If we only want to return the highest scoring document per group we can return the top document id in the first step, merge results in the federator to retain the top K groups and then skip the second grouping step entirely.
…ge (apache#229) Code looks good, and I agree that we should not skip the steps, thanks!
* sketch: [SkipSecondStep]SearchGroupShardResponseProcessor with inner [SkipSecondStep]SearchGroupsContainer helper class * sketch: remove/replace SearchGroupsResultTransformer.getInstance * Callers instead directly allocate either DefaultSearchResultResultTransformer or SkipSecondStepSearchResultResultTransformer. * A next step could be the proposed SearchGroupsResultTransformer.SkipSecondStepSearchResultResultTransformer inner class to become a SkipSecondStepSearchResultResultTransformer.java class of its own and the proposed SearchGroupsResultTransformer.DefaultSearchResultResultTransformer inner class to _not_ be created with backcompat considerations in mind e.g. SearchGroupsResultTransformer to not become abstract and its constructor to remain public. This assumes that SearchGroupsResultTransformer would require only simple changes to make it extensible and that then SkipSecondStepSearchResultResultTransformer could extend it.
diegoceccarelli
force-pushed
the
SOLR-11831
branch
from
May 28, 2019 14:42
d717987
to
173c013
Compare
diegoceccarelli
force-pushed
the
SOLR-11831
branch
2 times, most recently
from
August 2, 2019 15:58
dd17b86
to
4c7e5f1
Compare
diegoceccarelli
force-pushed
the
SOLR-11831
branch
from
September 3, 2019 18:50
4c7e5f1
to
2cf6677
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
now
SearchGroupsResultTransformer
is concrete and the different behaviors (normal or skip second step) are achieved by delegating to a private class.