lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Updated: (LUCENE-1061) Adding a factory to QueryParser to instantiate query instances
Date Thu, 28 Aug 2008 09:59:45 GMT


Michael McCandless updated LUCENE-1061:

    Attachment: LUCENE-1061.patch

bq. The hoops we jump through because we're in Java.... sheesh.  :)

Alas, yes... maybe we should all switch to Erlang!  ;)

bq. What might be even more interesting is to make the newXXX methods return Query instead
of a specific type. I'm not sure if that would work in all cases (surely not for BooleanQuery),
but might for most of 'em.

OK I was able to do this with many of them -- attached new patch.  Only PhraseQuery, MultiPhraseQuery,
BooleanQuery/Clause required strong typing.  All others now return Query.

> Adding a factory to QueryParser to instantiate query instances
> --------------------------------------------------------------
>                 Key: LUCENE-1061
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: QueryParser
>    Affects Versions: 2.3
>            Reporter: John Wang
>            Assignee: Michael McCandless
>             Fix For: 2.4
>         Attachments: LUCENE-1061.patch, LUCENE-1061.patch, lucene_patch.txt
> With the new efforts with Payload and scoring functions, it would be nice to plugin custom
query implementations while using the same QueryParser.
> Included is a patch with some refactoring the QueryParser to take a factory that produces
query instances.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message