lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Exact match on a single term / word
Date Wed, 28 Jun 2006 11:55:40 GMT
What is the problem with using a TermQuery in this case?  Please  
provide some more details on the analyzer you're using (both for  
indexing and with QueryParser) and a sample of text you indexed.

	Erik


On Apr 28, 2006, at 7:36 AM, Hugh Ross wrote:

> I am trying to get Lucene to perform an exact match on a single  
> term or word
> using the default query parser. It works fine whenever I have more  
> than one
> word / term in the search string (it parses the string into a  
> PhraseQuery
> with a slop of 0 which is correct). However when the search string  
> just
> contains a single word ie "state", the query parser parses this into a
> TermQuery despite the quotes when I would have expected a phrase  
> query.
> Is there any easy way around this?
>
> Many thanks,
> Hugh
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


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