lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AHMET ARSLAN <iori...@yahoo.com>
Subject Re: Lucene query syntax using grouping, MUST, MUST_NOT and SHOULD
Date Tue, 25 Aug 2009 10:45:30 GMT


--- On Tue, 8/25/09, Henric Müller <henric@trillian.se> wrote:

> From: Henric Müller <henric@trillian.se>
> Subject: Lucene query syntax using grouping, MUST, MUST_NOT and SHOULD
> To: java-user@lucene.apache.org
> Date: Tuesday, August 25, 2009, 12:20 PM
> Hi,
> 
> I have experience some strange things when dealing with
> Lucene queries. I've read some threads on this list and
> realize that Lucene shouldn't be seen as a complete boolean
> query language. However I try to understand the Lucene-way
> and have one example that I wonder if someone can help me to
> clarify.
> 
> I wish to create a query that gives me all persons outside
> us OR having Smith as last name, ie something like (Country
> != us or LastName == smith)

(Country:[* TO *] NOT Country:us) OR LastName:smith

"Note: The NOT operator cannot be used with just one term. For example, the following search
will return no results: NOT "jakarta apache""[1]

[1] http://lucene.apache.org/java/2_4_1/queryparsersyntax.html#NOT


      

---------------------------------------------------------------------
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