lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Plus factor in returned results
Date Thu, 03 Aug 2006 06:27:52 GMT

if i'm understanding you, you have a set of additional criteria
A,B,C,etc..., and it's required that any one of the criteria match (in
addition to the textual input) but each of the criteria has a differnet
importance (A is better then B is better then C)

I think what you want is to just build a query whose toString will look a
little like this...

  +(chinese restaurant) +(A^100 B^10 C^1)

...but bear in mind you can build the second BooleanQuery up
progromatically (ie: not using QueryParser) and then combine it with the
first query generated from QueryParser.

(i picked arbitrary boost values .. you'll have to play with them to
decide how you wnat the overall value of the additional criteria to
relate to teh scoring value of the main textual search criteria).


: I'd like to start with a standard parsed query, then combine it with
: another that says requires a field's untokenized value be inside of a
: set. The catch is, I want the document's position in that set to be
: included in the scoring.
:
: So I want to search for "chinese restaurant", but only for these
: towns. However, if it's town A, I want that to be a plus-factor, even
: though towns B and C are in the set. Make sense?
:
: ---------------------------------------------------------------------
: To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
: For additional commands, e-mail: java-user-help@lucene.apache.org
:



-Hoss


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


Mime
View raw message