Solr
  1. Solr
  2. SOLR-1966

QueryElevationComponent: Add option to return only the specified results

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      Given a query that matches in the QueryElevationComponent, add an option that allows only those results to be returned.

      1. SOLR-1966.patch
        1 kB
        Yonik Seeley
      2. SOLR-1966.patch
        6 kB
        Grant Ingersoll

        Activity

        Grant Ingersoll created issue -
        Grant Ingersoll made changes -
        Field Original Value New Value
        Assignee Grant Ingersoll [ gsingers ]
        Hide
        Yonik Seeley added a comment -

        Does everything act as if only the elevated docs matched? For example, faceting results are only on elevated docs?

        Show
        Yonik Seeley added a comment - Does everything act as if only the elevated docs matched? For example, faceting results are only on elevated docs?
        Hide
        Grant Ingersoll added a comment - - edited

        Yes, for this case, I think if one invokes the option to get only the specified results then all downstream values should reflect that.

        I wonder if it's worth considering putting it in the default list with it off by default.

        Show
        Grant Ingersoll added a comment - - edited Yes, for this case, I think if one invokes the option to get only the specified results then all downstream values should reflect that. I wonder if it's worth considering putting it in the default list with it off by default.
        Hide
        Yonik Seeley added a comment -

        The problem with this is the fact that the QEC is not required to come immediately after the QueryComponent.

        If that is indeed a problem, it's not related to this issue is it?
        AFAIK, The QEC can already change the documents that match the base doc set for faceting.

        Show
        Yonik Seeley added a comment - The problem with this is the fact that the QEC is not required to come immediately after the QueryComponent. If that is indeed a problem, it's not related to this issue is it? AFAIK, The QEC can already change the documents that match the base doc set for faceting.
        Hide
        Grant Ingersoll added a comment -

        So, the simple thing to do here is to add an filter query, but that seems wrong since why even go through all that work when we know the exact results that should be returned? Of course, that assumes that all the docs are actually in the index.

        Show
        Grant Ingersoll added a comment - So, the simple thing to do here is to add an filter query, but that seems wrong since why even go through all that work when we know the exact results that should be returned? Of course, that assumes that all the docs are actually in the index.
        Hide
        Grant Ingersoll added a comment -

        If that is indeed a problem, it's not related to this issue is it?

        Yeah, I misspoke and have since deleted that comment. QEC works in the prepare phase, thus I believe it should do the right thing downstream regardless of it's configuration

        Show
        Grant Ingersoll added a comment - If that is indeed a problem, it's not related to this issue is it? Yeah, I misspoke and have since deleted that comment. QEC works in the prepare phase, thus I believe it should do the right thing downstream regardless of it's configuration
        Hide
        Yonik Seeley added a comment -

        Probably just replace the base query rather than adding onto it. Something like this...

        Show
        Yonik Seeley added a comment - Probably just replace the base query rather than adding onto it. Something like this...
        Yonik Seeley made changes -
        Attachment SOLR-1966.patch [ 12448445 ]
        Hide
        Grant Ingersoll added a comment -

        works for me. I've got the test hooked up. I'll incorporate yours and then put up a patch and then likely commit.

        Show
        Grant Ingersoll added a comment - works for me. I've got the test hooked up. I'll incorporate yours and then put up a patch and then likely commit.
        Hide
        Grant Ingersoll added a comment -

        Incorporates Yonik's patch, moves params out to common.QueryElevationParams and adds a unit test for the "exclusive" operator.

        Show
        Grant Ingersoll added a comment - Incorporates Yonik's patch, moves params out to common.QueryElevationParams and adds a unit test for the "exclusive" operator.
        Grant Ingersoll made changes -
        Attachment SOLR-1966.patch [ 12448446 ]
        Hide
        Grant Ingersoll added a comment -

        Committed revision 959434 to trunk.

        Committed revision 959437 to 3.x.

        Show
        Grant Ingersoll added a comment - Committed revision 959434 to trunk. Committed revision 959437 to 3.x.
        Grant Ingersoll made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.1 [ 12314371 ]
        Fix Version/s 4.0 [ 12314992 ]
        Resolution Fixed [ 1 ]
        Hide
        Grant Ingersoll added a comment -

        Bulk close for 3.1.0 release

        Show
        Grant Ingersoll added a comment - Bulk close for 3.1.0 release
        Grant Ingersoll made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Grant Ingersoll
            Reporter:
            Grant Ingersoll
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development