Skip to content

[8.19] Add index_options to semantic_text field mappings (#119967) #129626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 18, 2025

Conversation

kderusso
Copy link
Member

Replaces #129587

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

kderusso added 2 commits June 17, 2025 15:18
* Add index_options parameter to semantic_text field mapping

* Cleanup & tests

* Update docs

* Update docs/changelog/119967.yaml

* Addressed some PR feedbak

* Update yaml tests

* Refactoring

* Cleanup

* Fix some tests

* Hack in inferring text_embedding task type from index options

* [CI] Auto commit changes from spotless

* Fix error inferring model settings

* Update docs

* Update tests

* Update docs/reference/mapping/types/semantic-text.asciidoc

Co-authored-by: Mike Pellegrini <mike.pellegrini@elastic.co>

* Address some minor PR feedback

* Remove partial model_settings with inferred task type

* Cleanup

* Remove unnecessary changes

* Fix errors from merge

* [CI] Auto commit changes from spotless

* Cleanup

* Checkpoint, saving changes before merge

* Update parsing

* [CI] Auto commit changes from spotless

* Stash changes

* Fix compile errors

* [CI] Auto commit changes from spotless

* Cleanup error

* fix test

* fix test

* Fix another test

* A bit of cleanup

* Fix tests

* Spotless

* Respect index options if set over defaults

* Cleanup

* [CI] Auto commit changes from spotless

* Support updating to compatible versions, add some cleanup and validation

* Remove test that can't be done here - needs to be unit test

* Add validation

* Cleanup

* Fix some yaml tests

* [CI] Auto commit changes from spotless

* Happy path early index validation works now; edge cases surrounding default BBQ remain

* Always emit index options, even when using defaults

* Minor cleanup

* Fix test compilation failures

* Fix some tests

* Continue to iterate on test failures

* Remove index options from inference field metadata as it is only needed at field creation time

* Fix some tests

* Remove transport version, no longer needed

* Fix yaml tests

* Add tests

* IndexOptions don't need to implement Writeable

* [CI] Auto commit changes from spotless

* Refactor - move SemanticTextIndexOptions

* Remove writeable

* Move index_options parsing to semantic text field mapper

* Cleanup

* Fix test compilation issue

* Cleanup

* Remove whitespace

* Remove writeables from index options

* Disable merging null options?

* Add docs

* [CI] Auto commit changes from spotless

* Revert "Disable merging null options?"

This reverts commit 2ef8b1d.

* Remove default serialization

* Include default index option type to defaults

* [CI] Auto commit changes from spotless

* Go back to allowing null updateS

* Cleanup

* Fix validation error

* Revert "Include default index option type to defaults"

This reverts commit b08e2a1.

* Update tests

* Revert "Update tests"

This reverts commit aedfafe.

* Better fix for null inputs

* Remove redundant merge validation

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
Co-authored-by: Mike Pellegrini <mike.pellegrini@elastic.co>
(cherry picked from commit 813814b)

# Conflicts:
#	docs/reference/elasticsearch/mapping-reference/semantic-text.md
#	server/src/main/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapper.java
#	x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapper.java
#	x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapperTests.java
@kderusso kderusso merged commit 5249133 into elastic:8.19 Jun 18, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants