lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Calculation of fieldNorm causes irritating effect of sort order
Date Fri, 03 Oct 2008 00:17:14 GMT

If i'm reading your message correctly, you (and everyone who has replied 
so far) have gotten caught in a red herring.  While an "explain" on the 
results from your queryB will most likely show you that the 
fieldNorm is the main differantiator in score between document-153 and 
document-244 that's not what matters.  the fieldNorms are also the same 
in your first query as well -- so you should be asking "what makes the 
score for document-153 in queryA different from queryB?" (and likewise for 
document-244)

if you do that you'll see that the portion of the score coming from the 
"meat" of your query (+alltext:betyg) is greatly reduced between queryA 
and queryB because of the structure of queryB ... which combined with 
tf/idf and fieldNorms for your "type" and "category" fields can change the 
order of results.

As Erick pointed out, what you really want is for your type and category 
clauses to be implemented as a Filter, so that they don't factor into your 
scores at all.  baring that you should at a minimum change the structure 
and boosts of the queries you execute to be something like...

+alltext:betyg +(+type:idea +category:14)^0.00001)



: A search for "betyg", where the user doesn't care if the ideas are 
: active or inactive, gives this result:
: 
: document-153
: document-244
: 
: The user then checkes the checkbox "Only active ideas", and clicks the 
: search button again. Now the result is:
: 
: document-244
: document-153

: The first query:
: +type:idea +alltext:betyg
: 
: The second query:
: +type:idea +(+alltext:betyg +category:14)


-Hoss

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message