lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: Looking for "Exact match but no other terms"... how to express it?
Date Tue, 30 Oct 2007 16:55:53 GMT
On Tuesday 30 October 2007 16:58:09 Tobias Hill wrote:
> I want to match on the exact phrase "foo bar dot" on a
> specific field on my set of documents.
> I only want results where that field has exactly "foo bar dot"
> and no more terms. I.e. A document with "foo bar dot alu"
> should not match.
> A phrase query with slop 0 seems resonable but how do I
> express "but nothing more than these terms".

Another way to do this is by indexing a special begin and end token before and 
after the tokens of the field, and by extending your queries with these 
special tokens, for example: "=begin= foo bar dot =end=" .

Paul Elschot

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

View raw message