Thank you for comment) For our task it seems a redundant, because per my understanding AnalyzingInfixSuggester find matches anywhere from query string, for our purpose we need only prefix search. For AnalyzingSuggester it scares me that when new entry is coming or changed you have to rebuild the suggest index every time.
On Wed, May 25, 2022 at 4:16 PM Michael Wechner <michael.wech...@wyona.com> wrote: > we are using AnalyzingInfixSuggester but I would also be curious to > know whether this is the best way :-) > > Thanks > > Michael > > Am 25.05.22 um 14:39 schrieb Anastasiya Tarasenko: > > Hi All, > > > > I have a question regarding auto-complete functionality in Lucene. > > On the StackOverflow the suggestion regarding implementation is > > 1) Use AnalyzingSuggester > > 2) Use PrefixQuery and SpanFirstQuery with the IndexSearcher.search() > > > > What is the differences between them? Do they have big differences in > > performance? > > > > Currently for suggest we are using SuggestIndexSearcher.suggest() method, > > but there is no availability to add scoring by some field (what exactly > we > > need) and I did not found any recommendation on the StackOverflow for > this > > method. > > > > And now the question is what is the better to use 1# or 2# for > > auto-complete. > > Could you advice? > > > > Thank you > > >