Hello,
I am trying to run searches using searchtemplates following are the commands i am executing
curl -XPUT 'localhost:9200/test/' -d '{"settings":{"index":{"number_of_shards":1,"number_of_replicas":0}}}'
curl -XPOST 'localhost:9200/test/testtype/1' -d '{"text":"value1_foo"}'
curl -XPOST 'localhost:9200/test/testtype/2?refresh=true' -d '{"text":"value2_foo value3_foo"}'
curl -XPOST 'localhost:9200/test/_refresh'
curl -XPUT 'localhost:9200/_search/template/my_template2' -d '{
"template": {
"query": {
"match": {
"text" : "{{my_value}}"
}
}
}
}'
curl -XPOST 'localhost:9200/_refresh'
curl -XGET 'localhost:9200/test/_search/template' -d '{
"template": {
"id": "my_template2"
},
"params": {
"my_value": "value1_foo"
}
}'
{"error":{"root_cause":[{"type":"parsing_exception","reason":"Unknown key for a VALUE_STRING in [id].","line":1,"col":7}],"type":"parsing_exception","reason":"Unknown key for a VALUE_STRING in [id].","line":1,"col":7},"status":400}
Any helps appreciated.