FAQ
Nada,

Scores and norms are two different things. If you look for the Lucene class called DefaultSimilarity you will see how norms are computed:

public float computeNorm(String field, FieldInvertState state) {
final int numTerms;
if (discountOverlaps)
numTerms = state.getLength() - state.getNumOverlap();
else
numTerms = state.getLength();
return (float) (state.getBoost() * lengthNorm(field, numTerms));
}


So that's how two different fields can still have the same norms value.

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch


----- Original Message ----
From: Nada Mimouni <mimouni@tk.informatik.tu-darmstadt.de>
To: java-user@lucene.apache.org
Sent: Thursday, June 18, 2009 12:16:49 PM
Subject: Same score for different fields

Hi,



I have created a Lucene index with two fields.

Let's take this example entry from my index as displayed by Luke:



Field | Norm | Value

--------------------------------------------
0.375 | average
0.375 | salary
0.375 | professional
0.375 | baseball
0.375 | player
0.375 | of
0.625 | average salary
0.625 | baseball player


When I run the search, documents that contain hits of the field with
the highest norm (or score : is it the same?), in this case the field
"seq", are ranked in the top.

How can I give similar scores for both fields?



Thank you.

Nada

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

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupjava-user @
categorieslucene
postedJun 18, '09 at 4:17p
activeJun 18, '09 at 5:14p
posts2
users2
websitelucene.apache.org

2 users in discussion

Nada Mimouni: 1 post Otis Gospodnetic: 1 post

People

Translate

site design / logo © 2022 Grokbase