Hi,
Hoping this was completely my fault I changed my solr to a nightly build
from june (I run Solr patched with SOLR-1240) but the same problems
occur. After reindexing a single always_on_top document it suddenly
appeared in far down the resultset with score around 5.311 (where it
would be if always_on_top were not true) yet the debugQuery output shows
a score for that one item to be 10.28 while the rest of the documents
score from 5.305 to 5.315. Restarting Solr or reindexing the document
again seemed to have no effect but as a last resort I tried optimize
which did work. I may have misunderstood the purpose of optimize but
that shouldn't have any effect on scoring should it?
For what it's worth, I'm using dismax with the functionquery in bf.
Regards,
gwk
Oops, it seems it's due to a fq in the same query, not because of
the, there's a range query on price:
fq=price:({0 TO *} OR 0)
Removing this filter makes debugQuery work however strange thing
happen, I took my original query and took the first result and the
last result and performing the query (on unique id) without the fq
and debugQuery=true yields:
<result name="response" numFound="2" start="0" maxScore="10.288208">
<doc>
<float name="score">10.288208</float>
<double name="price">195500.0</double>
<date name="publication_date">2009-06-12T12:07:11Z</date>
<bool name="always_on_top">true</bool>
<str name="id">695658</str>
</doc>
<doc>
<float name="score">5.1031165</float>
<double name="publication_date">680000.0</double>
<bool name="always_on_top">true</bool>
<str name="id">147563</str>
</doc>
</result>
while debug part of the response contains:
<lst name="explain">
<str name="695658">
10.287015 = (MATCH) sum of:
0.09950372 = (MATCH) MatchAllDocsQuery, product of:
0.09950372 = queryNorm
10.187511 = (MATCH)
FunctionQuery(sum(product(ord(homepage_teaser),const(5.0)),1000.0/(1.0*float(top(rord(first_publication_date)))+1000.0))),
product of:
10.238322 =
sum(product(ord(homepage_teaser)=2,const(5.0)),1000.0/(1.0*float(rord(first_publication_date)=3196)+1000.0))
10.0 = boost
0.09950372 = queryNorm
</str>
<str name="147563">
10.078215 = (MATCH) sum of:
0.09950372 = (MATCH) MatchAllDocsQuery, product of:
0.09950372 = queryNorm
9.978711 = (MATCH)
FunctionQuery(sum(product(ord(homepage_teaser),const(5.0)),1000.0/(1.0*float(top(rord(first_publication_date)))+1000.0))),
product of:
10.028481 =
sum(product(ord(homepage_teaser)=2,const(5.0)),1000.0/(1.0*float(rord(first_publication_date)=34112)+1000.0))
10.0 = boost
0.09950372 = queryNorm
</str>
</lst>
So the score in the response doesn't match the score in debugQuery's
output. Does this have something to do with SOLR-947?
I'm currently using Solr 1.4 trunk (revision 787997, which is about
a month old iirc)
Regards,
gwk