On Wed, Sep 23, 2009 at 11:30 AM, dharhsana <rekha.dharsh...@gmail.com>wrote:
> > Hi Ryan, > > I gone through your post > https://issues.apache.org/jira/browse/SOLR-357 > > where you mention about prefix filter,can you tell me how to use that > patch,and you mentioned to use the code as bellow, > > <fieldType name="prefix_full" class="solr.TextField" > positionIncrementGap="1"> > <analyzer type="index"> > <tokenizer class="solr.KeywordTokenizerFactory"/> > <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> > <analyzer type="query"> > <tokenizer class="solr.WhitespaceTokenizerFactory"/> > <filter class="solr.LowerCaseFilterFactory" /> > </analyzer> > </fieldType> > > ... > <field name="prefix1" type="prefix_full" indexed="true" stored="false"/> > <field name="prefix2" type="prefix_token" indexed="true" stored="false"/> > ... > <copyField source="name" dest="prefix1"/> > <copyField source="name" dest="prefix2"/> > > For using the above code is that you are using EdgeNGramFilterFactory or > PrefixingFilterFactory. > > or the above code works for EdgeNGramFilterFactory,i am not clear about > it,with out using the PrefixingFilterFactory patch, is that i can write the > above code. > > There is no such thing in Solr as a PrefixingFilterFactory. Use EdgeNGramFilterFactory. > > And the next is "name" in copyFiled is "text" type or "string" type > > Name was a field in his schema. Whatever fields' values you want for auto-suggest, copy them over to the field. -- Regards, Shalin Shekhar Mangar.