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
suggest api enhancement #3199
Comments
At this point we already have an extension mechanism for this in place added in #3089 You have access to the searcher or rather to the index reader which is what you want at the end of the day. I am happy to expose the shard and the index as well, can you explain the usecase a bit more? |
Current Suggester.java execute API as fallows: public Suggestion<? extends Entry<? extends Option>> execute(String name, T suggestion, IndexReader indexReader, CharsRef spare) throws IOException; For example, at this point, I need searcher rather than reader. My customer wanted me to build a suggester that supports:
As far as I understand, current phrase suggester does not support AND search. Also, my customer wants to see more words other than what user typed and simple corrections. , I can create totaly a new rest endpoint for my suggester but it would be awesome to plug it into the existing ES architecture. |
you can simply call new IndexSearcher(reader); The seacher is a lightweight wrapper around the reader. |
Thank you Simon.. I didn't know that.. is it possible for you to extend SuggestionContext so that it contains index and shard info as well? |
yeah I think this makes sense! I will do that |
thank you very much.. |
I have't ported this to 0.90 yet since I am waiting for #3089 to get ported... I will revisit this once we are done portin |
Suggesters might need access to the shard they run on as well as the index they operate on. This patch adds indexname and shard ID to the SuggestionContext Closes #3199
backported to |
Suggesters might need access to the shard they run on as well as the index they operate on. This patch adds indexname and shard ID to the SuggestionContext Closes elastic#3199
Hi,
I want to build a custom suggester and plug it into the existing suggest API.
The problem I am facing is that the current suggester extension api dont let me to do my job.
I need to access:
Current API expose parameters only needed by built-in phrase and term suggester :-(
thanks.
.
The text was updated successfully, but these errors were encountered: