lucene - solr rank value mismatch in exact phrase search -


ex : skills :( ( "data warehouse") )^10.0

its returns 40 expacted 10 

my solr version 3.1 , overwrite defaultsimilarity of solr using following link (solr custom similarity)

schema.xml

fieldtype

<fieldtype name="text_rc" class="solr.textfield" positionincrementgap="100" autogeneratephrasequeries="true">   <analyzer type="index">             <tokenizer class="solr.patterntokenizerfactory" pattern="[\s|,]+" />              <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt" enablepositionincrements="true" />     <charfilter class="solr.mappingcharfilterfactory" mapping="char_mapping.txt"/>     <filter class="solr.synonymfilterfactory" synonyms="synonyms.txt" ignorecase="true" expand="true"/>             <filter class="solr.worddelimiterfilterfactory" generatewordparts="1" generatenumberparts="1" catenatewords="1" catenatenumbers="1" catenateall="0" splitoncasechange="0" splitonnumerics="0"/>     <filter class="solr.lowercasefilterfactory"/>     <filter class="solr.keywordmarkerfilterfactory" protected="protwords.txt"/>   </analyzer>   <analyzer type="query">          <tokenizer class="solr.patterntokenizerfactory" pattern="[\s|,]+" />       <filter class="solr.synonymfilterfactory" synonyms="synonyms.txt" ignorecase="true" expand="true"/> <charfilter class="solr.mappingcharfilterfactory" mapping="char_mapping.txt"/>             <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt" enablepositionincrements="true" />     <filter class="solr.worddelimiterfilterfactory" generatewordparts="1" generatenumberparts="1" catenatewords="0" catenatenumbers="0" catenateall="0" splitoncasechange="0" splitonnumerics="0"/>     <filter class="solr.lowercasefilterfactory"/>     <filter class="solr.keywordmarkerfilterfactory" protected="protwords.txt"/>    </analyzer> </fieldtype> 

field

<field name="skills" type="text_rc" indexed="true" stored="false" required="false" multivalued="true" /> 

solr admin page result

<response> <lst name="responseheader">     <int name="status">0</int>     <int name="qtime">37</int>     <lst name="params">         <str name="indent">on</str>         <str name="rows">10</str>         <str name="start">0</str>         <str name="version">2.2</str>         <str name="q">skills :( ( "data warehouse") )^10.0 </str>     </lst> </lst> <result name="response" numfound="1" start="0" maxscore="40.0">     <doc><float name="score">40.0</float>         <str name="empid">1001</str>     </doc> </result> 

my debug query result

localhost:8080/solr/core0/select?skills+:(+(+"data+warehouse"+)+)^10.0)+&debugquery=on

40.0 = (match) sum of:   40.0 = (match) weight(skills:"data warehouse" in 0), product of:     20.0 = queryweight(skills:"data warehouse"), product of:      2.0 = idf(skills: data=6 warehouse=1)      10.0 = querynorm     2.0 = fieldweight(skills:"data warehouse" in 0), product of:      1.0 = tf(phrasefreq=2.0)      2.0 = idf(skills: data=6 warehouse=1)      1.0 = fieldnorm(field=skills, doc=0) 

how solve problem pls guide me.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -