lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mad Cow" <madcow...@hotmail.com>
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 
phrase.
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

Iain

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://www.msn.co.uk/messenger


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


Mime
View raw message