lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Query question
Date Sun, 05 Nov 2006 18:31:49 GMT

: I know I am getting very close on this one but can't seem to get the score
: above .306.  My guess is that I need to do something different in my

1) you didn't setOmitNorms(true)

2) why do you care what the score is? .. you said you only wanted exact
matches: if you don't tokenize, and you build your queries explicitly (all
MUST or MUST_NOT, no sloppy phrases, etc..) the matches you get will only
be exact matches.

3) if you really care about the numeric score values, don't use Hits,
those scores are "psuedo-normalized"

4) the Searcher.explain method can be used to understand why you are
getting a particular score value.  most likely you can get a score of
"1.0" by subclassing Similarity in a creative way, but see point#2.

: >  1) Use only UN_TOKENIZED fields when adding your documents, and if you
: > use QueryParser to build your queries for you, use the KeywordAnalyzer to
: > make sure no lowercasing or stemming takes place.
: >  2) OMIT_NORMs when indexing .. they only matter if you want the lengths
: > of fields to affect the score, and you don't -- you only want to know if
: > it matched or not.
: >  3) if you want to require name="jeff" and age="33" make sure you
: > construct a query where all clauses are mandatory .. the default in the
: > query parser is "SHOULD" meaning only one clause is mandatory, and the
: > other clauses increase the score.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message