0

World. I'm new in rais. I have the problem:

After I use class for steamming

 <filter class="solr.HunspellStemFilterFactory" dictionary="ru_RU.dic" affix="ru_RU.aff" ignoreCase="true" />

in "schema.xml"

<fieldType name="text" class="solr.TextField" indexed="true" stored="true" multiValued="true" positionIncrementGap="100">
   <analyzer type="index">
      <tokenizer class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.HunspellStemFilterFactory" dictionary="ru_RU.dic" affix="ru_RU.aff" ignoreCase="true" />
    <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="25" side="front" />
    <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="25" side="back" />
   </analyzer>
   <analyzer type="query">
       <tokenizer class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.HunspellStemFilterFactory" dictionary="ru_RU.dic" affix="ru_RU.aff" ignoreCase="true" /> 
   </analyzer>
</fieldType>

I restart solr-server and then can't reindexing (rake sunspot:reindex). Get this error:

Errno::ECONNREFUSED: Connection refused - {:data=>"<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Ad</query></delete>", :headers=>{"Content-Type"=>"text/xml"}, :method=>:post, :params=>{:wt=>:ruby}, :query=>"wt=ruby", :path=>"update", :uri=>#<URI::HTTP:0xa2a3280 URL:http://localhost:8982/solr/development/update?wt=ruby>, :open_timeout=>nil, :read_timeout=>nil, :retry_503=>nil, :retry_after_limit=>nil}

If I delete hunspell from schema.xml reindexing are completed. ru_RU.dic and ru_RU.aff in utf-8.

Thank you in advance)

Stas
  • 3
  • 5
  • Which command do you use to restart the solr-server? – iMacTia Nov 18 '14 at 10:09
  • Check the solr logs for your container - the server doesn't start after you've added the filter (might be because of file not found, Solr too old, etc.). Ruby is unable to connect to the server because of that. – MatsLindh Nov 18 '14 at 10:11
  • OR the server starts, but on a different port, or with a different configuration... who know. That's why I asked the command used to start the server :) Hoping is one of the two! – iMacTia Nov 18 '14 at 10:27
  • rake sunspot:solr:stop /start – Stas Nov 18 '14 at 14:12

0 Answers0