lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael <>
Subject Re: Autsuggest/autocomplete/spellcheck phrases
Date Thu, 17 Jun 2010 15:31:20 GMT

I've been experimenting with this myself for a work project. What I
did was use a combination of the two running the indexed terms through
the Shingle factory and then through the edge n-gram filter. I did
this in order to be able to match terms like :

.net asp c#
asp .net c#
c# asp .net
 for a word query like
asp c# .net

The edge ngrams are good, but they can also fail to match on queries
when the words in the index are in a different order than those in the

My setup in schema.xml  looks like this :

    <fieldType name="edgytext" class="solr.TextField"
	<tokenizer class="solr.WhitespaceTokenizerFactory"/>
	<filter class="solr.ShingleFilterFactory" maxShingleSize="2"
	<filter class="solr.LowerCaseFilterFactory"/>
	<filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="25" />

Let me know how this works for you.

On Thu, Jun 17, 2010 at 11:05 AM, Blargy <> wrote:
> How can I preserve phrases for either autosuggest/autocomplete/spellcheck?
> For example we have a bunch of product listings and I want if someone types:
> "louis" for it to common up with "Louis Vuitton". "World" ... "World cup".
> Would I need n-grams? Shingling? Thanks
> --
> View this message in context:
> Sent from the Solr - User mailing list archive at

View raw message