lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
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
results.

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

	http://lucene.apache.org/java/docs/queryparsersyntax.html



-Hoss


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