You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Tom Eskridge <te...@ai.uwf.edu> on 2003/05/19 18:56:03 UTC

Scoring optional query terms

All,

 I've got a query of the form "A or B or ( C or D or E )" where the results 
must contain the terms A or B, but should be rated higher if they contain 
C,D, or E as well.  

Is there a good way to do this?
-- 

Cheers,

Tom


Tom Eskridge
Institute for Human and Machine Cognition
University of West Florida
40 S. Alcaniz St
Pensacola, FL 32501
ph: 850-202-4454
fx: 850-202-4440

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


Re: Scoring optional query terms

Posted by Ype Kingma <yk...@xs4all.nl>.
Tom,

On Monday 19 May 2003 09:56, Tom Eskridge wrote:
> All,
>
>  I've got a query of the form "A or B or ( C or D or E )" where the results
> must contain the terms A or B, but should be rated higher if they contain
> C,D, or E as well.
>
> Is there a good way to do this?

The query

+(A B) C D E

does what you need.

Regards,
Ype


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