--- On Tue, 8/25/09, Henric Müller <hen...@trillian.se> wrote:
> From: Henric Müller <hen...@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-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org