Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7994

Use int/int hash map for int taxonomy facet counts

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2, 8.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Int taxonomy facets today always count into a dense int[], which is wasteful in cases where the number of unique facet labels is high and the size of the current result set is small.

      I factored the native hash map from LUCENE-7927 and use a simple heuristic (customizable by the user by subclassing) to decide up front whether to count sparse or dense. I also made loading of the large children and siblings int[] lazy, so that they are only instantiated if you really need them.

        Attachments

        1. LUCENE-7994.patch
          30 kB
          Michael McCandless
        2. LUCENE-7994.patch
          38 kB
          Michael McCandless

          Activity

            People

            • Assignee:
              mikemccand Michael McCandless
              Reporter:
              mikemccand Michael McCandless
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: