"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.5/rest-api-spec/src/main/resources/rest-api-spec/test/indices.get_field_mapping/10_basic.yml" (13 Nov 2019, 1419 Bytes) of package /linux/www/elasticsearch-6.8.5-src.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ansible YAML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ---
    2 setup:
    3   - skip:
    4       version: " - 6.6.99"
    5       reason: include_type_name was introduced in 6.7.0
    6   - do:
    7         indices.create:
    8           include_type_name: false
    9           index: test_index
   10           body:
   11               mappings:
   12                 properties:
   13                   text:
   14                     type:     text
   15 
   16 ---
   17 "Get field mapping with no index":
   18 
   19   - do:
   20       indices.get_field_mapping:
   21         include_type_name: false
   22         fields: text
   23 
   24   - match: {test_index.mappings.text.mapping.text.type:     text}
   25 
   26 ---
   27 "Get field mapping by index only":
   28   - do:
   29       indices.get_field_mapping:
   30         include_type_name: false
   31         index: test_index
   32         fields: text
   33 
   34   - match: {test_index.mappings.text.mapping.text.type:     text}
   35 
   36 ---
   37 "Get field mapping by field, with another field that doesn't exist":
   38 
   39   - do:
   40       indices.get_field_mapping:
   41         include_type_name: false
   42         index: test_index
   43         fields: [ text , text1 ]
   44 
   45   - match: {test_index.mappings.text.mapping.text.type:     text}
   46   - is_false: test_index.mappings.test_type.text1
   47 
   48 ---
   49 "Get field mapping with include_defaults":
   50 
   51   - do:
   52       indices.get_field_mapping:
   53         include_type_name: false
   54         index: test_index
   55         fields: text
   56         include_defaults: true
   57 
   58   - match: {test_index.mappings.text.mapping.text.type:     text}
   59   - match: {test_index.mappings.text.mapping.text.analyzer: default}