Blargy, 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 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 query. My setup in schema.xml looks like this : <fieldType name="edgytext" class="solr.TextField" positionIncrementGap="100"> <analyzer> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.ShingleFilterFactory" maxShingleSize="2" outputUnigrams="true"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="25" /> </analyzer> </fieldType> Let me know how this works for you. On Thu, Jun 17, 2010 at 11:05 AM, Blargy <zman...@hotmail.com> 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: > http://lucene.472066.n3.nabble.com/Autsuggest-autocomplete-spellcheck-phrases-tp902951p902951.html > Sent from the Solr - User mailing list archive at Nabble.com. >