lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mad Cow" <>
Subject Collecting documents where only one field term matches
Date Mon, 04 Apr 2005 09:17:37 GMT
Could some more experienced users suggest a solution to my problem. I have 
documents which contain multiple terms and phrases, and I wish to collect 
documents which match only the term I query for.

For example:
Doc1 contains,
   species:"homo sapien" Mammalia

Doc2 contains,
   species:"homo sapien"

I wish to collect documents ONLY with "homo sapien" but a search for 
species:"homo sapien" returns both documents as they both contain the 
I have written code to cache every term for every field an I hoped that I 
could do the search - species:"homo sapien" -species:Mammalia. Unfortunately 
the terms homo and sapien seem to be separate.  So when I collect every term 
to use with the "-" operator I end up with a query thus
species:"homo sapien" -species:(homo Mammalia sapien)

which isn't the same.

Can anybody suggest another approach?

Many thanks


It's fast, it's easy and it's free. Get MSN Messenger today!

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

View raw message