Skip to content

Allow for confidence_interval:0.0 to be removed#144739

Merged
davidkyle merged 7 commits intoelastic:mainfrom
davidkyle:bwc_confidence_interval
Mar 25, 2026
Merged

Allow for confidence_interval:0.0 to be removed#144739
davidkyle merged 7 commits intoelastic:mainfrom
davidkyle:bwc_confidence_interval

Conversation

@davidkyle
Copy link
Copy Markdown
Member

@davidkyle davidkyle commented Mar 23, 2026

I suspect #143980 fails because previously confidence_interval defaulted to 0.0f if not set which meant it was always written in toXContent.

The BWC tests fail if the new node has created the index mapping without an explicit confidence_interval, the new node will not default confidence_interval so it is not written in toXContent. When the old node reads the mapping it defaults confidence_interval to 0.0 on parsing then includes that field in the toXContent representation. The assertion fails because the mapping on the new node does not contain confidence_interval but the mapping on the old node does.

java.lang.AssertionError: provided source [{"_doc":{"properties":{"another_vector":{"type":"dense_vector","dims":4,"index":true,"similarity":"l2_norm","index_options":{"type":"int4_flat","confidence_interval":0.0}},"name":{"type":"keyword"},"vector":{"type":"dense_vector","dims":4,"index":true,"similarity":"l2_norm","index_options":{"type":"int4_flat","confidence_interval":0.0}}}}}] differs from mapping [{"_doc":{"properties":{"another_vector":{"type":"dense_vector","dims":4,"index":true,"similarity":"l2_norm","index_options":{"type":"int4_flat"}},"name":{"type":"keyword"},"vector":{"type":"dense_vector","dims":4,"index":true,"similarity":"l2_norm","index_options":{"type":"int4_flat"}}}}}]

Fixes #143980

@davidkyle davidkyle added >test Issues or PRs that are addressing/adding tests test-full-bwc Trigger full BWC version matrix tests :Search Relevance/Search Catch all for Search Relevance v9.4.0 labels Mar 23, 2026
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Mar 23, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Contributor

@tteofili tteofili left a comment

Choose a reason for hiding this comment

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

LGTM

@davidkyle davidkyle removed the test-full-bwc Trigger full BWC version matrix tests label Mar 25, 2026
@davidkyle davidkyle merged commit 1444e5d into elastic:main Mar 25, 2026
35 of 36 checks passed
@davidkyle davidkyle deleted the bwc_confidence_interval branch March 25, 2026 11:16
eranweiss-elastic pushed a commit to eranweiss-elastic/elasticsearch that referenced this pull request Mar 25, 2026
seanzatzdev pushed a commit to seanzatzdev/elasticsearch that referenced this pull request Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Search Relevance/Search Catch all for Search Relevance Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch >test Issues or PRs that are addressing/adding tests v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] MixedClusterClientYamlTestSuiteIT class failing

3 participants