Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7560

Can we make QueryBuilder.createFieldQuery un-final?

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4, 7.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      It's marked final, I assume because we want people who customize their query parsers to only override newXXXQuery instead.

      But for deeper query parser customization, like using exploring consuming a graph and creating a TermAutomatonQuery, or a union of PhraseQuery, etc., it is not possible today and one must fork the class.

      1. LUCENE-7560.patch
        4 kB
        Michael McCandless

        Activity

        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit bb3278dd1797a45e06e7c03445ead75bad09828b in lucene-solr's branch refs/heads/master from Mike McCandless
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=bb3278d ]

        LUCENE-7560: make QueryBuilder.analyzeXXX methods protected

        Show
        jira-bot ASF subversion and git services added a comment - Commit bb3278dd1797a45e06e7c03445ead75bad09828b in lucene-solr's branch refs/heads/master from Mike McCandless [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=bb3278d ] LUCENE-7560 : make QueryBuilder.analyzeXXX methods protected
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 5d5e2749629c7f77e1a0b09cab3b4bffd0721348 in lucene-solr's branch refs/heads/branch_6x from Mike McCandless
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5d5e274 ]

        LUCENE-7560: make QueryBuilder.analyzeXXX methods protected

        Show
        jira-bot ASF subversion and git services added a comment - Commit 5d5e2749629c7f77e1a0b09cab3b4bffd0721348 in lucene-solr's branch refs/heads/branch_6x from Mike McCandless [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=5d5e274 ] LUCENE-7560 : make QueryBuilder.analyzeXXX methods protected
        Hide
        mikemccand Michael McCandless added a comment -

        Patch, making private methods protected.

        I also added a warning in the javadocs for createFieldQuery warning that typically you should not need to override it.

        Show
        mikemccand Michael McCandless added a comment - Patch, making private methods protected. I also added a warning in the javadocs for createFieldQuery warning that typically you should not need to override it.
        Hide
        mikemccand Michael McCandless added a comment -

        I'd like to also make some private methods protected so createFieldQuery can invoke them...

        Show
        mikemccand Michael McCandless added a comment - I'd like to also make some private methods protected so createFieldQuery can invoke them...
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 55f10e9060cd8c658149a051121b7584e75d5b2f in lucene-solr's branch refs/heads/branch_6x from Mike McCandless
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=55f10e9 ]

        LUCENE-7560: make QueryBuilder.createFieldQuery not final anymore

        Show
        jira-bot ASF subversion and git services added a comment - Commit 55f10e9060cd8c658149a051121b7584e75d5b2f in lucene-solr's branch refs/heads/branch_6x from Mike McCandless [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=55f10e9 ] LUCENE-7560 : make QueryBuilder.createFieldQuery not final anymore
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit d675518da418af68645c48a5254d70b081d76c3d in lucene-solr's branch refs/heads/master from Mike McCandless
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d675518 ]

        LUCENE-7560: make QueryBuilder.createFieldQuery not final anymore

        Show
        jira-bot ASF subversion and git services added a comment - Commit d675518da418af68645c48a5254d70b081d76c3d in lucene-solr's branch refs/heads/master from Mike McCandless [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d675518 ] LUCENE-7560 : make QueryBuilder.createFieldQuery not final anymore
        Hide
        teofili Tommaso Teofili added a comment -

        +1

        Show
        teofili Tommaso Teofili added a comment - +1
        Hide
        jpountz Adrien Grand added a comment -

        +1

        Show
        jpountz Adrien Grand added a comment - +1

          People

          • Assignee:
            Unassigned
            Reporter:
            mikemccand Michael McCandless
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development