lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: SAME-opattor (possible newbie question)
Date Sun, 04 Sep 2005 23:43:17 GMT

: For example, given this data:
: author: a b c
: author: d e f
: a search for "a SAME c" would match the first row, but "a SAME d" would
: match nothing, which is what I want.

if i understand you correctly, then you are describing a use case in which
the index has two documents, each containing a single field named "author"
one of which contains the tokens "a", "b", and "c" the other containing
"d", "e", and "f"

In that case, a lucene query for "+author:a +author:c" would return the
first document, but a query for "+author:a +author:d" would return no

You should take a look at the QueryParser syntax documentation to get an
idea of the way simple searching works -- but please keep in mind that
document just explains the types of queries that can be done using the
very basic Parser provided by default with Lucene -- the scope of searches
you can execute if you progromatically generate Query objects is much


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

View raw message