Thomas Crawford
Thomas Crawford

Reputation: 896

Elasticsearch multiple field search endpoint

I have the following URL what executes a elasticsearch _search request with a filter on it.

https://mysupersite.local/apiman-gateway/tommie/ckanlastic/2.0?q=tags:“013”

I want to search for multiple values within this URL. So it must execute an AND query.

Something like this ( Not working)

https://mysupersite.local/apiman-gateway/tommie/ckanlastic/2.0?q=tags:“013”&theme:“bestuur”

Now it executes an OR request, so then i only search for theme:bestuur.

Is this possible within this URL request endpoint or do i need to set the header body?

Thanks

Upvotes: 0

Views: 60

Answers (1)

Val
Val

Reputation: 217394

You need to use the query string syntax, i.e. tags:"013" AND theme:"bestuur". When URL-encoded, this gives the following URL

https://mysupersite.local/apiman-gateway/tommie/ckanlastic/2.0?q=tags:"013"+AND+theme:"bestuur"

Upvotes: 1

Related Questions