FAQ
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: [email protected]
For additional commands, e-mail: [email protected]

Search Discussions

  • Ian Lea at Feb 18, 2011 at 11:05 am
    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 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: [email protected]
    For additional commands, e-mail: [email protected]
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
  • Ganesh at Feb 18, 2011 at 11:33 am
    Exactly. QueryParser is splitting it in to two words.
    Just build the query directly.
    TermQuery or PhraseQuery?

    Regards
    Ganesh


    ----- Original Message -----
    From: "Ian Lea" <[email protected]>
    To: <[email protected]>
    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 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: [email protected]
    For additional commands, e-mail: [email protected]
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]

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

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
  • Ian Lea at Feb 18, 2011 at 11:37 am
    You say you are indexing it as a single term, so TermQuery.

    --
    Ian.

    On Fri, Feb 18, 2011 at 11:32 AM, Ganesh wrote:
    Exactly. QueryParser is splitting it in to two words.
    Just build the query directly.
    TermQuery or PhraseQuery?

    Regards
    Ganesh


    ----- Original Message -----
    From: "Ian Lea" <[email protected]>
    To: <[email protected]>
    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 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: [email protected]
    For additional commands, e-mail: [email protected]
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]

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

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedFeb 18, '11 at 10:39a
activeFeb 18, '11 at 11:37a
posts4
users2
websitelucene.apache.org

2 users in discussion

Ganesh: 2 posts Ian Lea: 2 posts

People

Translate

site design / logo © 2023 Grokbase