Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4, 7.0
    • Component/s: Facet Module
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      For the JSON Facet API, we should be able to add a list of filters to any facet. These would be applied after any domain changes, hence useful for parent->child mapping that would otherwise match all children of any parent (SOLR-9510)

      The API should also be consistent with "filter" at the top level of the JSON Request API (examples at http://yonik.com/solr-json-request-api/ )

      1. SOLR-9681.patch
        8 kB
        Yonik Seeley
      2. SOLR-9681.patch
        6 kB
        Yonik Seeley

        Issue Links

          Activity

          Hide
          yseeley@gmail.com Yonik Seeley added a comment -

          Here's the patch I plan on committing soon.

          Show
          yseeley@gmail.com Yonik Seeley added a comment - Here's the patch I plan on committing soon.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 650276e14bd85cdd12a77956f2403369ff3465ac in lucene-solr's branch refs/heads/master from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=650276e ]

          SOLR-9681: add filters to any facet command

          Show
          jira-bot ASF subversion and git services added a comment - Commit 650276e14bd85cdd12a77956f2403369ff3465ac in lucene-solr's branch refs/heads/master from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=650276e ] SOLR-9681 : add filters to any facet command
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 05ea64a665d390d4ebbb985d0505941ef15f6d85 in lucene-solr's branch refs/heads/branch_6x from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=05ea64a ]

          SOLR-9681: add filters to any facet command

          Show
          jira-bot ASF subversion and git services added a comment - Commit 05ea64a665d390d4ebbb985d0505941ef15f6d85 in lucene-solr's branch refs/heads/branch_6x from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=05ea64a ] SOLR-9681 : add filters to any facet command
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit d8d3a8b9b8e7345c4a02a62f7e321c4e9a2440bf in lucene-solr's branch refs/heads/master from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d8d3a8b ]

          SOLR-9681:tests: add filter after block join test

          Show
          jira-bot ASF subversion and git services added a comment - Commit d8d3a8b9b8e7345c4a02a62f7e321c4e9a2440bf in lucene-solr's branch refs/heads/master from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=d8d3a8b ] SOLR-9681 :tests: add filter after block join test
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 3ada3421cda4c9d5275b559f084dbc886eee4d72 in lucene-solr's branch refs/heads/branch_6x from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3ada342 ]

          SOLR-9681:tests: add filter after block join test

          Show
          jira-bot ASF subversion and git services added a comment - Commit 3ada3421cda4c9d5275b559f084dbc886eee4d72 in lucene-solr's branch refs/heads/branch_6x from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3ada342 ] SOLR-9681 :tests: add filter after block join test
          Hide
          mkhludnev Mikhail Khludnev added a comment -

          Yonik Seeley, wouldn't be better to nest filter under domain as well it impacts input docset for faceting?

          Show
          mkhludnev Mikhail Khludnev added a comment - Yonik Seeley , wouldn't be better to nest filter under domain as well it impacts input docset for faceting?
          Hide
          yseeley@gmail.com Yonik Seeley added a comment -

          I could go either way...
          I was sort of viewing "domain" to be just about non-narrowing domain switches (filter exclusions, parent/child, block join)

          Show
          yseeley@gmail.com Yonik Seeley added a comment - I could go either way... I was sort of viewing "domain" to be just about non-narrowing domain switches (filter exclusions, parent/child, block join)
          Hide
          mkhludnev Mikhail Khludnev added a comment -

          ok. Agree. Now it can be seen as domain executed strictly before filtering and faceting.

          Show
          mkhludnev Mikhail Khludnev added a comment - ok. Agree. Now it can be seen as domain executed strictly before filtering and faceting.
          Hide
          yseeley@gmail.com Yonik Seeley added a comment - - edited

          Now that you've made me think about it... I'm definitely on the fence, and perhaps closer to the "just put it in domain" side. Anyone else have thoughts? This is the right time to think about this minor API stuff, and then stick to it for the long haul!

          Thoughts about both sides:
          "domain" is only for non-narrowing domain changes:

          • If filtering will be used a lot by itself, then it's simpler not to have to enclose it in an extra "domain"

          "domain" is for all domain changes prior to faceting:

          • If filtering will primarily be used with things like blockChildren, "domain" will already exist, and it's natural for the additional child filters to go right there.
          • The only "narrowing" way to change the domain (other than faceting itself), is "filter". There are unlikely to be others in the future, and thus having a separate class/distinction at the syntactic level does not seem important.
          Show
          yseeley@gmail.com Yonik Seeley added a comment - - edited Now that you've made me think about it... I'm definitely on the fence, and perhaps closer to the "just put it in domain" side. Anyone else have thoughts? This is the right time to think about this minor API stuff, and then stick to it for the long haul! Thoughts about both sides: "domain" is only for non-narrowing domain changes: If filtering will be used a lot by itself, then it's simpler not to have to enclose it in an extra "domain" "domain" is for all domain changes prior to faceting: If filtering will primarily be used with things like blockChildren, "domain" will already exist, and it's natural for the additional child filters to go right there. The only "narrowing" way to change the domain (other than faceting itself), is "filter". There are unlikely to be others in the future, and thus having a separate class/distinction at the syntactic level does not seem important.
          Hide
          dsmiley David Smiley added a comment -

          I think I like "filter" underneath "domain". It's clearer what is being filtered – the domain. Granted that raises the question to users as to what the "domain" is but it's something.

          Show
          dsmiley David Smiley added a comment - I think I like "filter" underneath "domain". It's clearer what is being filtered – the domain. Granted that raises the question to users as to what the "domain" is but it's something.
          Hide
          yseeley@gmail.com Yonik Seeley added a comment -

          OK, unless there are objections, I'll move "filter" to be within "domain".

          Show
          yseeley@gmail.com Yonik Seeley added a comment - OK, unless there are objections, I'll move "filter" to be within "domain".
          Hide
          yseeley@gmail.com Yonik Seeley added a comment -

          Patch attached

          Show
          yseeley@gmail.com Yonik Seeley added a comment - Patch attached
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 359f981b0e2737c3d019d0097e5be3bf76874407 in lucene-solr's branch refs/heads/master from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=359f981 ]

          SOLR-9681: move "filter" inside "domain" block

          Show
          jira-bot ASF subversion and git services added a comment - Commit 359f981b0e2737c3d019d0097e5be3bf76874407 in lucene-solr's branch refs/heads/master from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=359f981 ] SOLR-9681 : move "filter" inside "domain" block
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 8c42045f2781e44b22bf9ac8faca0b32346e5cc3 in lucene-solr's branch refs/heads/branch_6x from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8c42045 ]

          SOLR-9681: move "filter" inside "domain" block

          Show
          jira-bot ASF subversion and git services added a comment - Commit 8c42045f2781e44b22bf9ac8faca0b32346e5cc3 in lucene-solr's branch refs/heads/branch_6x from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=8c42045 ] SOLR-9681 : move "filter" inside "domain" block
          Hide
          yseeley@gmail.com Yonik Seeley added a comment -

          Change is in, thanks for the input!

          Show
          yseeley@gmail.com Yonik Seeley added a comment - Change is in, thanks for the input!
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 359f981b0e2737c3d019d0097e5be3bf76874407 in lucene-solr's branch refs/heads/apiv2 from Yonik Seeley
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=359f981 ]

          SOLR-9681: move "filter" inside "domain" block

          Show
          jira-bot ASF subversion and git services added a comment - Commit 359f981b0e2737c3d019d0097e5be3bf76874407 in lucene-solr's branch refs/heads/apiv2 from Yonik Seeley [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=359f981 ] SOLR-9681 : move "filter" inside "domain" block

            People

            • Assignee:
              yseeley@gmail.com Yonik Seeley
              Reporter:
              yseeley@gmail.com Yonik Seeley
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development