First take a look at autosuggest. That does some great stuff if you can build the autocomplete dictionary only periodically, which can be somewhat expensive. See: https://lucidworks.com/2015/03/04/solr-suggester/
There are lighter-weight ways to autosuggest that should be extremely fast, in particular index your stuff backwards in a suggest field as: John Doe - Author and use TermsComponent on that for instance. TermsComponent is pretty literal, i.e. it's case-sensitive but you can send terms.prefix=jo and case things properly on the app side. Best, Erick On Wed, Apr 12, 2017 at 6:33 AM, Rob Audenaerde <rob.audenae...@gmail.com> wrote: > I have a Lucene (6.4.2) index with about 2-5M documents, and each document > has about 10 facets (for example 'author', 'publisher', etc). The facets > might have up to 100.000 different values. > > I have a search bar on top of my application, and would like to implement > autocomplete using the facets. For example, when the user enters 'Jo' I > would like the options to be: > > 'John Doe - Author' > 'Jonatan Driver - Publisher' > 'Joan Deville - Author' > ... > > My facets are structured using the FacetFields and Lucene Taxonomy, like > this: > > 'Author / John Doe' > 'Author / Joan Deville' > ... > > Are there built-in options to create such an autocomplete? Or do I have to > build it myself? > > I prefer not to do a search on all the matching documents and collect > facets for those, because that is not very fast > > Any hints? > > Thanks in advance, > Rob Audenaerde > > See also: > http://stackoverflow.com/questions/43369715/lucene-autocomplete-using-facet-labels --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org