> > We don't mind the order of terms. We basically are > sorting by two variables > that are independent of relevency. So I would assume > the order doesn't > matter... we just need to make sure any results we filter > down to (as you > saw in the krop.com example) contain the words the user has > typed. >
Lets say you have short title field and you are going to give suggest/autocomplete using this field from index and order is not important. But in this ca <fieldType name="prefix_full" class="solr.TextField" positionIncrementGap="1"> <analyzer type="index"> <tokenizer class="solr.KeywordTokenizerFactory"/> <filter class="solr.TrimFilterFactory"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="20"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.KeywordTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType> <fieldType name="prefix_token" class="solr.TextField" positionIncrementGap="1"> <analyzer type="index"> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="20"/> </analyzer> You can use these two fields, populate them from your short title field <copyField source="Title" dest="titlePrefix"/> <copyField source="Title" dest="titlePrefixFull"/> and use normal query, (not wildcard) as the user types words q=titlePrefix:(term1 te) titlePrefixFull:"term1 te"&defType=lucene&q.op=OR&fl=Title will return you suggestions. Does this satisfy your needs? In this case you are suggesting whole title field. Or do you want to use ShingleFilterFactory with wildcard query?