-Re: Boosting the score of the whole documents
Jack Krupansky 2012-07-04, 21:20
I'm not completely sure. I wouldn't expect that document boost should
require field norms, but glancing at the code, it seems that having
omitNorms=true does mean that the score for a field will not get the
document boost, and in fact such a field gets a "constant score". In other
words, that the score for any field within the document will only get the
document boost if that field does not have omitNorms=true. But as long as at
least one field has norms, the document score should get some boost from
document boost. I am not sure if this is the way the code is supposed to
work, or whether it just happens to be this way.
I would hope that some committer with detailed knowledge of "norms" and
"similarity" weigh in on this matter.
-- Jack Krupansky
From: Danilak Michal
Sent: Wednesday, July 04, 2012 1:11 PM
To: [EMAIL PROTECTED]
Subject: Re: Boosting the score of the whole documents
Should there be made any modification into scheme.xml file?
For example, to enable field boosts, one has to set omitNorms to false.
Is there some similar field for document boosts?
On Wed, Jul 4, 2012 at 7:29 PM, Jack Krupansky
> Make sure to review the "similarity" javadoc page to understand what any
> of these factors does to the document score.
> Sure, a document boost applies a multiplicative factor, but that is all
> relative to all of the other factors for that document and query. In other
> words, "all other things being equal", a doc-boost of 2.0 would double the
> score, but all other things are usually not equal.
> Try different doc-boost values and see how the score is affected. The
> document may have such a low score that a boost of 2.0 doesn't move the
> needle relative to other documents.
> I believe that the doc-boost is included within the "fieldNorm" value that
> is shown in the "explain" section if you add &debugQuery=true to your
> request. This is explained under "norm" in the similarity javadoc.
> I did try a couple of examples with the Solr 3.6 example, such as doc
> boost=2.0, 0.2 (de-boost), 4.0, and 8.0. In my case, it took a boost of
> to move a document up.
> -- Jack Krupansky
> -----Original Message----- From: Danilak Michal
> Sent: Wednesday, July 04, 2012 10:57 AM
> To: [EMAIL PROTECTED]
> Subject: Boosting the score of the whole documents
> Hi guys,
> I have the following problem.
> I would like to give a boost to the whole documents as I index them. I am
> sending to solr the xml in the form:
> <add><doc boost="2.0">....</doc></add>
> But it does't seem to alter the search scores in any way. I would expect
> that to multiply the final search score by two, am I correct?
> Probably I would need to alter schema.xml, but I found only information on
> how to do that for specific fields (just put omitNorms=false into the
> tag). But what should I do, if I want to boost the whole document?
> Note: by boosting a whole document I mean, that if document A has search
> score 10.0 and document B has search score 15.0 and I give document A the
> boost 2.0, when I index it, I would expect its search score to be 20.0.
> Thanks in advance!