lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manisha_5 <pujari.mani...@gmail.com>
Subject Re: Solr autocompletion in rails
Date Thu, 07 May 2009 14:37:58 GMT

Thanks a lot for the information. But I am still a bit confused about the use
of TermsComponents. Like where are we exactly going to put these codes in
Solr.For example I changed schema.xml to add autocomplete feauture.I read
your blog too, its very helpful.But still a little confused. :-((
Can you explain it a bit?



Matt Weber-2 wrote:
> 
> You will probably want to use the new TermsComponent in Solr 1.4.  See
> http://wiki.apache.org/solr/TermsComponent 
> .  I just recently wrote a blog post about using autocompletion with  
> TermsComponent, a servlet, and jQuery.  You can probably follow these  
> instructions, but instead of writing a servlet you can write a rails  
> handler parsing the json output directly.
> 
> http://www.mattweber.org/2009/05/02/solr-autosuggest-with-termscomponent-and-jquery/

> .
> 
> Thanks,
> 
> Matt Weber
> 
> 
> 
> On May 4, 2009, at 9:39 AM, manisha_5 wrote:
> 
>>
>> 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.
>>
> 
> 
> 

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


Mime
View raw message