{ "setup": [
    { "name"  : "create test domain",
      "params": { "Action": "CreateDomain",
                  "DomainName": "companies" } },
    { "name"  : "create text field",
      "params": { "Action": "DefineIndexField",
                  "DomainName": "companies",
                  "IndexField.IndexFieldName": "name",
                  "IndexField.IndexFieldType": "text" } },
    { "name"  : "create uint field",
      "params": { "Action": "DefineIndexField",
                  "DomainName": "companies",
                  "IndexField.IndexFieldName": "age",
                  "IndexField.IndexFieldType": "uint" } },
    { "name"  : " create literal field",
      "params": { "Action": "DefineIndexField",
                  "DomainName": "companies",
                  "IndexField.IndexFieldName": "product",
                  "IndexField.IndexFieldType": "literal" } }
  ],
  "teardown": [
    { "name"  : "teardown: delete test domain",
      "params": { "Action": "DeleteDomain",
                  "DomainName": "companies" } }
  ],
  "requests": [

  { "name"  : "all fields",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies" } },

  { "name"  : "only specified two fields in regular order",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.1": "name",
                "FieldNames.member.2": "age" } },

  { "name"  : "only specified two fields in inverted order",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.1": "age",
                "FieldNames.member.2": "name" } },

  { "name"  : "not-existing field",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.1": "unknown" } },

  { "name"  : "same field",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.1": "age",
                "FieldNames.member.2": "age" } },


  { "name"  : "with too short (one letter) domain name",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "a" } },

  { "name"  : "with too short (two letters) domain name",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "ab" } },

  { "name"  : "with too long domain name",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "abcdefghijklmnopqrstuvwxyz0123456789" } },

  { "name"  : "with invalid character in the domain name",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "@_@" } },

  { "name"  : "with invalid character in the domain name and too long",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "@abcdefghijklmnopqrstuvwxyz0123456789" } },

  { "name"  : "without domain name",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "" } },


  { "name"  : "with too long field name",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.1": "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789" } },

  { "name"  : "with invalid character in the field name",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.1": "@_@" } },

  { "name"  : "with invalid character in the field name and too long",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.1": "@abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789" } },

  { "name"  : "without field name",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.1": "" } },

  { "name"  : "with reserved field name 'body'",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.1": "body" } },
  { "name"  : "with reserved field name 'docid'",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.1": "docid" } },
  { "name"  : "with reserved field name 'text_relevance'",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.1": "text_relevance" } },


  { "name"  : "single index with gap",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.10": "name" } },

  { "name"  : "multiple indexes with gap",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.10": "name",
                "FieldNames.member.20": "age" } },

  { "name"  : "negative index",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.-1": "name" } },

  { "name"  : "not a number index",
    "params": { "Action": "DescribeIndexFields",
                "DomainName": "companies",
                "FieldNames.member.foo": "name" } },

  [
    { "name"  : "text index field with unknown option: setup",
      "params": { "Action": "DefineIndexField",
                  "DomainName": "companies",
                  "IndexField.IndexFieldName": "name_with_unknown_option",
                  "IndexField.IndexFieldType": "text",
                  "IndexField.TextOptions.UnknownOption": "true" } },
    { "name"  : "text index field with unknown option: describe",
      "params": { "Action": "DescribeIndexFields",
                  "DomainName": "companies",
                  "FieldNames.member.1": "name_with_unknown_option" } }
  ],

  [
    { "name"  : "literal index field with unknown option: setup",
      "params": { "Action": "DefineIndexField",
                  "DomainName": "companies",
                  "IndexField.IndexFieldName": "product_with_unknown_option",
                  "IndexField.IndexFieldType": "literal",
                  "IndexField.TextOptions.UnknownOption": "true" } },
    { "name"  : "literal index field with unknown option: describe",
      "params": { "Action": "DescribeIndexFields",
                  "DomainName": "companies",
                  "FieldNames.member.1": "product_with_unknown_option" } }
  ],

  [
    { "name"  : "uint index field with unknown option: setup",
      "params": { "Action": "DefineIndexField",
                  "DomainName": "companies",
                  "IndexField.IndexFieldName": "age_with_unknown_option",
                  "IndexField.IndexFieldType": "uint",
                  "IndexField.TextOptions.UnknownOption": "true" } },
    { "name"  : "uint index field with unknown option: describe",
      "params": { "Action": "DescribeIndexFields",
                  "DomainName": "companies",
                  "FieldNames.member.1": "age_with_unknown_option" } }
  ]
] }
