Say our index has (documents with) three fields "f1", "f2" and "f3" and I want 
to find all documents matching "foo" and "bar" in any combination of the three 
fields.
1)The more words that match, the higher its ranking. So it is not really a 
strict AND-query...
2)The more words that match in a single field, it should be ranked higher.
3)Also, as fields have boost factors, these boosts should ideally be reflected 
in the ranking too.

What is the most appropriate/elegant lucene-query for this?

Possibly a "copyfield" or "catch all field"? I.e. copying/indexing f1, f2 and 
f3 into an additional field, say "fc", and then looking up in fc only -> 
"fc:foo AND fc:bar" ? At least (3) is not fullfilled.

Thx in advance for advices
Clemens
PS: I ask because my documents don't have 3, but >20 fields ;), and instead of 
"foo bar" a user might want to lookup "foo blah whoo bar" ...

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

Reply via email to