I want to search for ElasticSearch and extract specific fields from all records, regardless of their value. But the answer contains for each record only fields whose value is not null . Is there a way to get ElasticSearch to return the exact number of fields for all records?
Request example:
{ "fields" : ["Field1","Field2","Field3"], "query" : { "match_all" : {} } }
Answer example:
{ "hits": [ { "fields": { "Field1": [ "bla" ], "Field2": [ "test" ] } }, { "fields": { "Field1": [ "bla" ], "Field2": [ "test" ], "Field3": [ "somevalue" ] } } ] }
My goal is to get something for "Field3" in the first hit.
dchar source share