Hi,
ROR old versions up to 1.19.3 removes HTTP-headers - here ‘Warning’, maybe other headers too - from the origin Elastic response,
reproduce it on 7.6.1
/usr/share/elasticsearch/bin/elasticsearch-plugins remove readonlyrest && service elasticsearch restart
Warning returns w/o plugin
curl -v -H content-type:application/json -XPOST localhost:9200/test/_search?pretty&filter_path=hits.total -d ‘{ “query”: { “bool”:{ “must”:{“match”:{“application”:“whatever”}}, “filter”:{“term”:{“http_status”:“503”}} } } }’
…
- upload completely sent off: 120 out of 120 bytes
< HTTP/1.1 200 OK
< Warning: 299 Elasticsearch-7.6.1-aa751e09be0a5072e8570670309b1f12348f023b “[types removal] Specifying types in search requests is deprecated.”
< content-type: application/json; charset=UTF-8
< content-length: 86
< access-control-allow-credentials: true
<
{
“hits” : {
“total” : {
“value” : 0,
“relation” : “eq”
}
}
}
/usr/share/elasticsearch/bin/elasticsearch-plugin install file:///~/Downloads/readonlyrest-1.19.3_es7.6.1.zip && service elasticsearch restart
Warning is missing with ROR plugin
curl -v -H content-type:application/json -XPOST localhost:9200/test/_search?pretty&filter_path=hits.total -d ‘{ “query”: { “bool”:{ “must”:{“match”:{“application”:“whatever”}}, “filter”:{“term”:{“http_status”:“503”}} } } }’
…
- upload completely sent off: 120 out of 120 bytes
- upload completely sent off: 120 out of 120 bytes
< HTTP/1.1 200 OK
< content-type: application/json; charset=UTF-8
< content-length: 86
< access-control-allow-credentials: true
<
{
“hits” : {
“total” : {
“value” : 0,
“relation” : “eq”
}
}
}