Hi,

I am new to solr. I am using solr server to index the data and make search
in a Ruby on rails project.I want to add autocompletion feature. I tried
with the xml patch in the schema.xml file of solr, but dont know how to test
if the feature is working.also havent been able to integrate the same in the
Rails project that is using Solr.Can anyone please provide some help in this
regards??

the patch of codes in Schema.xml is :

 <fieldType name="autocomplete" class="solr.TextField">
        <analyzer type="index">
            <tokenizer class="solr.NGramTokenizerFactory" minGramSize="3"
maxGramSize="15" /> 
            <filter class="solr.LowerCaseFilterFactory" />
            <filter class="solr.PatternReplaceFilterFactory"
pattern="([^a-z0-9])" replacement="" replace="all" />
            <filter class="solr.EdgeNGramFilterFactory" maxGramSize="100"
minGramSize="1" />
        </analyzer>
        <analyzer type="query">
            <tokenizer class="solr.WhitespaceTokenizerFactory"/>
            <filter class="solr.LowerCaseFilterFactory" />
            <filter class="solr.PatternReplaceFilterFactory"
pattern="([^a-z0-9])" replacement="" replace="all" />
            <filter class="solr.PatternReplaceFilterFactory"
pattern="^(.{20})(.*)?" replacement="$1" replace="all" />
        </analyzer>
   </fieldType>

-- 
View this message in context: 
http://www.nabble.com/Solr-autocompletion-in-rails-tp23372020p23372020.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to