Solr
  1. Solr
  2. SOLR-8222

Optimize count-only faceting when there are many expected matches-per-ord

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4
    • Component/s: Facet Module
    • Labels:
      None

      Description

      This optimization for the JSON Facet API came up a few months ago on the mailing list (I think by Toke).
      Basically, if one expects many hits per bucket, use a temporary array to accumulate segment ords and map them all at the end to global ords. This saves redundant segOrd->globalOrd mappings at the cost of having to scan the temp array.

      1. SOLR-8222.patch
        18 kB
        Yonik Seeley
      2. SOLR-8222.patch
        16 kB
        Yonik Seeley
      3. SOLR-8222.patch
        14 kB
        Yonik Seeley

        Activity

        Hide
        Yonik Seeley added a comment -

        Here's a draft patch that implements this optimization for single valued fields.

        Show
        Yonik Seeley added a comment - Here's a draft patch that implements this optimization for single valued fields.
        Hide
        Yonik Seeley added a comment -

        Here's an updated patch that also implements the optimization for multi-valued fields.

        Show
        Yonik Seeley added a comment - Here's an updated patch that also implements the optimization for multi-valued fields.
        Hide
        Yonik Seeley added a comment -

        Performance increase faceting 5M docs:
        Field with 10 unique values: +31%
        Field with 100 unique values: +29%
        Field with 1000 unique values: +59%
        Field with 10000 unique values: +88%
        Field with 1M unique values: +115%

        Show
        Yonik Seeley added a comment - Performance increase faceting 5M docs: Field with 10 unique values: +31% Field with 100 unique values: +29% Field with 1000 unique values: +59% Field with 10000 unique values: +88% Field with 1M unique values: +115%
        Hide
        ASF subversion and git services added a comment -

        Commit 1712608 from Yonik Seeley in branch 'dev/trunk'
        [ https://svn.apache.org/r1712608 ]

        SOLR-8222: optimize method=dv faceting for counts

        Show
        ASF subversion and git services added a comment - Commit 1712608 from Yonik Seeley in branch 'dev/trunk' [ https://svn.apache.org/r1712608 ] SOLR-8222 : optimize method=dv faceting for counts
        Hide
        ASF subversion and git services added a comment -

        Commit 1712611 from Yonik Seeley in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1712611 ]

        SOLR-8222: optimize method=dv faceting for counts

        Show
        ASF subversion and git services added a comment - Commit 1712611 from Yonik Seeley in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1712611 ] SOLR-8222 : optimize method=dv faceting for counts

          People

          • Assignee:
            Yonik Seeley
            Reporter:
            Yonik Seeley
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development