Cloudsearch CLI is facing issue to define-index-field for array type source field #7112
Labels
bug
This issue is a bug.
cloudsearch
customization
Issues related to CLI customizations (located in /awscli/customizations)
has-pr
This issue has a PR associated with it.
p2
This is a standard priority issue
Describe the bug
Cloudsearch gives an option to define index-field with an associative source-field, So if we do -
for a sample imdb dataset it creates a new index field have source field as it is specified. Now it should work with all fields like int, text, latlon, text-array, literals, literal-array etc. But facing issue in array type fields and its giving an error as -
But this works fine for non-array fields giving the expected behaviour.
Expected Behavior
The expected behaviour is that after running for eg -
it should create an index-field of type text-array with source field as specified.
Current Behavior
Currently facing issue for array-type fields stating -
Reproduction Steps
Run this command after you have set up a sample domain for imdb dataset or any other set -
Possible Solution
You can refer to
https://github.com/boto/boto/blob/develop/boto/cloudsearch2/domain.py
for better understanding how array type fields have been handled. Also please look into the recent merge into cloudsearch.py file - https://github.com/aws/aws-cli/blob/master/awscli/customizations/cloudsearch.py
Additional Information/Context
Please also improve the test coverage at - https://github.com/aws/aws-cli/blob/master/tests/functional/cloudsearch/test_cloudsearch.py
CLI version used
aws-cli/2.7.15
Environment details (OS name and version, etc.)
AL2 Instance (DevDesktop)
The text was updated successfully, but these errors were encountered: