I am newbie to elasticsearch .I am using AWS elastic search instance 5.1.1. I have a requirement where I need to specify multiple indices and types in request body of Elasticsearch for search operation ,is it possible ? What is the simplest way to do it an example would be appreciated. Thanks in advance !
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Referring back to documentation you can try doing a simple CURL as below
curl -XGET 'localhost:9200/_search?pretty'
This should ideally query across all indices and types.
Hope This helps!
回答2:
When creating Canonical Request you need to URI encode with escape character like
> str.replaceAll("%20", " "))).toString()
> .replaceAll("%3A", ":")
> .replaceAll("%2F", "/")
> .replaceAll("%3B", ";")
> .replaceAll("%40", "@")
> .replaceAll("%3C", "<")
> .replaceAll("%3E", ">")
> .replaceAll("%3D", "=")
> .replaceAll("%26", "&")
> .replaceAll("%25", "%")
> .replaceAll("%24", "$")
> .replaceAll("%23", "#")
> .replaceAll("%2B", "+")
> .replaceAll("%2C", ",")
> .replaceAll("%3F", "?");