Successful Response
Elasticsearch REST performRequest api always returned response for Synchronous by object Response and for Asynchronous by ResponseListener which contain response object. Response object contains other fields as given below:
Host
getHost() api return host information.
requestLine
getRequestLine() api returned information about performed request.
statusLine
return response status code by calling getStatusLine()
headers
provide response all header information by api getHeaders() if need to get specific one can get by getHeader(String).
Entity
Entity keeps all the content of response which comes after query or filters. We can get this by calling getEntity()
Failure Response or Exception
IOException
Communication problem like SocketTimeout etc.
ResponseException
Response received with status code not having 200 for OK. Response Exception not occurs for code 404 which indicate resource is not available.
Read More on Elasticsearch REST
- Elasticsearch REST API and Configuration
- Elasticsearch REST Java Connection Client
- Elasticsearch REST Synchronous and Asynchronous performRequest APIs
- Elasticsearch REST JAVA Client for Cluster Detail
- Elasticsearch REST JAVA Client to get Index Details List
Integration
Integrate Filebeat, Kafka, Logstash, Elasticsearch and Kibana