lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: how to find out if two fields are identical?
Date Thu, 13 Jul 2006 04:29:58 GMT

: Based on these three documents, I want the query to return the third
: document where childID=parentID.

the the best of my knowledge there is no easy way to do this using the
existing lucene query types -- but it would be fairly easy to impliment.

Since there are no "scoring" issues involved, i would suggest implimenting
it as a new Filter ... if you can allow yourself the constraint that no
document will have more then one value for either field, you can use the
FieldCache to do this very easily -- just iteratre over the FieldCache
arrays in unison, and record a Bit for each document where the value is
the same.

SOlving the more general case where a document matches if any Term it has
for Field X matches any Term it has for Field Y would certinaly be


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

View raw message