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 Daniel Noll <da...@nuix.com> on 2007/12/06 01:42:32 UTC

Tricky (maybe) query question

Hi all.

Suppose you have a text index with a field used for deduplication, and then 
you later add a second field with further information that might also be used 
for deduplication.  We'll call them A and B for the sake of brevity.

If I have only a current text index, then I can use (a:foo AND b:bar) to 
deduplicate.  However, I still want to deduplicate between the older ones 
which don't have B and the new ones which do.

Is there a way I can do a query which will:
  - Match a document if both a:foo and b:bar are matched
  - Match a document if a:foo matches and b is absent, or vice versa.
  - Not match a document if both a:foo and b:foo are absent
  - Not match a document if either a:foo or b:foo are present and do not
    match ?

If not, I suppose I'll have to go with the lowest common denominator approach 
and find out which fields are present in every index.

Daniel

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