우분투에서 AWS CLI를 사용하여 내 AWS Cloudsearch (2013 API) 도메인을 쿼리하려고합니다. 검색이 특정 필드로 제한 될 때 성공적으로 작동하도록 할 수 없었습니다. 다음 쿼리는 :CLI를 사용하는 AWS CloudSearch 요청에서 잘못된 자바 스크립트 개체 오류가 반환됩니다.
aws --profile myprofile cloudsearchdomain search
--endpoint-url "https://search-mydomain-abc123xyz.eu-west-1.cloudsearch.amazonaws.com"
--query-options {"fields":["my_field"]}
--query-parser "simple"
--return "my_field"
--search-query "foo bar"
... 다음과 같은 오류 반환 : 나는 위의 쿼리에서 --query-options
매개 변수를 제거하면
An error occurred (SearchException) when calling the Search operation: q.options contains invalid javascript object
를, 그것은 작동합니다. 하여 --query-options
매개 변수의 fields
옵션에 대한 AWS CLI docs에서 :
An array of the fields to search when no fields are specified in a search... Valid for: simple , structured , lucene , and dismax
AWS CLI 버전 :
aws-cli/1.11.150 Python/2.7.12 Linux/4.10.0-28-generic botocore/1.7.8