You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Eric Jain <Er...@isb-sib.ch> on 2006/03/05 19:03:10 UTC
MultiPhraseQuery
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
Re: MultiPhraseQuery
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
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
Re: MultiPhraseQuery
Posted by Eric Jain <Er...@isb-sib.ch>.
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
Re: MultiPhraseQuery
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
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
Re: MultiPhraseQuery
Posted by Daniel Naber <lu...@danielnaber.de>.
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