Open
Description
This is an issue that came up during work on #67432 and was decided to treat as a follow-up issue.
As of 7.11 (that is before #67432) we are missing fields mapped as token_count
if they are inside nested
fields.
e.g.
DELETE my-index
PUT my-index
{
"mappings": {
"properties": {
"obj": {
"type": "nested",
"properties": {
"name": {
"type": "text",
"fields": {
"length": {
"type": "token_count",
"analyzer": "standard"
}
}
}
}
}
}
}
}
PUT /my-index/_doc/1
{
"obj": {"name" : "Long John Silver"}
}
POST /my-index/_search
{
"_source": false,
"fields" : ["*"]
}
is missing the obj.name.length
field which is there if e.g. obj
is a regular object
field. This is probably due to the fact that the value fetcher used by that field type is a DocValueFetcher and not the usual SourceValueFetcher.