Description
Elasticsearch Version
8.14.1
Installed Plugins
No response
Java Version
bundled
OS Version
Linux 5.19.0-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.19.11-1 (2022-09-24) x86_64 GNU/Linux
Problem Description
If join field called _type
it's duplicated in _search
request results.
Problem appears at 8.14 release.
8.9; 8.12; 8.13 is ok.
Steps to Reproduce
-
make index and docs as example in documentation for join field type:
https://www.elastic.co/guide/en/elasticsearch/reference/8.14/parent-join.html -
make search
curl 'localhost:9200/my-index-000001/_search?pretty'
got resutl like:
{
"_index" : "my-index-000001",
"_id" : "4",
"_score" : 1.0,
"_routing" : "1",
"_source" : {
"my_id" : "4",
"text" : "This is another answer",
"my_join_field" : {
"name" : "answer",
"parent" : "1"
}
}
}
-
reproduce steps 1 and 2, but rename index name from
my-index-000001
tomy-index-000002
and join fieldmy_join_field
to_type
-
make search
curl 'localhost:9200/my-index-000002/_search?pretty'
{
"_index" : "my-index-000002",
"_id" : "4",
"_score" : 1.0,
"_routing" : "1",
"_type" : {
"name" : "answer",
"parent" : "1"
},
"_source" : {
"my_id" : "4",
"text" : "This is another answer",
"_type" : {
"name" : "answer",
"parent" : "1"
}
}
}
result: _type
field is duplicated inside and outside _source
expected: _type
field present only inside _source
Logs (if relevant)
No response