lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Eacott <>
Subject is it possible to make lucene searches match based on per doc field:termcount?
Date Fri, 06 Nov 2009 00:31:23 GMT
Hi All, I hope someone can offer some advice.
I want to extend lucene to search in a particular way(if it cant already):

I want to index docs, each with file containing several terms something 
so far nothing new.

I want to query for matching docs such that a query something like 
myfield:(a or b)  should only return docs if the doc itself is FULLY 
ie, for the query myfield:(a or b) , only doc1 and doc2 should match.
So the rules are its only a match if the termcount for each doc is <=the 
termcount of the query(for that field) AND ALL the terms in the doc were 

a few more examples just to clarify:
myfield:(a or b or d) would match doc4
myfield:(a or b or c or d) would match ALL the docs here (this one works 
anyway but only because it uses all the terms that exist)
myfield:(a) would match doc1

order is not important (but might be a nice have)

can anyone tell me if its possible to make lucene do this, and perhaps 
offer a starting point?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message