lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Paransky" <alex.paran...@individualnetwork.com>
Subject A method for "de-boosting" a term...
Date Tue, 23 Oct 2001 22:22:15 GMT
We are trying to "de-value" documents which contain certain terms.  So
instead of increasing the value of those documents and thus moving them to
the top of the list, we are trying to decrease the value and hopefully move
those documents to the bottom of the list.  To do this we are playing with
various combinations of setBoost(...).  Thinking here, is that to de-value
we would set a lower boost value, increase value we would set a higher boost
value, and neutral would be a boost value in the middle:

final TermQuery
  retval = new TermQuery(new Term(field, value));

retval.setBoost(
  preference < 0
    ? 0.0f
    : preference > 0
      ? 100000.0f
      : 50000.0f
);

However, no matter what "negative" boost we set, the mere fact that the
terms of the document have matched with the query moves the document to the
top of the list.  Here is the query that is being generated:

GLOBAL_MATCH:GLOBAL_VALUE^50000.0 +(424:6^50000.0 424:7^50000.0
424:8^50000.0 424:9^50000.0 424:10^50000.0 424:11^50000.0 424:12^50000.0
424:13^50000.0 424:14^50000.0 424:15^50000.0 424:16^50000.0 424:17^50000.0
424:18^50000.0) (424:14^0.0 423:Natalie Imbruglia - Torn Music Video^0.0
422:600^0.0 422:476^0.0 422:586^0.0 422:419^0.0) +(contentTypeId:1
contentTypeId:4)

Notice that some terms have a boost of 0.0 while others have a boost of
50000.0 yet, the document with boost of 0.0 still appears on top.

Could someone recommend a way of doing a "negative" boost?

Thanks.
-AP_


Mime
View raw message