lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chaiguy1337 <lo...@electricstorm.com>
Subject Re: Problem with spaces in untokenized field using QueryParser
Date Sat, 06 Dec 2008 18:06:39 GMT

Hi Daniel. Thanks for the tip. I've decided to simply intercept query strings
starting with "tag:" (since I still want to allow users to type the query
strings) and treat them as a TermQuery, as per your suggestion, rather than
passing it to QueryParser at all, and it seems to have done the trick!
Luckily I only need to do this in one case, otherwise I'd probably have to
write a custom QueryParser.

Thanks for clearing that up for me.

-Logan



Daniel Naber-10 wrote:
> 
> On Samstag, 6. Dezember 2008, chaiguy1337 wrote:
> 
>> tag:"my tag"
> 
> The QueryParser will create a phrase query from this, but for untokenized 
> fields you can only search with a TermQuery, i.e. something like this: 
> new TermQuery(new Term("tag", "my tag"))
> 
> Regards
>  Daniel
> 
> -- 
> http://www.danielnaber.de
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-spaces-in-untokenized-field-using-QueryParser-tp20866331p20872875.html
Sent from the Lucene - General mailing list archive at Nabble.com.


Mime
View raw message