Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-3517

Optimize the computation of total hit count

    Details

      Description

      We currently always compute the total hit count when searching, but we could avoid that in some cases, for example when the user asks only for the hits.

      Elasticsearch 7 provides the track_total_hits parameter to control that, and in Lucene we could remove the TotalHitCountCollector.

      We should also look how to take advantage of the related optimization in Lucene allowing to stop the search when it's certain it cannot find any more hits. I don't recall the name of this optimization, but it was mentioned in a presentation in the Search devroom at Fosdem 2019, in the afternoon.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              yrodiere Yoann Rodière
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: