Elasticsearch REST Response Handling


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

Integration

Integrate Filebeat, Kafka, Logstash, Elasticsearch and Kibana

Advertisements

About Saurabh Gupta

My Name is Saurabh Gupta, I have approx. 11 Year of experience in Information Technology World manly in Java/J2EE. During this time I have worked with multiple organization with different client, so many technology, frameworks etc.
This entry was posted in Elasticsearch, REST and tagged , , . Bookmark the permalink.

5 Responses to Elasticsearch REST Response Handling

  1. Pingback: Elasticsearch REST JAVA Client to get Index Details List | Facing Issues On IT

  2. Pingback: Elasticsearch REST JAVA Client for Cluster Detail | Facing Issues On IT

  3. Pingback: Elasticsearch REST Synchronous and Asynchronous performRequest APIs | Facing Issues On IT

  4. Pingback: Elasticsearch REST Java Connection Client | Facing Issues On IT

  5. Pingback: Elasticsearch REST JAVA API | Facing Issues On IT

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s