[ https://issues.apache.org/jira/browse/LUCENE-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626081#action_12626081 ]
Michael McCandless commented on LUCENE-1061: -------------------------------------------- bq. What's wrong with just subclassing QueryParser and overriding the desired methods? I think subclassing would work fine too, as long as we fix QueryParser so that instead of doing things like: {code} TermQuery q = new TermQuery(...); {code} it would do: {code} q = newTermQuery(...); {code} and then define a newTermQuery(...) method which a subclass could then override. Is that what you have in mind Erik? John does this sound OK? > Adding a factory to QueryParser to instantiate query instances > -------------------------------------------------------------- > > Key: LUCENE-1061 > URL: https://issues.apache.org/jira/browse/LUCENE-1061 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.3 > Reporter: John Wang > Fix For: 2.4 > > Attachments: 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]