Skip to content

Fix dense_vector default index options when using BFLOAT16#145202

Merged
Mikep86 merged 14 commits intoelastic:mainfrom
Mikep86:dense-vector_bfloat16-default-index-options
Mar 31, 2026
Merged

Fix dense_vector default index options when using BFLOAT16#145202
Mikep86 merged 14 commits intoelastic:mainfrom
Mikep86:dense-vector_bfloat16-default-index-options

Conversation

@Mikep86
Copy link
Copy Markdown
Contributor

@Mikep86 Mikep86 commented Mar 30, 2026

There is a bug in the dense_vector field mapper where default index options will be set to null when the element type is BFLOAT16. This PR fixes that by handling BFLOAT16 as equivalent to FLOAT and adding a default index options test.

Fixes #145204

@Mikep86 Mikep86 requested review from a team and benwtrent March 30, 2026 14:37
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Mar 30, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

@Mikep86 Mikep86 added auto-backport Automatically create backport pull requests when merged branch:9.3 labels Mar 30, 2026
Copy link
Copy Markdown
Member

@benwtrent benwtrent left a comment

Choose a reason for hiding this comment

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

!!! :shipit: !!!

@Mikep86
Copy link
Copy Markdown
Contributor Author

Mikep86 commented Mar 30, 2026

@benwtrent @thecoop This could use another look. I had to add an index version to gate when we apply default index options to fix BwC. And we still need to backport the index version to 9.3.x...

@Mikep86
Copy link
Copy Markdown
Contributor Author

Mikep86 commented Mar 31, 2026

@elasticmachine update branch

Mikep86 added 2 commits March 31, 2026 10:40
…com:Mikep86/elasticsearch into dense-vector_bfloat16-default-index-options
@Mikep86 Mikep86 requested review from benwtrent and thecoop March 31, 2026 15:16
@Mikep86 Mikep86 merged commit d807c64 into elastic:main Mar 31, 2026
35 checks passed
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

💔 Backport failed

Status Branch Result
9.3 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 145202

szybia added a commit to szybia/elasticsearch that referenced this pull request Mar 31, 2026
…rics

* upstream/main: (21 commits)
  Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:external-basic.topSnippetsFunction} elastic#145353
  Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:external-basic.scoreFunction} elastic#145352
  [DiskBBQ] Fix bug in NeighborQueue#popRawAndAddRaw (elastic#145324)
  Fix dense_vector default index options when using BFLOAT16 (elastic#145202)
  Use checked exceptions in entitlement constructor rules (elastic#145234)
  ESQL: DS: datasource file plugins should not return TEXT types (elastic#145334)
  Plumb DLM error store through to DlmFrozenTransition classes (elastic#145243)
  Make Settings.Builder.remove() fluent (elastic#145294)
  Add FLS tests for METRICS_INFO and TS_INFO (elastic#145211)
  Fix flaky SecurityFeatureResetTests (elastic#145063)
  [DOCS] Fix conflict markers in ESQL processing command list (elastic#145338)
  Skip certain metric assertions on Windows (elastic#144933)
  [ES|QL] Add schema reconciliation for multi-file external sources (elastic#145220)
  Simplify DiskBBQ dynamic visit ratio to linear (elastic#142784)
  ESQL: Disallow unmapped_fields=load with partial non-KEYWORD (elastic#144109)
  [Transform] Track Linked Projects (elastic#144399)
  Fix bulk scoring to process last batch instead of falling through to scalar tail (elastic#145316)
  Clean up TickerScheduleEngineTests (elastic#145303)
  [CI] ShardBulkInferenceActionFilterIT testRestart - Ensuring that secrets-inference index is available after full restart and unmuting test (elastic#145317)
  Add CRUD doc to the DistributedArchitectureGuide (elastic#144710)
  ...
@Mikep86
Copy link
Copy Markdown
Contributor Author

Mikep86 commented Mar 31, 2026

💚 All backports created successfully

Status Branch Result
9.3

Questions ?

Please refer to the Backport tool documentation

Mikep86 added a commit to Mikep86/elasticsearch that referenced this pull request Mar 31, 2026
…45202)

There is a bug in the dense_vector field mapper where default index options will be set to null when the element type is BFLOAT16. This PR fixes that by handling BFLOAT16 as equivalent to FLOAT and adding a default index options test.

(cherry picked from commit d807c64)

# Conflicts:
#	server/src/main/java/org/elasticsearch/index/IndexVersions.java
#	server/src/main/java/org/elasticsearch/inference/SimilarityMeasure.java
ncordon pushed a commit to ncordon/elasticsearch that referenced this pull request Apr 1, 2026
…45202)

There is a bug in the dense_vector field mapper where default index options will be set to null when the element type is BFLOAT16. This PR fixes that by handling BFLOAT16 as equivalent to FLOAT and adding a default index options test.
mromaios pushed a commit to mromaios/elasticsearch that referenced this pull request Apr 9, 2026
…45202)

There is a bug in the dense_vector field mapper where default index options will be set to null when the element type is BFLOAT16. This PR fixes that by handling BFLOAT16 as equivalent to FLOAT and adding a default index options test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged backport pending >bug :Search Relevance/Vectors Vector search Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.3.3 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dense vector fields do not set default index options when element type is BFLOAT16

6 participants