"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.23/rest-api-spec/src/main/resources/rest-api-spec/test/explain/10_basic.yml" (29 Dec 2021, 1214 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 setup:
    2   - do:
    3       indices.create:
    4           index: test_1
    5           body:
    6               aliases:
    7                 alias_1:
    8                   "filter" : { "term" : { "foo" : "bar"} }
    9 
   10   - do:
   11       index:
   12           index:  test_1
   13           type:   test
   14           id:     id_1
   15           body:   { foo: bar, title: howdy }
   16 
   17   - do:
   18       indices.refresh: {}
   19 
   20 ---
   21 "Basic explain":
   22 
   23   - do:
   24       explain:
   25           index:  test_1
   26           type:   test
   27           id:     id_1
   28           body:
   29             query:
   30               match_all: {}
   31 
   32   - is_true: matched
   33   - match: { explanation.value: 1 }
   34   - match: { _index: test_1 }
   35   - match: { _type: test }
   36   - match: { _id: id_1 }
   37 
   38 ---
   39 "Basic explain with alias":
   40 
   41   - do:
   42       explain:
   43           index:  alias_1
   44           type:   test
   45           id:     id_1
   46           body:
   47             query:
   48               match_all: {}
   49 
   50   - is_true: matched
   51   - match: { explanation.value: 1 }
   52   - match: { _index: test_1 }
   53   - match: { _type: test }
   54   - match: { _id: id_1 }
   55 
   56 ---
   57 "Explain body without query element":
   58   - do:
   59       catch: bad_request
   60       explain:
   61           index:  test_1
   62           type:   test
   63           id:     id_1
   64           body:
   65             match_all: {}
   66