The bf parameter adds the value of a function query to the document store.

Your example did not include a bf parameter.

-- Jack Krupansky

-----Original Message----- From: Ing. Andrea Vettori
Sent: Wednesday, February 26, 2014 12:26 PM
To: solr-user@lucene.apache.org
Subject: Search score problem using bf edismax

Hi, I'm new to Solr and I'm trying to understand why I don't get what I want with the bf parameter.
The query debug information follows.
What I don't understand is why the result of the bf parameter is so low in score compared to matched fields.
Can anyone help ?
Thank you

<?xml version="1.0" encoding="UTF-8"?>
<response>

<lst name="responseHeader">
 <int name="status">0</int>
 <int name="QTime">19</int>
 <lst name="params">
   <str name="debugQuery">true</str>
   <str name="indent">true</str>
   <str name="q">iphone cavo</str>
   <str name="_">1393434305227</str>
   <str name="wt">xml</str>
   <str name="rows">3</str>
 </lst>
</lst>
<result name="response" numFound="26" start="0">
 <doc>
   <long name="id">125520</long>
   <str name="codice">0125562</str>
<str name="descrizione">Carica batterie da auto con cavo riavvolgibile</str>
   <str name="modello">CBR-AR I-Phone 1</str>
   <str name="marchio">Cellular Line</str>
   <str name="categoria">Cellulare - Cavo Accendisigari</str>
   <str name="titolo">Cellular Line CBR-AR I-Phone 1</str>
   <bool name="hafoto">true</bool>
   <bool name="hascheda">true</bool>
   <str name="altro1">IS107445|IP107261|ST300392|IG27586</str>
   <str name="altro2"/>
   <str name="codicerepository">P98720</str>
   <float name="qtaconfezione">1.0</float>
   <long name="puntopartenzadefault">1</long>
   <str name="iva">22</str>
   <str name="ivaingrosso">22</str>
   <float name="ivaperc">0.22</float>
   <float name="ivaingrossoperc">0.22</float>
   <str name="keywords"/>
   <float name="bestprice_162">15.9</float>
   <int name="flag_162">0</int>
   <date name="data_sc_prezzo_162">2050-12-31T00:00:00Z</date>
   <float name="prezzodoposcadenza_162">15.9</float>
   <float name="bestpriceprec_162">0.0</float>
   <float name="bestpriceprecnoflag_162">0.0</float>
   <float name="bestprice_47">9.57</float>
   <int name="flag_47">0</int>
   <date name="data_sc_prezzo_47">2020-12-31T00:00:00Z</date>
   <float name="prezzodoposcadenza_47">10.24</float>
   <float name="bestpriceprec_47">9.95</float>
   <float name="bestpriceprecnoflag_47">0.0</float>
   <date name="databestpriceprec_47">2013-02-20T23:00:00Z</date>
   <arr name="fullpath_8">
     <str>ELDTEL003001001</str>
   </arr>
   <arr name="fullpath_9">
     <str>ELETEL000003004</str>
   </arr>
   <arr name="canale">
     <long>9</long>
     <long>8</long>
   </arr>
   <int name="rank1_9">999999999</int>
   <int name="rank2_9">999999999</int>
   <int name="rank3_9">999999999</int>
   <long name="idarticolocomm_9">461945</long>
   <float name="lottoordine_9">1.0</float>
   <float name="minimoordine_9">1.0</float>
   <str name="statocomm_9">A1</str>
   <date name="datastatocomm_9">2011-06-05T22:00:00Z</date>
   <date name="datacreazione_9">2011-06-06T00:00:00Z</date>
   <date name="dataultimamodifica_9">2013-10-21T00:00:00Z</date>
   <int name="rank1_8">12</int>
   <int name="rank2_8">999999999</int>
   <int name="rank3_8">999999999</int>
   <long name="idarticolocomm_8">930437</long>
   <float name="lottoordine_8">1.0</float>
   <float name="minimoordine_8">1.0</float>
   <str name="statocomm_8">A1</str>
   <date name="datastatocomm_8">2013-01-10T23:00:00Z</date>
   <date name="datacreazione_8">2013-01-11T00:00:00Z</date>
   <date name="dataultimamodifica_8">2013-10-21T00:00:00Z</date>
   <int name="disp_1">18</int>
   <int name="dispfutura_1">0</int>
   <arr name="atag">
     <str>C_0125562</str>
     <str>CAT_607</str>
     <str>M_186</str>
     <str>CM_607|186</str>
     <str>CAR_14956||||</str>
   </arr>
   <arr name="rtag_SIMILE">
     <str>CAR_14956||||</str>
     <str>CAR_14952||||</str>
   </arr>
   <str name="rtipitag">SIMILE</str>
   <long name="_version_">1461102968118968320</long>
   <date name="timestamp">2014-02-26T12:06:14.32Z</date></doc>
 <doc>
   <long name="id">167951</long>
   <str name="codice">0167435</str>
   <str name="descrizione">Carica batteria da auto dedicato iPhone 5</str>
   <str name="modello">CBR-MFIPH5W-Phone 5</str>
   <str name="marchio">Cellular Line</str>
   <str name="categoria">Cellulare - Cavo Accendisigari</str>
   <str name="titolo">Cellular Line CBR-MFIPH5W-Phone 5</str>
<str name="caratteristica1">Cellulare - Cavo Accendisigari|Dedicato apple light</str>
   <bool name="hafoto">true</bool>
   <bool name="hascheda">true</bool>
   <str name="altro1">IS174019|IP173834|ST135516|IG98795</str>
   <str name="altro2"/>
   <str name="codicerepository">P135190</str>
   <float name="qtaconfezione">1.0</float>
   <long name="puntopartenzadefault">1</long>
   <str name="iva">22</str>
   <str name="ivaingrosso">22</str>
   <float name="ivaperc">0.22</float>
   <float name="ivaingrossoperc">0.22</float>
   <str name="keywords"/>
   <float name="bestprice_47">18.02</float>
   <int name="flag_47">0</int>
   <date name="data_sc_prezzo_47">2020-12-31T00:00:00Z</date>
   <float name="prezzodoposcadenza_47">19.27</float>
   <float name="bestpriceprec_47">18.71</float>
   <float name="bestpriceprecnoflag_47">0.0</float>
   <date name="databestpriceprec_47">2013-02-20T23:00:00Z</date>
   <float name="bestprice_162">24.9</float>
   <int name="flag_162">0</int>
   <date name="data_sc_prezzo_162">2050-12-31T00:00:00Z</date>
   <float name="prezzodoposcadenza_162">24.9</float>
   <float name="bestpriceprec_162">0.0</float>
   <float name="bestpriceprecnoflag_162">0.0</float>
   <arr name="fullpath_8">
     <str>ELDTEL003001001</str>
   </arr>
   <arr name="fullpath_9">
     <str>ELETEL000003004</str>
   </arr>
   <arr name="canale">
     <long>9</long>
     <long>8</long>
   </arr>
   <int name="rank1_9">999999999</int>
   <int name="rank2_9">999999999</int>
   <int name="rank3_9">999999999</int>
   <long name="idarticolocomm_9">816069</long>
   <float name="lottoordine_9">1.0</float>
   <float name="minimoordine_9">1.0</float>
   <str name="statocomm_9">A1</str>
   <date name="datastatocomm_9">2012-12-05T23:00:00Z</date>
   <date name="datacreazione_9">2012-12-06T00:00:00Z</date>
   <date name="dataultimamodifica_9">2013-10-21T00:00:00Z</date>
   <int name="rank1_8">9</int>
   <int name="rank2_8">999999999</int>
   <int name="rank3_8">999999999</int>
   <long name="idarticolocomm_8">941785</long>
   <float name="lottoordine_8">1.0</float>
   <float name="minimoordine_8">1.0</float>
   <str name="statocomm_8">A1</str>
   <date name="datastatocomm_8">2013-01-10T23:00:00Z</date>
   <date name="datacreazione_8">2013-01-11T00:00:00Z</date>
   <date name="dataultimamodifica_8">2013-10-21T00:00:00Z</date>
   <int name="disp_1">65</int>
   <int name="dispfutura_1">0</int>
   <arr name="atag">
     <str>C_0167435</str>
     <str>CAT_607</str>
     <str>M_186</str>
     <str>CM_607|186</str>
     <str>CAR_14957||||</str>
   </arr>
   <arr name="rtag_SIMILE">
     <str>CAR_14957||||</str>
     <str>CAR_14952||||</str>
   </arr>
   <str name="rtipitag">SIMILE</str>
   <long name="_version_">1461103051247976448</long>
   <date name="timestamp">2014-02-26T12:07:33.597Z</date></doc>
 <doc>
   <long name="id">167185</long>
   <str name="codice">0166678</str>
<str name="descrizione">Caricabatteria da auto per Apple IPHONE 5/IPAD MINI</str>
   <str name="modello">K39757EU</str>
   <str name="marchio">Kensington</str>
   <str name="categoria">Cellulare - Cavo Accendisigari</str>
   <str name="titolo">Kensington K39757EU</str>
<str name="caratteristica1">Cellulare - Cavo Accendisigari|Dedicato apple light</str>
   <bool name="hafoto">true</bool>
   <bool name="hascheda">true</bool>
   <str name="altro1">IS171490|IP171305|ST133668|IG96264</str>
   <str name="altro2"/>
   <str name="codicerepository">P134418</str>
   <float name="qtaconfezione">1.0</float>
   <long name="puntopartenzadefault">1</long>
   <str name="iva">22</str>
   <str name="ivaingrosso">22</str>
   <float name="ivaperc">0.22</float>
   <float name="ivaingrossoperc">0.22</float>
   <str name="keywords"/>
   <float name="bestprice_162">19.9</float>
   <int name="flag_162">0</int>
   <date name="data_sc_prezzo_162">2050-12-31T00:00:00Z</date>
   <float name="prezzodoposcadenza_162">19.9</float>
   <float name="bestpriceprec_162">22.9</float>
   <float name="bestpriceprecnoflag_162">0.0</float>
   <date name="databestpriceprec_162">2014-02-06T23:00:00Z</date>
   <float name="bestprice_47">14.03</float>
   <int name="flag_47">0</int>
   <date name="data_sc_prezzo_47">2020-12-31T00:00:00Z</date>
   <float name="prezzodoposcadenza_47">15.01</float>
   <float name="bestpriceprec_47">16.16</float>
   <float name="bestpriceprecnoflag_47">0.0</float>
   <date name="databestpriceprec_47">2013-05-28T22:00:00Z</date>
   <arr name="fullpath_8">
     <str>ELDTEL003001001</str>
   </arr>
   <arr name="fullpath_9">
     <str>ELETEL000003004</str>
   </arr>
   <arr name="canale">
     <long>9</long>
     <long>8</long>
   </arr>
   <int name="rank1_9">999999999</int>
   <int name="rank2_9">999999999</int>
   <int name="rank3_9">999999999</int>
   <long name="idarticolocomm_9">814053</long>
   <float name="lottoordine_9">1.0</float>
   <float name="minimoordine_9">1.0</float>
   <str name="statocomm_9">A1</str>
   <date name="datastatocomm_9">2012-11-22T23:00:00Z</date>
   <date name="datacreazione_9">2012-11-23T00:00:00Z</date>
   <date name="dataultimamodifica_9">2014-02-13T00:00:00Z</date>
   <int name="rank1_8">8</int>
   <int name="rank2_8">999999999</int>
   <int name="rank3_8">999999999</int>
   <long name="idarticolocomm_8">941453</long>
   <float name="lottoordine_8">1.0</float>
   <float name="minimoordine_8">1.0</float>
   <str name="statocomm_8">A1</str>
   <date name="datastatocomm_8">2013-01-10T23:00:00Z</date>
   <date name="datacreazione_8">2013-01-11T00:00:00Z</date>
   <date name="dataultimamodifica_8">2014-02-13T00:00:00Z</date>
   <int name="disp_1">76</int>
   <int name="dispfutura_1">0</int>
   <arr name="atag">
     <str>C_0166678</str>
     <str>M_537</str>
     <str>CAT_607</str>
     <str>CM_607|537</str>
     <str>CAR_14957||||</str>
   </arr>
   <arr name="rtag_SIMILE">
     <str>CAR_14957||||</str>
     <str>CAR_14952||||</str>
   </arr>
   <str name="rtipitag">SIMILE</str>
   <long name="_version_">1461103049458057216</long>
   <date name="timestamp">2014-02-26T12:07:31.891Z</date></doc>
</result>
<lst name="facet_counts">
 <lst name="facet_queries"/>
 <lst name="facet_fields"/>
 <lst name="facet_dates"/>
 <lst name="facet_ranges"/>
</lst>
<lst name="spellcheck">
 <lst name="suggestions">
   <bool name="correctlySpelled">true</bool>
 </lst>
</lst>
<lst name="debug">
 <str name="rawquerystring">iphone cavo</str>
 <str name="querystring">iphone cavo</str>
<str name="parsedquery">(+((DisjunctionMaxQuery((categoria_s:iphone | titolo:iphone^2.0 | descrizione:iphon^0.5 | marchio_s:iphone | modello_s:iphone)) DisjunctionMaxQuery((categoria_s:cavo | titolo:cavo^2.0 | descrizione:cav^0.5 | marchio_s:cavo | modello_s:cavo)))~2) FunctionQuery(1.0/(1.0E-9*float(int(rank1_8))+1.0)))/no_coord</str> <str name="parsedquery_toString">+(((categoria_s:iphone | titolo:iphone^2.0 | descrizione:iphon^0.5 | marchio_s:iphone | modello_s:iphone) (categoria_s:cavo | titolo:cavo^2.0 | descrizione:cav^0.5 | marchio_s:cavo | modello_s:cavo))~2) 1.0/(1.0E-9*float(int(rank1_8))+1.0)</str>
 <lst name="explain">
   <str name="125520">
0.8545726 = (MATCH) sum of:
 0.82827055 = (MATCH) sum of:
   0.33939165 = (MATCH) max of:
0.33939165 = (MATCH) weight(modello_s:iphone in 24160) [DefaultSimilarity], result of:
       0.33939165 = score(doc=24160,freq=1.0 = termFreq=1.0
), product of:
         0.21819489 = queryWeight, product of:
           8.295743 = idf(docFreq=170, maxDocs=252056)
           0.02630203 = queryNorm
         1.5554519 = fieldWeight in 24160, product of:
           1.0 = tf(freq=1.0), with freq of:
             1.0 = termFreq=1.0
           8.295743 = idf(docFreq=170, maxDocs=252056)
           0.1875 = fieldNorm(doc=24160)
   0.48887888 = (MATCH) max of:
0.48887888 = (MATCH) weight(categoria_s:cavo in 24160) [DefaultSimilarity], result of:
       0.48887888 = score(doc=24160,freq=1.0 = termFreq=1.0
), product of:
         0.24244946 = queryWeight, product of:
           9.217899 = idf(docFreq=67, maxDocs=252056)
           0.02630203 = queryNorm
         2.0164156 = fieldWeight in 24160, product of:
           1.0 = tf(freq=1.0), with freq of:
             1.0 = termFreq=1.0
           9.217899 = idf(docFreq=67, maxDocs=252056)
           0.21875 = fieldNorm(doc=24160)
0.2507126 = (MATCH) weight(descrizione:cav^0.5 in 24160) [DefaultSimilarity], result of:
       0.2507126 = score(doc=24160,freq=1.0 = termFreq=1.0
), product of:
         0.08681179 = queryWeight, product of:
           0.5 = boost
           6.601147 = idf(docFreq=930, maxDocs=252056)
           0.02630203 = queryNorm
         2.888002 = fieldWeight in 24160, product of:
           1.0 = tf(freq=1.0), with freq of:
             1.0 = termFreq=1.0
           6.601147 = idf(docFreq=930, maxDocs=252056)
           0.4375 = fieldNorm(doc=24160)
0.02630203 = (MATCH) FunctionQuery(1.0/(1.0E-9*float(int(rank1_8))+1.0)), product of:
   1.0 = 1.0/(1.0E-9*float(int(rank1_8)=12)+1.0)
   1.0 = boost
   0.02630203 = queryNorm
</str>
   <str name="167951">
0.8002265 = (MATCH) sum of:
 0.77392447 = (MATCH) sum of:
   0.2850456 = (MATCH) max of:
0.2850456 = (MATCH) weight(descrizione:iphon^0.5 in 95426) [DefaultSimilarity], result of:
       0.2850456 = score(doc=95426,freq=1.0 = termFreq=1.0
), product of:
         0.09998185 = queryWeight, product of:
           0.5 = boost
           7.602596 = idf(docFreq=341, maxDocs=252056)
           0.02630203 = queryNorm
         2.8509734 = fieldWeight in 95426, product of:
           1.0 = tf(freq=1.0), with freq of:
             1.0 = termFreq=1.0
           7.602596 = idf(docFreq=341, maxDocs=252056)
           0.375 = fieldNorm(doc=95426)
   0.48887888 = (MATCH) max of:
0.48887888 = (MATCH) weight(categoria_s:cavo in 95426) [DefaultSimilarity], result of:
       0.48887888 = score(doc=95426,freq=1.0 = termFreq=1.0
), product of:
         0.24244946 = queryWeight, product of:
           9.217899 = idf(docFreq=67, maxDocs=252056)
           0.02630203 = queryNorm
         2.0164156 = fieldWeight in 95426, product of:
           1.0 = tf(freq=1.0), with freq of:
             1.0 = termFreq=1.0
           9.217899 = idf(docFreq=67, maxDocs=252056)
           0.21875 = fieldNorm(doc=95426)
0.02630203 = (MATCH) FunctionQuery(1.0/(1.0E-9*float(int(rank1_8))+1.0)), product of:
   1.0 = 1.0/(1.0E-9*float(int(rank1_8)=9)+1.0)
   1.0 = boost
   0.02630203 = queryNorm
</str>
   <str name="167185">
0.8002265 = (MATCH) sum of:
 0.77392447 = (MATCH) sum of:
   0.2850456 = (MATCH) max of:
0.2850456 = (MATCH) weight(descrizione:iphon^0.5 in 104171) [DefaultSimilarity], result of:
       0.2850456 = score(doc=104171,freq=1.0 = termFreq=1.0
), product of:
         0.09998185 = queryWeight, product of:
           0.5 = boost
           7.602596 = idf(docFreq=341, maxDocs=252056)
           0.02630203 = queryNorm
         2.8509734 = fieldWeight in 104171, product of:
           1.0 = tf(freq=1.0), with freq of:
             1.0 = termFreq=1.0
           7.602596 = idf(docFreq=341, maxDocs=252056)
           0.375 = fieldNorm(doc=104171)
   0.48887888 = (MATCH) max of:
0.48887888 = (MATCH) weight(categoria_s:cavo in 104171) [DefaultSimilarity], result of:
       0.48887888 = score(doc=104171,freq=1.0 = termFreq=1.0
), product of:
         0.24244946 = queryWeight, product of:
           9.217899 = idf(docFreq=67, maxDocs=252056)
           0.02630203 = queryNorm
         2.0164156 = fieldWeight in 104171, product of:
           1.0 = tf(freq=1.0), with freq of:
             1.0 = termFreq=1.0
           9.217899 = idf(docFreq=67, maxDocs=252056)
           0.21875 = fieldNorm(doc=104171)
0.02630203 = (MATCH) FunctionQuery(1.0/(1.0E-9*float(int(rank1_8))+1.0)), product of:
   1.0 = 1.0/(1.0E-9*float(int(rank1_8)=8)+1.0)
   1.0 = boost
   0.02630203 = queryNorm
</str>
 </lst>
 <str name="QParser">ExtendedDismaxQParser</str>
 <null name="altquerystring"/>
 <null name="boost_queries"/>
 <arr name="parsed_boost_queries"/>
 <arr name="boostfuncs">
   <str>
recip(rank1_8,1e-9,1,1)
      </str>
 </arr>
 <lst name="timing">
   <double name="time">19.0</double>
   <lst name="prepare">
     <double name="time">3.0</double>
     <lst name="query">
       <double name="time">3.0</double>
     </lst>
     <lst name="facet">
       <double name="time">0.0</double>
     </lst>
     <lst name="mlt">
       <double name="time">0.0</double>
     </lst>
     <lst name="highlight">
       <double name="time">0.0</double>
     </lst>
     <lst name="stats">
       <double name="time">0.0</double>
     </lst>
     <lst name="spellcheck">
       <double name="time">0.0</double>
     </lst>
     <lst name="debug">
       <double name="time">0.0</double>
     </lst>
   </lst>
   <lst name="process">
     <double name="time">16.0</double>
     <lst name="query">
       <double name="time">8.0</double>
     </lst>
     <lst name="facet">
       <double name="time">0.0</double>
     </lst>
     <lst name="mlt">
       <double name="time">0.0</double>
     </lst>
     <lst name="highlight">
       <double name="time">0.0</double>
     </lst>
     <lst name="stats">
       <double name="time">0.0</double>
     </lst>
     <lst name="spellcheck">
       <double name="time">1.0</double>
     </lst>
     <lst name="debug">
       <double name="time">7.0</double>
     </lst>
   </lst>
 </lst>
</lst>
</response>


--
Ing. Andrea Vettori
Responsabile Sistemi Informativi

Reply via email to