15 jul 2008 kl. 18.44 skrev Yonik Seeley:
On Tue, Jul 15, 2008 at 10:24 AM, Karl Wettin
<[EMAIL PROTECTED]> wrote:
I have a number of fields that are used to filter documents from a
search.
They should not contribute to the score of the document but merely
decide
which documents are valid. i.e. it doesn't matter how rare they
are in
the
index. I also have a single "combined" field that is used for
free text
searching and it should be scored as normal.
How can I turn off scoring of these "filter" fields?
I think all you need to do is to create a custom query (sounds like
you want
a clone of TermQuery) that uses a Scorer that always return 1f.
Or just set the boost to zero on the individual filter fields, or on
the whole filter expression.
+(my query) +(filter1 OR filter2 AND filter3)^0
Yeah, that's a much simpler solution :).
Use that one John!
karl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]