Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-10499

Optimize SpatialHeatmapFacets DocSet to Bits conversion

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.6, 7.0
    • spatial
    • None

    Description

      Using the facet.heatmap feature will internally constructs a Bits instance (to be passed down into Lucene) from the Solr-provided DocSet. The current procedure is sometimes fine but it can be optimized:

      • if docSet is equal to SolrIndexSearcher.getLiveDocs then use a null Bits, which signals to the Lucene code that it can skip reading the postings and simply use the doc freq when there are no deleted docs either. The difference is huge.
      • if docSet has size 0 then use Bits.MatchNoBits. After LUCENE-7787 is committed, this is a fast do-nothing optimization that could otherwise take a lot of time.
      • if the docSet is not a BitDocSet then build a FixedBitSet. Presently the code wraps a Bits around the DocSet, likely a SortedIntDocSet, which is a huge performance hit for large shards when this happens – log(N) over possibly thousands of doc IDs for each doc accumulation

      (This development was funded by the Harvard Center for Geographic Analysis as part of the HHypermap project)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            dsmiley David Smiley
            dsmiley David Smiley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment