Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      Conceptually very similar to the previous sibling issues about hanging stats of pivots & ranges: using a "tag" on facet.range requests, we make it possible to hang a range off the nodes of Pivots.

      Example...

      facet.pivot={!range=r1}category,manufacturer
      facet.range={tag=r1}price
      

      ...with the request above, in addition to computing range facets over the price field for the entire result set, the PivotFacet component will also include all of those ranges for every node of the tree it builds up when generating a pivot of the fields "category,manufacturer"

      This should easily be combinable with the other sibling tasks to hang stats off ranges which hang off pivots. (see parent issue for example)

        Issue Links

          Activity

          Hide
          Hoss Man added a comment -

          Proposed implementation...

          • Modify the Pivot facet code to check for a "range" local param
          • if a range tag name is specified, each time a NamedList<Integer> of "top" terms is computed at a given level of the pivot tree (either single node or shard request), each of those terms should be applied as a filter on the main doc set - the result should be used to construct a SimpleFacets object
          • then SimpleFacets should be asked to compute the neccessary range facets based on the tags.
            • SimpleFacets will need some refactoring..
              • it should probably be changed so instead of all the stateless processing it does (see the "// per-facet values" variables that get re-used by each method) it should have structures for modeling each of the types of faceting based on the params it's constructed with, and callers (like the pivot faceting code) should be able to ask it for the "facet.ranges" it knows about so it can inspect them for the tags it cares about and then call some method to compute the range facet results.
            • the "// Distributed facet_ranges" logic in FacetComponent will also need refactored into some helper method accessible to the PivotFacet code, so it can merge the per-pivot-constraint range results from each shard
          Show
          Hoss Man added a comment - Proposed implementation... Modify the Pivot facet code to check for a "range" local param if a range tag name is specified, each time a NamedList<Integer> of "top" terms is computed at a given level of the pivot tree (either single node or shard request), each of those terms should be applied as a filter on the main doc set - the result should be used to construct a SimpleFacets object then SimpleFacets should be asked to compute the neccessary range facets based on the tags. SimpleFacets will need some refactoring.. it should probably be changed so instead of all the stateless processing it does (see the " // per-facet values " variables that get re-used by each method) it should have structures for modeling each of the types of faceting based on the params it's constructed with, and callers (like the pivot faceting code) should be able to ask it for the "facet.ranges" it knows about so it can inspect them for the tags it cares about and then call some method to compute the range facet results. the " // Distributed facet_ranges " logic in FacetComponent will also need refactored into some helper method accessible to the PivotFacet code, so it can merge the per-pivot-constraint range results from each shard
          Hide
          Steve Molloy added a comment -

          See latest patch on SOLR-4212 which covers both facet queries and facet ranges. Did not tackle refactoring of SImpleFacets, but have working solution that should at least provide basis on which to build.

          Show
          Steve Molloy added a comment - See latest patch on SOLR-4212 which covers both facet queries and facet ranges. Did not tackle refactoring of SImpleFacets, but have working solution that should at least provide basis on which to build.
          Hide
          ASF subversion and git services added a comment -

          Commit 1689802 from shalin@apache.org in branch 'dev/trunk'
          [ https://svn.apache.org/r1689802 ]

          SOLR-4212: SOLR-6353: Let facet queries and facet ranges hang off of pivots

          Show
          ASF subversion and git services added a comment - Commit 1689802 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1689802 ] SOLR-4212 : SOLR-6353 : Let facet queries and facet ranges hang off of pivots
          Hide
          ASF subversion and git services added a comment -

          Commit 1689839 from shalin@apache.org in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1689839 ]

          SOLR-4212: SOLR-6353: Let facet queries and facet ranges hang off of pivots

          Show
          ASF subversion and git services added a comment - Commit 1689839 from shalin@apache.org in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1689839 ] SOLR-4212 : SOLR-6353 : Let facet queries and facet ranges hang off of pivots
          Hide
          ASF subversion and git services added a comment -

          Commit 1689840 from shalin@apache.org in branch 'dev/trunk'
          [ https://svn.apache.org/r1689840 ]

          SOLR-4212: SOLR-6353: Added attribution in changes.txt

          Show
          ASF subversion and git services added a comment - Commit 1689840 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1689840 ] SOLR-4212 : SOLR-6353 : Added attribution in changes.txt
          Hide
          ASF subversion and git services added a comment -

          Commit 1689841 from shalin@apache.org in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1689841 ]

          SOLR-4212: SOLR-6353: Added attribution in changes.txt

          Show
          ASF subversion and git services added a comment - Commit 1689841 from shalin@apache.org in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1689841 ] SOLR-4212 : SOLR-6353 : Added attribution in changes.txt
          Hide
          Shalin Shekhar Mangar added a comment -

          Thanks Steve and Hoss!

          Show
          Shalin Shekhar Mangar added a comment - Thanks Steve and Hoss!
          Hide
          Shalin Shekhar Mangar added a comment -

          Bulk close for 5.3.0 release

          Show
          Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

            People

            • Assignee:
              Shalin Shekhar Mangar
              Reporter:
              Hoss Man
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development