简体   繁体   English

Elasticsearch多字段搜索端点

[英]Elasticsearch multiple field search endpoint

I have the following URL what executes a elasticsearch _search request with a filter on it. 我有以下URL,该URL执行带有过滤器的elasticsearch _search请求。

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

I want to search for multiple values within this URL. 我想在此URL中搜索多个值。 So it must execute an AND query. 因此,它必须执行AND查询。

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. 现在它执行一个OR请求,所以我只搜索theme:bestuur。

Is this possible within this URL request endpoint or do i need to set the header body? 是否可以在此URL请求端点内进行?还是需要设置标题正文?

Thanks 谢谢

You need to use the query string syntax , ie tags:"013" AND theme:"bestuur" . 您需要使用查询字符串语法 ,即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"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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