June 2017
Beginner to intermediate
404 pages
8h 22m
English
When Elasticsearch encounters a JSON null value in the document, it skips the field as it cannot be indexed or searched. But if you want to search for all documents containing a null value, you can tell Elasticsearch to replace the null value with a default value.
For example, we have a login history document with the username, date, and login_status fields as shown next:
{ "username" : "user1", "login_date" : "2017-01-31T00:00:00", "login_status" : "successful"}
And sometimes the login_status is sent as null by default. If the login_status field is null, the login_status field is skipped. But we want to store the login_status field as UNKNOWN whenever the login_status field is null. We can do so by specifying ...
Read now
Unlock full access