Autocomplete using facet labels?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Autocomplete using facet labels?

Rob Audenaerde
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Autocomplete using facet labels?

Erick Erickson
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
<[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Autocomplete using facet labels?

Rob Audenaerde
Thanks Erick for you reply,

I see you refer to solr sources while I was hoping for lucene suggestions.

I hadn't thought  of the idea of reverse indexing the facet values and will
consider it.

Meanwhile I will try to explore how I might to use the TaxonomyIndex as
well, as this should contain the FacetLabels I'd like to use.

-Rob

On Wed, Apr 12, 2017 at 5:00 PM, Erick Erickson <[hidden email]>
wrote:

> 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
> <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Autocomplete using facet labels?

Erick Erickson
Bah, I continually forget that I'm on the Lucene list, sorry for the confusion.

On Wed, Apr 12, 2017 at 8:10 AM, Rob Audenaerde
<[hidden email]> wrote:

> Thanks Erick for you reply,
>
> I see you refer to solr sources while I was hoping for lucene suggestions.
>
> I hadn't thought  of the idea of reverse indexing the facet values and will
> consider it.
>
> Meanwhile I will try to explore how I might to use the TaxonomyIndex as
> well, as this should contain the FacetLabels I'd like to use.
>
> -Rob
>
> On Wed, Apr 12, 2017 at 5:00 PM, Erick Erickson <[hidden email]>
> wrote:
>
>> 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
>> <[hidden email]> 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: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...