Document boost not reflected in fieldNorm

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Document boost not reflected in fieldNorm

kkrugler
Hi all,

I've got a keyword field defined as a text_ws type in my Solr schema,
and it always contains one or two of about 20 fixed values.

When documents get added, they have a <doc boost="<float>"> boost
supplied, where this varies from just above 0 to a max of 2.0.

When I do do a query on that keyword field, I was expecting that the
ordering of the results would match the boost values, now that I'm no
longer specifying omitNorms="true" for the field.

But I still get seemingly random results. When I use the full search
interface in Solr, the results for two documents with different
boosts looks like:

   <str name="id=08xIN5p,internal_docid=114">
4.687879 = (MATCH) fieldWeight(keyword:test in 114), product of:
   1.0 = tf(termFreq(keyword:test)=1)
   2.678788 = idf(docFreq=1865)
   1.75 = fieldNorm(field=keyword, doc=114)
</str>

   <str name="id=0RT3JYa,internal_docid=625">
4.687879 = (MATCH) fieldWeight(keyword:test in 625), product of:
   1.0 = tf(termFreq(keyword:test)=1)
   2.678788 = idf(docFreq=1865)
   1.75 = fieldNorm(field=keyword, doc=625)

I was expecting the fieldNorm() value to be different, because of the
different document boost values. What am I missing?

Thanks,

-- Ken
--
Ken Krugler
Krugle, Inc.
+1 530-210-6378
"Find Code, Find Answers"
Reply | Threaded
Open this post in threaded view
|

Re: Document boost not reflected in fieldNorm

Chris Hostetter-3


i just tried this with the example schema:
  1) changed the "cat" field to have omitNorms="false"
  2) edited solr.xml so there was a second <doc> with all the same data
     except a differnet "id" and a doc boost of 2
  3) restarted port, and reindexed solr.xml

...when i search on cat:search, i definitely see the docboost comeinto
play...

<str name="id=SOLR1001,internal_docid=19">
2.5622776 = (MATCH) fieldWeight(cat:search in 19), product of:
  1.0 = tf(termFreq(cat:search)=1)
  2.049822 = idf(docFreq=6)
  1.25 = fieldNorm(field=cat, doc=19)
</str>
<str name="id=SOLR1000,internal_docid=18">
1.2811388 = (MATCH) fieldWeight(cat:search in 18), product of:
  1.0 = tf(termFreq(cat:search)=1)
  2.049822 = idf(docFreq=6)
  0.625 = fieldNorm(field=cat, doc=18)


...perhaps your docboosts (while diferent) are close enough together that
they encode to the same byte encoded value?


-Hoss