Hi,
I am trying to write a java program for storing a string in elasticsearch and then retrieve from it My code is
GetResponse response = client.prepareGet("correct", "Doe","11").setStoredFields("message") .execute() .actionGet(); String message = (String)response.getField("message").getValue();
For that ,I am always getting null value
But if I try "response.exists()", it gives me "true".when I see the index in elasticsearch head chrome extension it exists and also has the data in message field
Note: I am using elasticsearch 5.6.0 with java API
Can anyone please help me to get the field from the index