mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-10 06:55:32 +00:00
349a8be4fd
* Made GET mappings consistent, supporting * /{index}/_mappings/{type} * /{index}/_mapping/{type} * /_mapping/{type} * Added "mappings" in the JSON response to align it with other responses * Made GET warmers consistent, support /{index}/_warmers/{type} and /_warmer, /_warner/{name} as well as wildcards and _all notation * Made GET aliases consistent, support /{index}/_aliases/{name} and /_alias, /_aliases/{name} as well as wildcards and _all notation * Made GET settings consistent, added /{index}/_setting/{name}, /_settings/{name} as well as supportings wildcards in settings name * Returning empty JSON instead of a 404, if a specific warmer/ setting/alias/type is missing * Added a ton of spec tests for all of the above * Added a couple of more integration tests for several features Relates #4071
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
---
|
|
"Test Create and update mapping":
|
|
- do:
|
|
indices.create:
|
|
index: test_index
|
|
|
|
- do:
|
|
indices.put_mapping:
|
|
index: test_index
|
|
type: test_type
|
|
body:
|
|
test_type:
|
|
properties:
|
|
text1:
|
|
type: string
|
|
analyzer: whitespace
|
|
text2:
|
|
type: string
|
|
analyzer: whitespace
|
|
|
|
- do:
|
|
indices.get_mapping:
|
|
index: test_index
|
|
|
|
- match: {test_index.mappings.test_type.properties.text1.type: string}
|
|
- match: {test_index.mappings.test_type.properties.text1.analyzer: whitespace}
|
|
- match: {test_index.mappings.test_type.properties.text2.type: string}
|
|
- match: {test_index.mappings.test_type.properties.text2.analyzer: whitespace}
|
|
|
|
- do:
|
|
indices.put_mapping:
|
|
index: test_index
|
|
type: test_type
|
|
body:
|
|
test_type:
|
|
properties:
|
|
text1:
|
|
type: multi_field
|
|
fields:
|
|
text1:
|
|
type: string
|
|
analyzer: whitespace
|
|
text_raw:
|
|
type: string
|
|
index: not_analyzed
|
|
text2:
|
|
type: string
|
|
analyzer: whitespace
|
|
fields:
|
|
text_raw:
|
|
type: string
|
|
index: not_analyzed
|
|
|
|
|
|
- do:
|
|
indices.get_mapping:
|
|
index: test_index
|
|
|
|
- match: {test_index.mappings.test_type.properties.text1.type: string}
|
|
- match: {test_index.mappings.test_type.properties.text1.fields.text_raw.index: not_analyzed}
|
|
- match: {test_index.mappings.test_type.properties.text2.type: string}
|
|
- match: {test_index.mappings.test_type.properties.text2.fields.text_raw.index: not_analyzed}
|