I am trying to access AWS elastic search (not the normal Elastic which could be hosted on some machine, but the AWS version of Elastic) using java. One thing I have identified is that we have to use REST TEMPLATE
instead of the TransportClient
method as AWS ES is hosted on port 80 and to get the data, we have to send a POST request with payload.
I am able to get simple data in this process but the request doesn't take wild card characters. It gives me below error:
{"type":"parse_exception","reason":"Failed to derive xcontent"}
Questions:
1. Is my understanding correct about Java hitting AWS ES on port 80? Does this mean we have to use POST instead of GET to send requests having attribute level filtering?
Is there a way to pass the attribute to the elastic search in the url itself? I have tried below example which doesn't work e.g. :
http://helloworld.amazon.com/customer/_search?q=emailID:*abc@gmail.*
How do we pass wildcard character via java client to AWS ES to fetch the data?