get/mget fails with json_generation_exception
error when using source field that doesn't exist
#82891
Labels
>bug
:Search Foundations/Mapping
Index mappings, including merging and defining field types
Team:Search Foundations
Meta label for the Search Foundations team in Elasticsearch
Elasticsearch version (
bin/elasticsearch --version
): main branch (HEAD: 4560a0c)Plugins installed: []
JVM version (
java -version
): bundled with ElasticsearchOS version (
uname -a
if on a Unix-like system): tested on Ubuntu (x86_64) and Darwin (arm64)Description of the problem including expected versus actual behavior:
When fetching a document and using
_source
to attempt to retrieve field that is undefined on a document, it can result in ajson_generation_exception
error. From @romseygeek:Steps to reproduce:
If you are using Kibana and running ES from snapshot, make sure to use the correct/buggy ES snapshot:
Create a document:
Response (success):
Try to get the document, using a source field that doesn't exist:
Response (error):
Try to search for the document, using a source field that doesn't exist:
Response (success):
It appears this bug was introduced in #81970.
CC @nik9000 @romseygeek
The text was updated successfully, but these errors were encountered: