Closed neumachen closed 7 years ago
http://localhost:9200/ GET _search? { "query": { "query_string": { "default_field": username, "query": "k* OR m* OR h*" } } }
This returns this error:
HTTP/1.1 400 Bad Request content-type: application/json; charset=UTF-8 content-length: 477 { "error": { "reason": "request [/_search] contains unrecognized parameter: [{ \"query\": { \"query_string\": { \"default_field\": username, \"query\": \"k* OR m* OR h*\" } }}]", "root_cause": [ { "reason": "request [/_search] contains unrecognized parameter: [{ \"query\": { \"query_string\": { \"default_field\": username, \"query\": \"k* OR m* OR h*\" } }}]", "type": "illegal_argument_exception" } ], "type": "illegal_argument_exception" }, "status": 400 }
But the query passes when done through Sense.
My bad, didn't realize that you'd need to use POST with a body.
POST
This returns this error:
But the query passes when done through Sense.