Add Multi-Field Support for Semantic Text Fields#120128
Merged
jimczi merged 8 commits intoelastic:mainfrom Jan 21, 2025
Merged
Conversation
Semantic text fields now support multi-fields, either as part of a multi-field structure or containing multi-fields internally. This enhancement aligns with the semantic text field's current behavior as a standard text field. Note: Multi-field support is only available for the new index format. Attempting to set a multi-field on an index created with the older format will still result in a failure.
Contributor
|
Documentation preview: |
Collaborator
|
Pinging @elastic/search-eng (Team:SearchOrg) |
Collaborator
|
Pinging @elastic/search-relevance (Team:Search - Relevance) |
kderusso
reviewed
Jan 14, 2025
...e/src/yamlRestTest/resources/rest-api-spec/test/inference/10_semantic_text_field_mapping.yml
Show resolved
Hide resolved
...nference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapper.java
Outdated
Show resolved
Hide resolved
| PUT test-index/_bulk | ||
| {"update": {"_id": "1"}} | ||
| {"doc": {"infer_field": "updated inference field", "source_field": "updated source field"}} | ||
| PUT test-index |
Mikep86
reviewed
Jan 15, 2025
...nference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapper.java
Show resolved
Hide resolved
Comment on lines
+187
to
+189
| The semantic_text field type can serve as the target of <<copy-to,copy_to fields>>, | ||
| be part of a <<multi-fields,multi-field>> structure, or contain <<multi-fields,multi-fields>> internally. | ||
| This means you can use a single field to collect the values of other fields for semantic search. |
Contributor
There was a problem hiding this comment.
Can we update the docs to indicate that semantic_text can now be a copy_to source?
...nference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapper.java
Outdated
Show resolved
Hide resolved
...nference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapper.java
Outdated
Show resolved
Hide resolved
...e/src/yamlRestTest/resources/rest-api-spec/test/inference/10_semantic_text_field_mapping.yml
Show resolved
Hide resolved
...e/src/yamlRestTest/resources/rest-api-spec/test/inference/10_semantic_text_field_mapping.yml
Show resolved
Hide resolved
Collaborator
|
Hi @jimczi, I've created a changelog YAML for you. |
jimczi
added a commit
to jimczi/elasticsearch
that referenced
this pull request
Jan 21, 2025
Semantic text fields now support multi-fields, either as part of a multi-field structure or containing multi-fields internally. This enhancement aligns with the semantic text field's current behavior as a standard text field. Note: Multi-field support is only available for the new index format. Attempting to set a multi-field on an index created with the older format will still result in a failure.
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jan 21, 2025
Semantic text fields now support multi-fields, either as part of a multi-field structure or containing multi-fields internally. This enhancement aligns with the semantic text field's current behavior as a standard text field. Note: Multi-field support is only available for the new index format. Attempting to set a multi-field on an index created with the older format will still result in a failure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Semantic text fields now support multi-fields, either as part of a multi-field structure or containing multi-fields internally. This enhancement aligns with the semantic text field's current behavior as a standard text field.
Note: Multi-field support is only available for the new index format. Attempting to set a multi-field on an index created with the older format will still result in a failure.