"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.23/rest-api-spec/src/main/resources/rest-api-spec/test/get/100_mix_typeless_typeful.yml" (29 Dec 2021, 1091 Bytes) of package /linux/www/elasticsearch-6.8.23-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 "GET with typeless API on an index that has types":
    3 
    4  - skip:
    5       version: " - 6.6.99"
    6       reason:  Typeless APIs were introduced in 6.7.0
    7 
    8  - do:
    9       indices.create: # not using include_type_name: false on purpose
   10           include_type_name: true
   11           index: index
   12           body:
   13               mappings:
   14                   not_doc:
   15                       properties:
   16                           foo:
   17                               type: "keyword"
   18 
   19  - do:
   20       index:
   21           index:  index
   22           type:   not_doc
   23           id:     1
   24           body:   { foo: bar }
   25 
   26  - do:
   27       catch:  missing
   28       get:
   29           index:  index
   30           type:   some_random_type
   31           id:     1
   32 
   33  - match:   { _index:   "index" }
   34  - match:   { _type:    "some_random_type" }
   35  - match:   { _id:      "1"}
   36  - match:   { found:      false}
   37 
   38  - do:
   39       get:
   40           index:  index
   41           type:   _doc
   42           id:     1
   43 
   44  - match:   { _index:   "index" }
   45  - match:   { _type:    "_doc" }
   46  - match:   { _id:      "1"}
   47  - match:   { _version: 1}
   48  - match:   { _source: { foo: bar }}