-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Add document-oriented completion suggester #14410
Conversation
contexts = fieldType.getContextMappings().getNamedContexts(suggestDoc.getContexts()); | ||
} | ||
// collect payloads | ||
Map<String, List<Object>> payload = Collections.emptyMap(); |
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.
can we just initialize this with new HashMap<>()
and make it final?
LGTM, thanks @areek! Nice to see we can now remove two forked Lucene classes, the custom postings format, and cutover to Lucene's impls instead. |
I left two minor comments on the latest commits, this LGTM too and doesn't need another review. Please go ahead and merge after the comments are fixed |
The completion suggester provides auto-complete/search-as-you-type functionality. This is a navigational feature to guide users to relevant results as they are typing, improving search precision. It is not meant for spell correction or did-you-mean functionality like the term or phrase suggesters. The completions are indexed as a weighted FST (finite state transducer) to provide fast Top N prefix-based searches suitable for serving relevant results as a user types. closes elastic#10746
a644e0a
to
6444194
Compare
Was this prematurely merged? I'm still pretty concerned about removing the payloads ability the users have now without concrete numbers that show the speed is the same. See comments on #10746 |
This was originally merged into 2.2, but has been backed out in #16170 and so is in master only. |
Adds document-oriented completion suggester (see #10746), replacing the previous completion suggester implementation from master.
This PR contains the changes from
feature/completion_suggester_v2
branch (#11740 and #13659). Apart from code simplifications and bug fixes, the only functional change this adds is a collector which collects top N documents instead of top N suggestions. This was needed to ensure suggestion with multiple contexts would count as one suggestion. The change is contained in CompletionSuggester.java.The 2.x branch and 2.1 branch for this feature implements the new completion suggester in a bwc way and allows the old suggester to be used if
created in a previous version.
closes #10746