I used "fields" to limit only return selected fields:
{
"fields" : ["Title", "Price"],
"query" :{
 ...
}
}

The Price fields might be null for some of the documents, I found that only 
when "Price" field value is NOT null, it is returned in ES response, 
otherwise, it is missing in response. But if I remove "fields" from the 
query, the null value field will appear in response.

Is it by design of Elasticsearch? How to return the null value fields in 
response even using "fields" in query?

-- 
Please update your bookmarks! We have moved to https://discuss.elastic.co/
--- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/3c91fd31-0e13-4afb-a9bf-1a0ec795e68f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to