Skip to content

Comments

Always do bulk scoring for rescoring when possible#139777

Merged
benwtrent merged 4 commits intoelastic:mainfrom
benwtrent:always-do-bulk-rescore
Dec 19, 2025
Merged

Always do bulk scoring for rescoring when possible#139777
benwtrent merged 4 commits intoelastic:mainfrom
benwtrent:always-do-bulk-rescore

Conversation

@benwtrent
Copy link
Member

While we do bulk scoring with prefetching with DirectIO, we should actually do bulk scoring all the time.

This adjusts our directIO capable reader to always bulk score with the random scorer provided. However, when its NOT directIO, we don't do force the prefetching. Its up to the lower level random vector scorer to determine if it wants to prefetch or not.

In extreme cases, this does reduce the overhead of rescoring (even with the current float bulk scorer).

image

vs baseline:
image

I would expect pure off heap rescoring to be even better.

@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Dec 18, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

@elasticsearchmachine
Copy link
Collaborator

Hi @benwtrent, I've created a changelog YAML for you.

Copy link
Contributor

@ChrisHegarty ChrisHegarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@benwtrent benwtrent merged commit 723199d into elastic:main Dec 19, 2025
35 checks passed
@benwtrent benwtrent deleted the always-do-bulk-rescore branch December 19, 2025 11:58
szybia added a commit to szybia/elasticsearch that referenced this pull request Dec 19, 2025
* upstream/main: (25 commits)
  Add spec for project routing CRUD REST API endpoints (elastic#139634)
  Implement AllSupportedFIeldsTestCase for TDigest (elastic#139744)
  Mute elastic#139802 (elastic#139803)
  fix(logsdb): batch bulk indexing to prevent OOM in challenge tests (elastic#139770)
  Documentation for semantic_text auto pre-filtering (elastic#139749)
  Always do bulk scoring for rescoring when possible (elastic#139777)
  Optimize script sorts that do not require query scores (elastic#139748)
  Bump versions after 9.1.9 release
  Update branches.json for 9.1.9 release
  Bump versions after 9.2.3 release
  Prune changelogs after 8.19.9 release
  Bump versions after 8.19.9 release
  Update branches.json for 8.19.9 release
  Finalize docs for v9.2.3 release (elastic#139795)
  ESQL: Added timezone support to date_format and date_parse (elastic#138517)
  Update branches.json for 9.2.3 release
  Finalize docs for v9.1.9 release (elastic#139796)
  Switch inline stats to GA in docs (elastic#139753)
  Validate license in CPS (elastic#139105)
  FIPS 140-3 support with BC FIPS 2.0.x (elastic#139319)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants