Closed rkarakaya closed 11 years ago
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. I mean, for instance it prompted "word1 word2" but no such document exists in my index that contains both words suggested. May be I am missing something:-)
Also, my customer wants to see more words other than what user typed and simple corrections. , So, I decided to build my own suggester using faceting on a field that contains shingles.
I can create totaly a new rest endpoint for my suggester but it would be awesome to plug it into the existing ES architecture.
For example, at this point, I need searcher rather than reader.
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?
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
backported to 0.90
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. .