0

I am using AWS elasticsearch and using AWS signature V4 to communicate with the instance. Simple queries to create/search indexes are working fine. But I want to have a functionality where I should be able to search across multiple indices and multiple types. So my URL becomes : http://my_aws_es_instance/index1,index2/type1,type2

Since its a AWS elasticsearch instance I formed canonical request like below: Please note I have url encoded the URI.

POST /index1%2Cindex2/type1%2Ctype2/_search

content-type:application/json host:my_aws_es_instance x-amz-date:date

content-type;host;x-amz-date hash value of my paylod

However AWS double encodes the "%" sign and expects following format and give 403 Forbidden error with following cannonical request.

POST /index1%252Cindex2/type1%252Ctype2/_search

content-type:application/json host:my_aws_es_instance x-amz-date:date

content-type;host;x-amz-date hash value of my paylod

MMT
  • 81
  • 1
  • 3

1 Answers1

0

The same question is Elasticsearch to query across multiple indices and multiple types

and ans is to create only request with encoded uri

Community
  • 1
  • 1
MMT
  • 81
  • 1
  • 3