Hi!
I'm using elasticsearch 7.4.2. Docs are saying that I can set refresh parameter with wait_for value. But if I try to do this, an error is returned:
GET http://0.0.0.0:9200/events/_doc/31780294-6529-425d-b0fa-7b03b9485ca4?refresh=wait_for
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Failed to parse value [wait_for] as only [true] or [false] are allowed."}],"type":"illegal_argument_exception","reason":"Failed to parse value [wait_for] as only [true] or [false] are allowed."},"status":400}
Tested on 7.6 and was able to reproduce the problem.
DELETE test
PUT test/_doc/1
{
"foo": "bar"
}
GET test/_doc/1?refresh=wait_for
Gives:
# GET test/_doc/1?refresh=wait_for
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Failed to parse value [wait_for] as only [true] or [false] are allowed."
}
],
"type" : "illegal_argument_exception",
"reason" : "Failed to parse value [wait_for] as only [true] or [false] are allowed."
},
"status" : 400
}
Refresh=wait_for works well for the PUT document API though:
PUT test/_doc/1?refresh=wait_for
{
"foo": "bar"
}
Could you open an issue in elasticsearch repository? It's at least a documentation issue IMHO.
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.