Exactly. QueryParser is splitting it in to two words. 

>>Just build the query directly.
TermQuery or PhraseQuery?

Regards
Ganesh 


----- Original Message ----- 
From: "Ian Lea" <ian....@gmail.com>
To: <java-user@lucene.apache.org>
Sent: Friday, February 18, 2011 4:34 PM
Subject: Re: Keyword Analyzer


Presumably because without the quotes the parser is splitting it up
into 2 terms.  Why bother parsing it?  Just build the query directly.


--
Ian.


On Fri, Feb 18, 2011 at 10:38 AM, Ganesh <emailg...@yahoo.co.in> wrote:
> Hello all,
>
> I am using Keyword analyzer to index a field and while using queryparser, I 
> am using the same analyzer. I am indexing the text Hello world and while 
> searching using queryparser.parse it is not returning me any results. I need 
> to use the text within the codes qp.parse("Hello world");
>
> My question is why i need to give the text within codes (basically as a 
> phrase). While indexing i have not given and it is indexing as single term 
> and while searching also it should consider the complete text as single term.
>
> Regards
> Ganesh
> Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download 
> Now! http://messenger.yahoo.com/download.php
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download 
Now! http://messenger.yahoo.com/download.php

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to