I am using ES - 6.1 and corresponding java version of the api. I was able to index the data using the java API. I validated this via kibana. All the mappings were correctly saved but an error comes up when I try to search. Even the most basic search returns me an empty collection.
// client is a reference to the TransportClient instance SearchResponse searchResponse = this.client.prepareSearch(index).get().
When I try get the fields, by getFields() and further do a getField(key) I get a null pointer exception. I tried troubleshooting and saw that in the response there are no objects being returned. Following is the basic search I am doing.
// index is the index I am interested to search under. SearchResponse searchResponse = this.client.prepareSearch(index).get();
This is an issue I see when I tried migrating my code to latest version from 1.7.3 Java API. Earlier, there are no issues found with our implementation.
Please help me out on this.