FAQ
Hi all,

I have recently shifted to creating queries programmatically rather than
using the QueryParser as this gave me more flexibility. I am facing a
new problem, though: when indexing my fields are being analyzed (on a
per-field basis: most are being stemmed etc, some are keywords returned
as it is), but the query doesn't get analyzed as I construct it myself.
This means that many legitimate documents don't come up as results.

Is there any way to run my Query object through my analyzer? Or is there
another solution?

Thanks in advance,
Venu



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Search Discussions

  • Erik Hatcher at May 18, 2006 at 1:39 pm

    On May 18, 2006, at 8:08 AM, Satuluri, Venu_Madhav wrote:
    Is there any way to run my Query object through my analyzer? Or is
    there
    another solution?
    But of course. Have a look at the source code to
    QueryParser.getFieldQuery() - it does this very thing. I'm glad to
    see more folks creating queries programatically using a blend of
    QueryParser, analysis, or just plain ol' StringTokenizer. The
    expressiveness of queries is of the utmost importance, and
    QueryParser is pretty BASIC. Most of the applications I've worked on
    have used custom techniques for creating the Query.

    Erik


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
  • Satuluri, Venu_Madhav at May 18, 2006 at 3:28 pm
    Thanks very much Erik. The QueryParser method was pretty useful in
    writing my own one.

    -Venu

    -----Original Message-----
    From: Erik Hatcher
    Sent: Thursday, May 18, 2006 7:09 PM
    To: [email protected]
    Subject: Re: How to do analysis when creating a query programmatically?


    On May 18, 2006, at 8:08 AM, Satuluri, Venu_Madhav wrote:
    Is there any way to run my Query object through my analyzer? Or is
    there
    another solution?
    But of course. Have a look at the source code to
    QueryParser.getFieldQuery() - it does this very thing. I'm glad to
    see more folks creating queries programatically using a blend of
    QueryParser, analysis, or just plain ol' StringTokenizer. The
    expressiveness of queries is of the utmost importance, and
    QueryParser is pretty BASIC. Most of the applications I've worked on
    have used custom techniques for creating the Query.

    Erik


    ---------------------------------------------------------------------
    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
postedMay 18, '06 at 12:08p
activeMay 18, '06 at 3:28p
posts3
users2
websitelucene.apache.org

People

Translate

site design / logo © 2023 Grokbase