-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
bugSomething isn't workingSomething isn't workingv2.18.0Issues and PRs related to version 2.18.0Issues and PRs related to version 2.18.0v3.0.0Issues and PRs related to version 3.0.0Issues and PRs related to version 3.0.0
Description
Describe the bug
A search_as_you_type field accepts sub-fields in its mapping definition, but they are silently ignored. This issues has bee reported in elasticsearch here (elastic/elasticsearch#56326) and has been fixed here (elastic/elasticsearch#82430)
To Reproduce
Create field title of type search_as_you_type with sub-field sortable
PUT my_test
{
"mappings": {
"properties": {
"title": {
"type": "search_as_you_type",
"fields": {
"sortable": {
"type": "keyword",
"ignore_above": 256,
"normalizer": "lowercase_normalizer"
}
}
}
}
},
"settings": {
"analysis": {
"normalizer": {
"lowercase_normalizer": {
"filter": [
"lowercase"
],
"type": "custom"
}
}
}
}
}
No error, but sortable field is not present in the mapping
{
"my_test": {
"aliases": {},
"mappings": {
"properties": {
"title": {
"type": "search_as_you_type",
"doc_values": false,
"max_shingle_size": 3
}
}
},
"settings": {
"index": {
"number_of_shards": "1",
"provided_name": "my_test",
"creation_date": "1667374518829",
"analysis": {
"normalizer": {
"lowercase_normalizer": {
"filter": [
"lowercase"
],
"type": "custom"
}
}
},
"number_of_replicas": "1",
"uuid": "A8M-Yhf3ReOi3ydAs0bnwA",
"version": {
"created": "136247827"
}
}
}
}
}
Expected behavior
The mapping should contain all fields
Plugins
All that are part of the default docker image
Host/Environment (please complete the following information):
- OS: Fedora Release 36
- Version: 2.3.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingv2.18.0Issues and PRs related to version 2.18.0Issues and PRs related to version 2.18.0v3.0.0Issues and PRs related to version 3.0.0Issues and PRs related to version 3.0.0
Type
Projects
Status
Next (Next Quarter)