lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Schlamp <schl...@gmx.de>
Subject Re: Different options for autocomplete/autosuggestion
Date Tue, 15 Mar 2011 03:52:48 GMT
@Robert: That sounds interesting and very flexible, but also like a
lot of work. This approach also doesn't seem to allow querying Solr
directly by using Ajax ... one of the big benefits in my opinion when
using Solr.
@Bill: There are some things I don't like about the Suggester
component. It doesn't seem to allow infix searches (at least it is not
mentioned in the Wiki or elsewhere). It also uses a separate index
that has to be rebuild independently of the main index. And it doesn't
support any filter queries.

The Lucid Imagination blog also describes a further autosuggest
approach (http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/).
The disadvantage here is that the source documents must have distinct
fields (resp. the dih selects must provide distinct data). Otherwise
duplications would come up in the Solr query result, cause of the
document nature of Solr.

In my opinion field collapsing seems to be most promising for a full
featured autosuggestion solution. Unfortunately it is not available
for Solr 1.4.x or 3.x (I tried patching those branches several times
without success).

2011/3/15 Bill Bell <billnbell@gmail.com>:
> http://lucidworks.lucidimagination.com/display/LWEUG/Spell+Checking+and+Aut
> omatic+Completion+of+User+Queries
>
> For Auto-Complete, find the following section in the solrconfig.xml file
> for the collection:
>  <!-- Auto-Complete component -->
>  <searchComponent name="autocomplete" class="solr.SpellCheckComponent">
>    <lst name="spellchecker">
>      <str name="name">autocomplete</str>
>      <str
> name="classname">org.apache.solr.spelling.suggest.Suggester</str>
>      <str
> name="lookupImpl">org.apache.solr.spelling.suggest.jaspell.JaspellLookup</s
> tr>
>      <str name="field">autocomplete</str>
>      <str name="buildOnCommit">true</str>
> <!--
>      <str name="sourceLocation">american-english</str>
> -->
>    </lst>
>
>
>
>
> On 3/14/11 8:16 PM, "Andy" <angelflow@yahoo.com> wrote:
>
>>Can you provide more details? Or a link?
>>
>>--- On Mon, 3/14/11, Bill Bell <billnbell@gmail.com> wrote:
>>
>>> See how Lucid Enterprise does it... A
>>> bit differently.
>>>
>>> On 3/14/11 12:14 AM, "Kai Schlamp" <kai.schlamp@googlemail.com>
>>> wrote:
>>>
>>> >Hi.
>>> >
>>> >There seems to be several options for implementing an
>>> >autocomplete/autosuggestions feature with Solr. I am
>>> trying to
>>> >summarize those possibilities together with their
>>> advantages and
>>> >disadvantages. It would be really nice to read some of
>>> your opinions.
>>> >
>>> >* Using N-Gram filter + text field query
>>> >+ available in stable 1.4.x
>>> >+ results can be boosted
>>> >+ sorted by best matches
>>> >- may return duplicate results
>>> >
>>> >* Facets
>>> >+ available in stable 1.4.x
>>> >+ no duplicate entries
>>> >- sorted by count
>>> >- may need an extra N-Gram field for infix queries
>>> >
>>> >* Terms
>>> >+ available in stable 1.4.x
>>> >+ infix query by using regex in 3.x
>>> >- only prefix query in 1.4.x
>>> >- regexp may be slow (just a guess)
>>> >
>>> >* Suggestions
>>> >? Did not try that yet. Does it allow infix queries?
>>> >
>>> >* Field Collapsing
>>> >+ no duplications
>>> >- only available in 4.x branch
>>> >? Does it work together with highlighting? That would
>>> be a big plus.
>>> >
>>> >What are your experiences regarding
>>> autocomplete/autosuggestion with
>>> >Solr? Any additions, suggestions or corrections? What
>>> do you prefer?
>>> >
>>> >Kai
>>>
>>>
>>>
>>
>>
>>
>
>
>



-- 
Dr. med. Kai Schlamp
Am Fort Elisabeth 17
55131 Mainz
Germany
Phone +49-177-7402778
Email: schlamp@gmx.de

Mime
View raw message