I am a bit fighting with specifying search_type as a body parameter. As a query parameter that is just fine and works but haven't found single example in manual where it is specified as a query parameter.
POST /index/type/_search
{
"search_type": {"query_then_fetch"},
"explain": false,
"query" : {
"query_string": {
"default_field": "adress.city",
"query": "London"
}
}
}
Any hints?
Thx
putting the search type in the body is not supported, from the documentation:
The type can be configured by setting the search_type parameter in the query string.
So your query should look like this:
curl -XGET http://localhost:9200/index/type/_search?search_type=query_then_fetch -d '
{
"explain": false,
"query" : {
"query_string": {
"default_field": "adress.city",
"query": "London"
}
}
}'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With