lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Very high fieldNorm for a field resulting in bad results
Date Fri, 29 Sep 2006 23:20:17 GMT

: Assuming I want to boost the fields with the same value for all documents,
: can this be replaced by query-time boosting.

if i'm understanding what you mena, then yes.

: I, though, am storing the norms & yet do not get exact matches ranking
: higher than others.

the notion that norms help "exact matches' score higher is only true in
simple queries, ie: "foo bar" should score higher against "foo bar
baz" then "foo bar bax bat" because the norm will lower the fieldWeight of
the query ... but when you are building complex BooleanQueries out of
other queries a lot of other factors come into play.

when trying to tweak your "Query builder" there is really no substitute
for a lot of patience, experimentation, and a lot of
Explanation.toString()  calls.

: this helps to some level, but my problem comes from the fact that
: given a user query, i dont know which field to search in & hence
: construct a boolean query that searches in all fields.

You might want to look into the DisjunctionMaxQuery class ... in
particular building a BooleanQuery containing a DisjunctionMaxQuery for
each 'word' of your input in the various fields ... i've found it to be
very effective.  when it was first proposed it was called
"MaxDisjunctionQuery" and you can find an explanation of how it can be
usefull here...

...a DisjunctionMaxQueryParser that builds the types of queries i was
talking about on the fly is in use in solr's "DisMaxRequestHandler", you
can find it as a static inner class in SolrPluginUtils...

...if you look at how the DisMaxRequestHandler uses it with the q, qf, and
pf fields you might get som good ideas about building up a complex query
from a sequence of words the user gives across many fields for both the
individual words and the input as a whole phrase.


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

View raw message