You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by lu...@jakarta.apache.org on 2004/03/29 23:51:47 UTC

[Jakarta Lucene Wiki] Updated: CommunityContributions

   Date: 2004-03-29T13:51:44
   Editor: 194.106.34.5 <>
   Wiki: Jakarta Lucene Wiki
   Page: CommunityContributions
   URL: http://wiki.apache.org/jakarta-lucene/CommunityContributions

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -2,8 +2,13 @@
 
  == Demoting results ==
 
-  I've found an elegant way of doing this now for all types of search - a new "NegatingQuery" class that takes any Query object in its constructor
-  and selects all documents that DON'T match and gives them a user-definable boost.
-                                                               
-  url: http://www.inperspective.com/lucene/demote.zip [[BR]]
-  contact: markharw00d at yahoo dot co dot uk
+The BoostingQuery class can be used to effectively demote results that match a given query. Unlike the "NOT" clause this still selects documents that contain undesirable terms but reduces their overall score:
+
+   Query balancedQuery =
+     new BoostingQuery(positiveQuery, negativeQuery, 0.01f);
+
+In this scenario the positiveQuery contains the mandatory, desirable criteria which is used to select all matching documents and the negativeQuery contains the undesirable elements which are simply used to lessen the scores. Documents that match the negativeQuery have their score multiplied by the supplied "boost" parameter (so this should be less than one to achieve a downgrading effect).
+
+This code was made available here:                                                               
+  url: http://marc.theaimsgroup.com/?l=lucene-user&m=108058407130459&w=2 [[BR]]
+ 

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