lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Francl <luke.fra...@stellent.com>
Subject What is the difference between these searches?
Date Tue, 09 Nov 2004 19:58:45 GMT
Hi,

I've implemented a converter to translate our system's internal Query
objects to Lucene's Query model.

I recently realized that my implementation of "OR NOT" was not working
as I would expect and I was wondering if anyone on this list could give
me some advice.

I am converting a query that means "foo or not bar" into the following:

+item_type:xyz +(field_name:foo -field_name:bar)

This returns only Documents where field_name contains foo. I would
expect it to return all the Documents where field_name contains foo or
field_name doesn't contain bar.

Fiddling around with the Lucene Index Toolbox, I think that this query
does what I want:

+item_type:xyz field_name:foo -field_name:bar

Can someone explain to me why these queries return different results?

Thanks,
Luke Francl


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


Mime
View raw message