FAQ
I need to write a function that copies a MultiPhraseQuery and changes the
field the query applies to. Unfortunately the API allows access to neither
the contained terms nor the field! The other query classes I have so far
dealt with all seem to allow access to the contained query terms...

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

Search Discussions

  • Daniel Naber at Mar 6, 2006 at 9:43 pm

    On Sonntag 05 März 2006 19:03, Eric Jain wrote:

    I need to write a function that copies a MultiPhraseQuery and changes
    the field the query applies to. Unfortunately the API allows access to
    neither the contained terms nor the field! The other query classes I
    have so far dealt with all seem to allow access to the contained query
    terms...
    Please try to add this to MultiPhraseQuery and let us know if it helps:

    public List getTerms() {
    return termArrays;
    }

    Regards
    Daniel

    --
    http://www.danielnaber.de

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Erik Hatcher at Mar 6, 2006 at 9:47 pm

    On Mar 6, 2006, at 4:43 PM, Daniel Naber wrote:
    On Sonntag 05 März 2006 19:03, Eric Jain wrote:

    I need to write a function that copies a MultiPhraseQuery and changes
    the field the query applies to. Unfortunately the API allows
    access to
    neither the contained terms nor the field! The other query classes I
    have so far dealt with all seem to allow access to the contained
    query
    terms...
    Please try to add this to MultiPhraseQuery and let us know if it
    helps:

    public List getTerms() {
    return termArrays;
    }
    It would probably be better for an immutable List to be returned
    rather than the internal mutable one, just to avoid a case of the
    termArrays from being modified from outside.

    Erik



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Eric Jain at Mar 7, 2006 at 7:35 am

    Daniel Naber wrote:
    Please try to add this to MultiPhraseQuery and let us know if it helps:

    public List getTerms() {
    return termArrays;
    }
    That is indeed all I need (the list wouldn't have to be mutable though).
    Any chance this could be committed?

    Incidentally, would be helpful if the PrecedenceQueryParser instantiated
    MultiPhraseQueries via a call to an (overridable) getMultiPhraseQuery method.


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Erik Hatcher at Mar 7, 2006 at 12:01 pm

    On Mar 7, 2006, at 2:35 AM, Eric Jain wrote:
    Daniel Naber wrote:
    Please try to add this to MultiPhraseQuery and let us know if it
    helps:
    public List getTerms() {
    return termArrays;
    }
    That is indeed all I need (the list wouldn't have to be mutable
    though). Any chance this could be committed?

    Incidentally, would be helpful if the PrecedenceQueryParser
    instantiated MultiPhraseQueries via a call to an (overridable)
    getMultiPhraseQuery method.
    Since PQP is my doing, if you supply a patch for both of the above
    from svn trunk, add it to a new JIRA issue, I'd be happy to apply it.

    Erik


    ---------------------------------------------------------------------
    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
postedMar 5, '06 at 6:04p
activeMar 7, '06 at 12:01p
posts5
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase