You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by blocky97 <se...@gmail.com> on 2011/04/25 02:47:35 UTC

Suggester with multi terms

Hi, I'm new to Solr and I'm trying to implement an auto complete.

I don't know if what I'm trying to do is possible..I would think so, but
basically I am trying to do something like this:

I Index data on a description such as:
"I love going to concerts, espically foo fighters are a great band.  They
really rock it out"

I want to then be able to do a query that will return me 1, 2 or 3 tokens

i.e in this case a query of 'foo' would return 
foo fighters
food 
football
foot masage

any thoughts on how i would go about doing this?  I was trying to use
KeywordTokenizerFactory and do something along the lines below...but since
it is using phrases, it doesn't exactly work.  

<fieldType name="text_auto" class="solr.TextField" >
 <analyzer>
  <tokenizer class="solr.KeywordTokenizerFactory"/>
	  <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
 </analyzer>
</fieldType> 

Any help would be appreciated.

thanks

--
View this message in context: http://lucene.472066.n3.nabble.com/Suggester-with-multi-terms-tp2859547p2859547.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Suggester with multi terms

Posted by Em <ma...@yahoo.de>.
blocky,

Shingles should be your way.

Regards,
Em

--
View this message in context: http://lucene.472066.n3.nabble.com/Suggester-with-multi-terms-tp2859547p2860419.html
Sent from the Solr - User mailing list archive at Nabble.com.