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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to