lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rich Livingstone <nab...@bananasoft.net>
Subject How to make each term of query appear in at least one field of multiple field query
Date Sat, 17 Oct 2009 20:24:21 GMT

I am a bit stumped by how to ensure that, where there are multiple terms in
my query, that each term must appear at least once across all specified
fields of my document. I am using MultiFieldQueryParser and
BooleanClause.Occur.SHOULD in the query; I tried putting all fields into a
single giant field and prefixing each term with + but that loses the ability
to boost individual fields in the search (unless there is a way to add a
boost per term indexed at index time?) so it doesn't seem a good solution as
I need the boosting too.

Anyone any idea how to do this ? BooleanClause.Occur.MUST would force all
terms to be in all fields, I would have thought - and the ability to do
weighting is important to me.

I'm using Lucene 2.2.0.

Thanks for any help !
-- 
View this message in context: http://www.nabble.com/How-to-make-each-term-of-query-appear-in-at-least-one-field-of-multiple-field-query-tp25941499p25941499.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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