FAQ
Hello list,

I want to know if a human written query passed through the
QueryParser is "clean" from fields, boolean clauses and query
indicators. Easy way out would of course to add a boolean that resets
at ReInit(), but maybe there is a smart way to do it. Perhaps it is
possible to treat the retuned Query as a composite pattern (i.e.
query.iterateNonRewrittenParts())?

The plan is to avoid making suggestions on meta data in the query.
"+name:foo" should suggest on "foo" only, and not "+name:foo". I
initially tried to work the enumerateTerms, but realised this is
hopeless(?) as a rewritten query looks quite different.

Perhaps I'm attacking this from the wrong angle?

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

Search Discussions

  • Chris Lu at Apr 14, 2006 at 3:42 pm
    tried MultiFieldQueryParser?

    Chris Lu
    ---------------------------------------
    Full-Text Lucene Search on Any Databases
    http://www.dbsight.net
    Faster to Setup than reading marketing materials!
    On 4/14/06, karl wettin wrote:
    Hello list,

    I want to know if a human written query passed through the
    QueryParser is "clean" from fields, boolean clauses and query
    indicators. Easy way out would of course to add a boolean that resets
    at ReInit(), but maybe there is a smart way to do it. Perhaps it is
    possible to treat the retuned Query as a composite pattern (i.e.
    query.iterateNonRewrittenParts())?

    The plan is to avoid making suggestions on meta data in the query.
    "+name:foo" should suggest on "foo" only, and not "+name:foo". I
    initially tried to work the enumerateTerms, but realised this is
    hopeless(?) as a rewritten query looks quite different.

    Perhaps I'm attacking this from the wrong angle?

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Karl wettin at Apr 14, 2006 at 3:46 pm
    14 apr 2006 kl. 17.41 skrev Chris Lu:
    On 4/14/06, karl wettin wrote:

    I want to know if a human written query passed through the
    QueryParser is "clean" from fields, boolean clauses and query
    indicators. Easy way out would of course to add a boolean that resets
    at ReInit(), but maybe there is a smart way to do it. Perhaps it is
    possible to treat the retuned Query as a composite pattern (i.e.
    query.iterateNonRewrittenParts())?
    tried MultiFieldQueryParser?
    How do you mean that it can help? I'm not sure if you understood my
    question or if MultiFieldQueryParser has some features I'm unaware of.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Chris Lu at Apr 14, 2006 at 4:05 pm
    Sorry, really misunderstood you. And you already know Lucene a lot. :)

    Basically you want to restore the original query from the Query
    object. But it may have already passed a lot of composition, like
    Boolean, Span, Wildcard.

    I don't feel it's possible to reconstruct the original human query.

    Chris Lu
    ---------------------------------------
    Full-Text Lucene Search on Any Databases
    http://www.dbsight.net
    Faster to Setup than reading marketing materials!

    On 4/14/06, karl wettin wrote:

    14 apr 2006 kl. 17.41 skrev Chris Lu:
    On 4/14/06, karl wettin wrote:

    I want to know if a human written query passed through the
    QueryParser is "clean" from fields, boolean clauses and query
    indicators. Easy way out would of course to add a boolean that resets
    at ReInit(), but maybe there is a smart way to do it. Perhaps it is
    possible to treat the retuned Query as a composite pattern (i.e.
    query.iterateNonRewrittenParts())?
    tried MultiFieldQueryParser?
    How do you mean that it can help? I'm not sure if you understood my
    question or if MultiFieldQueryParser has some features I'm unaware of.

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedApr 14, '06 at 2:25p
activeApr 14, '06 at 4:05p
posts4
users2
websitelucene.apache.org

2 users in discussion

Karl wettin: 2 posts Chris Lu: 2 posts

People

Translate

site design / logo © 2022 Grokbase