Skip to content

Set track_total_hits: false for Elasticsearch #4472

Description

@jpountz

By default, Elasticsearch starts by evaluating hits exhaustively, until it hits track_total_hits matches (default: 10,000), and then kicks off dynamic pruning via block-max MAXSCORE/WAND.

The motivation behind this behavior is to enable applications to paginate through results easily, e.g. you shouldn't put a link to the 7th page if you display 20 hits per page and your query only has 100 hits (so 5 pages). Looking at docs, it doesn't look like Vespa does something similar, so the ecommerce_hybrid_search should probably disable hit count tracking with Elasticsearch by setting track_total_hits to false (which means the same as 0)? See https://www.elastic.co/docs/solutions/search/the-search-api#track-total-hits.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions