简体   繁体   中英

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

You need to use the query string syntax , ie 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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM