You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by fbytes <aj...@foodiebytes.com> on 2011/05/25 20:42:55 UTC
Minimum Should Match not enforced with External Field + Function
Query with boost
Hello
"Minimum Should Match" does not seem to be working when I am using the boost
with external field scoring (I followed
http://dev.tailsweep.com/solr-external-scoring/ example to implement
external field scoring.)
I am using a month old solr trunk build (4.0).
Thanks for help.
Ajay
Here are input parameters to dismax request handler:
d=6&sfield=latlon&group.main=true&wt=json&rows=10&debugQuery=true&fl=*,score&start=0&q={!boost+b=dishRating+v=$qq}&pt=42.35864,-71.05666&group.field=resname&group=true&qq=hot+chicken+wings&fq={!bbox}
"MM" field is defined in the default list (solrconfig.xml) as
<str name="mm">3</str>
Debug information:
["debug"] => array(11) {
["rawquerystring"] => string(27) "{!boost b=dishRating v=$qq}"
["querystring"] => string(27) "{!boost b=dishRating v=$qq}"
["parsedquery"] => string(249) "BoostedQuery(boost(text:hot
(text:chicken text:chickn text:poultri text:murgh text:pollo) (text:wing
text:wingett),FileFloatSource(field=dishRating,keyField=id,defVal=0.0,dataDir=/solr/dish/data/)))"
["parsedquery_toString"] => string(235) "boost(text:hot (text:chicken
text:chickn text:poultri text:murgh text:pollo) (text:wing
text:wingett),FileFloatSource(field=dishRating,keyField=id,defVal=0.0,dataDir=/solr/dish/data/))"
["explain"] => array(10) {
["US-MA-2256-862-240311"] => string(1397) "
0.62424326 = (MATCH) boost(text:hot (text:chicken text:chickn text:poultri
text:murgh text:pollo) (text:wing
text:wingett),FileFloatSource(field=dishRating,keyField=id,defVal=0.0,dataDir=/solr/dish/data/)),
product of:
0.15606081 = (MATCH) product of:
0.23409122 = (MATCH) sum of:
0.13103496 = (MATCH) weight(text:hot in 221464), product of:
0.18647969 = queryWeight(text:hot), product of:
4.497132 = idf(docFreq=16595, maxDocs=548010)
0.04146636 = queryNorm
0.70267683 = (MATCH) fieldWeight(text:hot in 221464), product of:
1.0 = tf(termFreq(text:hot)=1)
4.497132 = idf(docFreq=16595, maxDocs=548010)
0.15625 = fieldNorm(field=text, doc=221464)
0.103056274 = (MATCH) sum of:
0.103056274 = (MATCH) weight(text:chicken in 221464), product of:
0.11693921 = queryWeight(text:chicken), product of:
2.8200984 = idf(docFreq=88782, maxDocs=548010)
0.04146636 = queryNorm
0.8812808 = (MATCH) fieldWeight(text:chicken in 221464), product
of:
2.0 = tf(termFreq(text:chicken)=4)
2.8200984 = idf(docFreq=88782, maxDocs=548010)
0.15625 = fieldNorm(field=text, doc=221464)
0.6666667 = coord(2/3)
4.0 =
float(dishRating{type=dishRatingFile,properties=omitTermFreqAndPositions})=4.0
--
View this message in context: http://lucene.472066.n3.nabble.com/Minimum-Should-Match-not-enforced-with-External-Field-Function-Query-with-boost-tp2985564p2985564.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Minimum Should Match + External Field + Function Query with
boost
Posted by Chris Hostetter <ho...@fucit.org>.
: Seem to have a solution but I am still trying to figure out how/why it works.
:
: Addition of "defType=edismax" in the boost query seem to honor "MM" and
: correct boosting based on external file source.
You didn't bost enough details in your original question to be 100%
certain (would have needed to see the *full* solr url, including path, and
your requestHandler declaration from solrconfig.xml to be sure) but i
suspect the problem you were having is that you weren't actually using
dismax (or edismax) at all until you added the explicit defType you
mentioned...
: The new query syntax
: q={!boost b=dishRating v=$qq defType=edismax}&qq=hot chicken wings
compare the "parsedquery_toString" in the debug output of your previous
message with the debug output you get now and i think you'll see a clear
indication of when a DisjunctionMaxQuery is used (and what the "mm" is set
to)
-Hoss
Re: Minimum Should Match + External Field + Function Query with
boost
Posted by fbytes <aj...@foodiebytes.com>.
Seem to have a solution but I am still trying to figure out how/why it works.
Addition of "defType=edismax" in the boost query seem to honor "MM" and
correct boosting based on external file source.
The new query syntax
q={!boost b=dishRating v=$qq defType=edismax}&qq=hot chicken wings
--
View this message in context: http://lucene.472066.n3.nabble.com/Minimum-Should-Match-not-enforced-with-External-Field-Function-Query-with-boost-tp2985564p3032143.html
Sent from the Solr - User mailing list archive at Nabble.com.