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 Gastone Penzo <ga...@gmail.com> on 2011/07/08 15:51:14 UTC

omitNorms and omitTermFreqAndPosition

Hi,
i have a problem with omitTermFreqAndPosition and omitNorms.
In my schema i have some fields with these property set True.
for example the field "category"

then i make a query like:
select?q=category:("x" OR "y" or "Z")

it returns all docs that have as category x or y or z.

i make a debugQuery=on to see the score and i see every docs have different
score.
why? the tf is calculated and, also normalization. why? they should be have
the same score..
cause it's not a full-text search but i search only docs that are inside a
group. stop
 Thank you very much

-- 
*Gastone Penzo*
*
*

Re: omitNorms and omitTermFreqAndPosition

Posted by Chris Hostetter <ho...@fucit.org>.
As a general rule, if you are looking at the score explanations from 
debugQuery, and you don't understand why you get the scores thta you do, 
then you should actaully send the score explanations along with your email 
when you ask why it doesn't match what you expect.

In the absense of any other information to go on, i'm going to guess that 
the reason for the differnet scores is that category may be a multiValued 
field, and some docs are matching multiple clauses of your query -- so the 
coord factor of hte boolean query comes into play (rewarding docs for 
matching multiple clauses) ... but as i said, i can't be certain because 
you didn't actually tell us what hte score explanation said.

assuming i'm right, and assuming you want all the docs to score the 
same, or for the score to be driven by some other factor besides the 
relevancy of the query you are sending then anothe general rule comes into 
play: if you don't care about hte score of a query, then that query 
probably makes more sense as a filter....

fq=category(X OR Y OR Z)&q=...whatever, maybe *:*...

: i have a problem with omitTermFreqAndPosition and omitNorms.
: In my schema i have some fields with these property set True.
: for example the field "category"
: 
: then i make a query like:
: select?q=category:("x" OR "y" or "Z")
: 
: it returns all docs that have as category x or y or z.
: 
: i make a debugQuery=on to see the score and i see every docs have different
: score.
: why? the tf is calculated and, also normalization. why? they should be have
: the same score..
: cause it's not a full-text search but i search only docs that are inside a
: group. stop
:  Thank you very much


-Hoss