lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wettin <karl.wet...@gmail.com>
Subject Re: Looking for "Exact match but no other terms"... how to express it?
Date Tue, 30 Oct 2007 16:38:17 GMT

30 okt 2007 kl. 16.58 skrev Tobias Hill:

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

There is no such feature in Lucene, however you could add prefix and  
suffix tokens to your index and include these in your search, for  
instance "^ foo bar dot alu $". This will however mess up your  
SpanFirst-queries.


-- 
karl

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