Reputation: 368
I have a question how to build more complex count queries with elastic search using the GET _count endpoint.
Currently I send the following request
https://address.com/elasticsearch/_count?q=tag:myTag
This works fine, however I want to add another parameter E.g.
https://address.com/elasticsearch/_count?q=tag:myTag¶meter:myParameter
Is this possible to do? Cannot find multiple parameters in the elastic search documentation. Also this needs to be possible to execute using a curl command.
Upvotes: 1
Views: 308
Reputation: 217564
You can do this by concatenating the criteria using the AND
keyword, i.e.
tag:myTag AND parameter:myParameter
So if you URL-encode the space characters, the full URL would look like this:
https://address.com/elasticsearch/_count?q=tag:myTag%20AND%20parameter:myParameter
Upvotes: 1