Hi there,
I'm using mapper plugin to index pdf files, and in Kibana console everything works as expected.
I've tried following request, and ElasticSearch responses with 2 documents:
POST /reports/generated/_search?filter_path=hits.hits._source
{
"query":{
"query_string":{
"query":"USD"
}
}
}
Both pdfs contain "USD" word.
But I do the same thing with Java REST API and ElasticSearch cannot make a search in the indexed pdfs.
For querying I'm using following java code:
String query = "{"query":{"query_string":{"query":"" + "USD" + ""}}}";
Response response = restClient.performRequest(
"POST",
"/reports/generated/_search?filter_path=hits.hits._source",
new Hashtable<>(),
new StringEntity(query));
When I change "USD" querying string with another value, which contains another field (not the attachment), then everything is working well. So do I need some configuration in my java restClient to enable context searching in the indexed pdfs?
Thanks,
Vardan