solr4 - Solr : stemming in a live cluster (reindexing issues) -
i have live solr cluster stemming not enabled , schema.xml looks this:
.. <field name="searchable_text" type="text_general" indexed="true" stored="true" multivalued="false"/> .. <field name="text" type="text_general" indexed="true" stored="false" multivalued="true"/> .. <copyfield source="searchable_text" dest="text" maxchars="3000"/> .. <fieldtype name="text_general" class="solr.textfield" positionincrementgap="100"> <analyzer type="index"> <tokenizer class="solr.standardtokenizerfactory"/> <filter class="solr.stopfilterfactory" ignorecase="true" words="lang/stopwords_en.txt"/> <filter class="solr.lowercasefilterfactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.standardtokenizerfactory"/> <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt"/> <filter class="solr.synonymfilterfactory" synonyms="synonyms.txt" ignorecase="true" expand="true"/> <filter class="solr.lowercasefilterfactory"/> </analyzer> </fieldtype> .. and these steps took enable stemming on live cluster
changed schema.xml including stemming in index:
<fieldtype name="text_general" class="solr.textfield" positionincrementgap="100"> <analyzer type="index"> <tokenizer class="solr.standardtokenizerfactory"/> <filter class="solr.stopfilterfactory" ignorecase="true" words="lang/stopwords_en.txt"/> <filter class="solr.lowercasefilterfactory"/> <filter class="solr.porterstemfilterfactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.standardtokenizerfactory"/> <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt"/> <filter class="solr.synonymfilterfactory" synonyms="synonyms.txt" ignorecase="true" expand="true"/> <filter class="solr.lowercasefilterfactory"/> </analyzer> </fieldtype> and disabled opensearcher in solrconfig :
<autocommit> <maxtime>${solr.autocommit.maxtime:60000}</maxtime> <opensearcher>false</opensearcher> <!-- set true earlier--> </autocommit> i reindexed entire data. assumption data committed since opensearcher set false, newly indexed data not visible.
after this, changed schema.xml include stemming in query , changed solrconfig.xml set opensearcher true :
<fieldtype name="text_general" class="solr.textfield" positionincrementgap="100"> <analyzer type="index"> <tokenizer class="solr.standardtokenizerfactory"/> <filter class="solr.stopfilterfactory" ignorecase="true" words="lang/stopwords_en.txt"/> <filter class="solr.lowercasefilterfactory"/> <filter class="solr.porterstemfilterfactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.standardtokenizerfactory"/> <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt"/> <filter class="solr.synonymfilterfactory" synonyms="synonyms.txt" ignorecase="true" expand="true"/> <filter class="solr.lowercasefilterfactory"/> <filter class="solr.porterstemfilterfactory"/> </analyzer> </fieldtype> and
<autocommit> <maxtime>${solr.autocommit.maxtime:60000}</maxtime> <opensearcher>true</opensearcher> <!-- set true earlier--> </autocommit> i reloaded core. still dont see queries stemmed. debugquery check doesnt seem show stemming in query. quite weird. there wrong approach ?
i using solr 4.7
thanks
well, there stupid landed doing because of things didn't work. above steps surely worked me, except when reloaded core, did using lb vip , not each individual machine (!) . doing solved problem.
anyways, !
Comments
Post a Comment