Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2.1
    • Fix Version/s: 5.5
    • Labels:
      None
    • Flags:
      Patch

      Description

      QueryComponent is, after all this time, still not extendable. Overriding a simple method is mostly impossible due to members being private or usage of non-public classes. Copying all code to an external class is also not going to work because of this. This patch finally allows overriding QueryComponent methods such as createMainQuery and mergeIds.

      1. SOLR-7968.patch
        21 kB
        Markus Jelsma
      2. SOLR-7968.patch
        21 kB
        Markus Jelsma

        Activity

        Hide
        Markus Jelsma added a comment -

        Patch for 5.2.1. It applies cleanly to the newly released 5.3.0 as well.

        Show
        Markus Jelsma added a comment - Patch for 5.2.1. It applies cleanly to the newly released 5.3.0 as well.
        Hide
        Noble Paul added a comment -

        Why is this marked for 5.3.1 ? looks like it's a new feature and not a bug

        Show
        Noble Paul added a comment - Why is this marked for 5.3.1 ? looks like it's a new feature and not a bug
        Hide
        Markus Jelsma added a comment -

        Yes of course, i don't know why i marked it for 5.3.1 either.

        Show
        Markus Jelsma added a comment - Yes of course, i don't know why i marked it for 5.3.1 either.
        Hide
        Markus Jelsma added a comment -

        Hello - is this something that can make it into 5.4? It is so much easier to extend QueryComponent instead of copying it as a whole.

        Show
        Markus Jelsma added a comment - Hello - is this something that can make it into 5.4? It is so much easier to extend QueryComponent instead of copying it as a whole.
        Hide
        Markus Jelsma added a comment -

        Updated patch. Applies cleanly to 5.4, tests pass.

        Show
        Markus Jelsma added a comment - Updated patch. Applies cleanly to 5.4, tests pass.
        Hide
        Markus Jelsma added a comment -

        Patch still applies to 5.4.1 source.

        Show
        Markus Jelsma added a comment - Patch still applies to 5.4.1 source.
        Hide
        David Smiley added a comment -

        Looks good. I tweaked your patch a little locally: I found one extra spot that should call the getResponseDocs() method vs the direct field... and one rename you did from "private" to "protected" was in a comment that didn't make sense to rename... and I optimized some imports. I'll be committing shortly.

        Thanks for contributing Markus!

        Show
        David Smiley added a comment - Looks good. I tweaked your patch a little locally: I found one extra spot that should call the getResponseDocs() method vs the direct field... and one rename you did from "private" to "protected" was in a comment that didn't make sense to rename... and I optimized some imports. I'll be committing shortly. Thanks for contributing Markus!
        Hide
        ASF subversion and git services added a comment -

        Commit 4cdce3db77cde2506ac77dc9ced8c1f91ed9800f in lucene-solr's branch refs/heads/master from David Smiley
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4cdce3d ]

        SOLR-7968: Make QueryComponent extensible

        Show
        ASF subversion and git services added a comment - Commit 4cdce3db77cde2506ac77dc9ced8c1f91ed9800f in lucene-solr's branch refs/heads/master from David Smiley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4cdce3d ] SOLR-7968 : Make QueryComponent extensible
        Hide
        ASF subversion and git services added a comment -

        Commit ef2fda90b6f3aea131c83f3ca49b47abb00b920f in lucene-solr's branch refs/heads/branch_5x from David Smiley
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ef2fda9 ]

        SOLR-7968: Make QueryComponent extensible

        Show
        ASF subversion and git services added a comment - Commit ef2fda90b6f3aea131c83f3ca49b47abb00b920f in lucene-solr's branch refs/heads/branch_5x from David Smiley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=ef2fda9 ] SOLR-7968 : Make QueryComponent extensible
        Hide
        ASF subversion and git services added a comment -

        Commit 4cdce3db77cde2506ac77dc9ced8c1f91ed9800f in lucene-solr's branch refs/heads/master-solr-8621 from David Smiley
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4cdce3d ]

        SOLR-7968: Make QueryComponent extensible

        Show
        ASF subversion and git services added a comment - Commit 4cdce3db77cde2506ac77dc9ced8c1f91ed9800f in lucene-solr's branch refs/heads/master-solr-8621 from David Smiley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=4cdce3d ] SOLR-7968 : Make QueryComponent extensible

          People

          • Assignee:
            David Smiley
            Reporter:
            Markus Jelsma
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development