-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add Multi-Field Support for Semantic Text Fields #120128
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
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.
Documentation preview: |
Pinging @elastic/search-eng (Team:SearchOrg) |
Pinging @elastic/search-relevance (Team:Search - Relevance) |
...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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
...nference/src/main/java/org/elasticsearch/xpack/inference/mapper/SemanticTextFieldMapper.java
Outdated
Show resolved
Hide resolved
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Hi @jimczi, I've created a changelog YAML for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
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.
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.