I'm developing a piece of code that inserts a document into an
elastcisearch server. The code uses libcurl to setup an HTTP request and
capture the response.
So, in order to check wether a document has been properly indexed, what is
the official or proper way to do it?
This is an example of a correct indexed document response:
HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Content-Length: 92
Should my program check that first header line contains "201 Created", what
should happen if a 3xx redirection occurs? should I consider it as properly
indexed too?
Or instead should I just ignore the header and just check that the last
part of the body string equals ' "created":true} ' ?
I'm developing a piece of code that inserts a document into an
elastcisearch server. The code uses libcurl to setup an HTTP request and
capture the response.
So, in order to check wether a document has been properly indexed, what is
the official or proper way to do it?
This is an example of a correct indexed document response:
HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Content-Length: 92
Should my program check that first header line contains "201 Created",
what should happen if a 3xx redirection occurs? should I consider it as
properly indexed too?
Or instead should I just ignore the header and just check that the last
part of the body string equals ' "created":true} ' ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.