-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Adding support to exclude semantic_text subfields #127664
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
base: main
Are you sure you want to change the base?
Changes from all commits
1a3bb97
522730e
db64ad2
e333e78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 127664 | ||
summary: Exclude `semantic_text` subfields from field capabilities API | ||
area: "Mapping" | ||
type: enhancement | ||
issues: [] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -359,3 +359,23 @@ setup: | |
index: test-always-include-inference-id-index | ||
|
||
- exists: test-always-include-inference-id-index.mappings.properties.semantic_field.inference_id | ||
|
||
--- | ||
"Field caps exclude chunks and embedding fields": | ||
- requires: | ||
cluster_features: "gte_v8.16.0" | ||
reason: field_caps support for semantic_text added in 8.16.0 | ||
Comment on lines
+365
to
+367
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to define a new cluster feature? As per my understanding, these fields are not expected from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be good to create a test feature for these tests. |
||
|
||
- do: | ||
field_caps: | ||
include_empty_fields: true | ||
index: test-index | ||
fields: "*" | ||
|
||
- match: { indices: [ "test-index" ] } | ||
- exists: fields.sparse_field | ||
- exists: fields.dense_field | ||
- not_exists: fields.sparse_field.chunks.embeddings | ||
- not_exists: fields.sparse_field.chunks.offset | ||
- not_exists: fields.dense_field.chunks.embeddings | ||
- not_exists: fields.dense_field.chunks.offset |
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.
Reiterating my message offline, this is a brittle solution. We shouldn't be hard-coding field names to exclude from field caps. Instead, I recommend investigating a solution where we add a flag to
MappedFieldType
to control if a field is excluded from field caps.