"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.23/rest-api-spec/src/main/resources/rest-api-spec/test/field_caps/10_basic.yml" (29 Dec 2021, 12320 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 setup:
    3   - do:
    4         indices.create:
    5           index: test1
    6           body:
    7               mappings:
    8                 t:
    9                   properties:
   10                     text:
   11                       type:     text
   12                     keyword:
   13                       type:     keyword
   14                     number:
   15                       type:     double
   16                     geo:
   17                       type:     geo_point
   18                     object:
   19                       type: object
   20                       properties:
   21                         nested1 :
   22                           type : text
   23                           index: false
   24                         nested2:
   25                           type: float
   26                           doc_values: false
   27                     level1:
   28                       type: nested
   29                       properties:
   30                         level2:
   31                           type: object
   32                           properties:
   33                             leaf1:
   34                               type: text
   35                               index: false
   36 
   37   - do:
   38         indices.create:
   39           index: test2
   40           body:
   41               mappings:
   42                 t:
   43                   properties:
   44                     text:
   45                       type:     text
   46                     keyword:
   47                       type:     keyword
   48                     number:
   49                       type:     double
   50                     geo:
   51                       type:     geo_point
   52                     object:
   53                       type: object
   54                       properties:
   55                         nested1 :
   56                           type : text
   57                           index: true
   58                         nested2:
   59                           type: float
   60                           doc_values: true
   61                     level1:
   62                       type: nested
   63                       properties:
   64                         level2:
   65                           type: object
   66                           properties:
   67                             leaf1:
   68                               type: text
   69                               index: false
   70   - do:
   71         indices.create:
   72           index: test3
   73           body:
   74               mappings:
   75                 t:
   76                   properties:
   77                     text:
   78                       type:     text
   79                     keyword:
   80                       type:     keyword
   81                     number:
   82                       type:     long
   83                     geo:
   84                       type:     keyword
   85                     object:
   86                       type: nested
   87                       properties:
   88                         nested1 :
   89                           type : long
   90                           index: false
   91                         nested2:
   92                           type: keyword
   93                           doc_values: false
   94                     level1:
   95                       type: object
   96                       properties:
   97                         level2:
   98                           type: object
   99                           properties:
  100                             leaf1:
  101                               type: text
  102                               index: false
  103 
  104 ---
  105 "Get simple field caps":
  106   - skip:
  107       version: " - 5.3.99"
  108       reason:  this uses a new API that has been added in 5.4.0
  109 
  110   - do:
  111       field_caps:
  112         index: 'test1,test2,test3'
  113         fields: [text, keyword, number, geo]
  114 
  115   - match: {fields.text.text.searchable:                true}
  116   - match: {fields.text.text.aggregatable:              false}
  117   - is_false: fields.text.text.indices
  118   - is_false: fields.text.text.non_searchable_indices
  119   - is_false: fields.text.text.non_aggregatable_indices
  120   - match: {fields.keyword.keyword.searchable:          true}
  121   - match: {fields.keyword.keyword.aggregatable:        true}
  122   - is_false: fields.text.keyword.indices
  123   - is_false: fields.text.keyword.non_searchable_indices
  124   - is_false: fields.text.keyword.non_aggregatable_indices
  125   - match: {fields.number.double.searchable:            true}
  126   - match: {fields.number.double.aggregatable:          true}
  127   - match: {fields.number.double.indices:               ["test1", "test2"]}
  128   - is_false: fields.number.double.non_searchable_indices
  129   - is_false: fields.number.double.non_aggregatable_indices
  130   - match: {fields.number.long.searchable:              true}
  131   - match: {fields.number.long.aggregatable:            true}
  132   - match: {fields.number.long.indices:                 ["test3"]}
  133   - is_false: fields.number.long.non_searchable_indices
  134   - is_false: fields.number.long.non_aggregatable_indices
  135   - match: {fields.geo.geo_point.searchable:            true}
  136   - match: {fields.geo.geo_point.aggregatable:          true}
  137   - match: {fields.geo.geo_point.indices:               ["test1", "test2"]}
  138   - is_false: fields.geo.geo_point.non_searchable_indices
  139   - is_false: fields.geo.geo_point.non_aggregatable_indices
  140   - match: {fields.geo.keyword.searchable:              true}
  141   - match: {fields.geo.keyword.aggregatable:            true}
  142   - match: {fields.geo.keyword.indices:                 ["test3"]}
  143   - is_false: fields.geo.keyword.non_searchable_indices
  144   - is_false: fields.geo.keyword.on_aggregatable_indices
  145 ---
  146 "Get leaves field caps":
  147   - skip:
  148       version: " - 5.3.99"
  149       reason:  this uses a new API that has been added in 5.4.0
  150 
  151   - do:
  152       field_caps:
  153         index: 'test1,test2,test3'
  154         fields: object*
  155 
  156   - match: {fields.object\.nested1.long.searchable:                       false}
  157   - match: {fields.object\.nested1.long.aggregatable:                     true}
  158   - match: {fields.object\.nested1.long.indices:                          ["test3"]}
  159   - is_false: fields.object\.nested1.long.non_searchable_indices
  160   - is_false: fields.object\.nested1.long.non_aggregatable_indices
  161   - match: {fields.object\.nested1.text.searchable:                       false}
  162   - match: {fields.object\.nested1.text.aggregatable:                     false}
  163   - match: {fields.object\.nested1.text.indices:                          ["test1", "test2"]}
  164   - match: {fields.object\.nested1.text.non_searchable_indices:           ["test1"]}
  165   - is_false: fields.object\.nested1.text.non_aggregatable_indices
  166   - match: {fields.object\.nested2.float.searchable:                      true}
  167   - match: {fields.object\.nested2.float.aggregatable:                    false}
  168   - match: {fields.object\.nested2.float.indices:                         ["test1", "test2"]}
  169   - match: {fields.object\.nested2.float.non_aggregatable_indices:        ["test1"]}
  170   - is_false: fields.object\.nested2.float.non_searchable_indices
  171   - match: {fields.object\.nested2.keyword.searchable:                    true}
  172   - match: {fields.object\.nested2.keyword.aggregatable:                  false}
  173   - match: {fields.object\.nested2.keyword.indices:                       ["test3"]}
  174   - is_false: fields.object\.nested2.keyword.non_aggregatable_indices
  175   - is_false: fields.object\.nested2.keyword.non_searchable_indices
  176 ---
  177 "Get object and nested field caps":
  178   - skip:
  179       version: " - 6.4.99"
  180       reason: object and nested fields are returned since 6.5
  181 
  182   - do:
  183       field_caps:
  184         index: 'test1,test2,test3'
  185         fields: object*,level1*
  186 
  187   - match: {fields.object.object.indices:                                 ["test1", "test2"]}
  188   - match: {fields.object.object.searchable:                              false}
  189   - match: {fields.object.object.aggregatable:                            false}
  190   - is_false: fields.object.object.non_aggregatable_indices
  191   - is_false: fields.object.object.non_searchable_indices
  192   - match: {fields.object.nested.indices:                                 ["test3"]}
  193   - match: {fields.object.nested.searchable:                              false}
  194   - match: {fields.object.nested.aggregatable:                            false}
  195   - is_false: fields.object.nested.non_aggregatable_indices
  196   - is_false: fields.object.nested.non_searchable_indices
  197   - match: {fields.level1.nested.indices:                                 ["test1", "test2"]}
  198   - match: {fields.level1.nested.searchable:                              false}
  199   - match: {fields.level1.nested.aggregatable:                            false}
  200   - is_false: fields.level1.nested.non_aggregatable_indices
  201   - is_false: fields.level1.nested.non_searchable_indices
  202   - match: {fields.level1.object.indices:                                 ["test3"]}
  203   - match: {fields.level1.object.searchable:                              false}
  204   - match: {fields.level1.object.aggregatable:                            false}
  205   - is_false: fields.level1.object.non_aggregatable_indices
  206   - is_false: fields.level1.object.non_searchable_indices
  207   - match: {fields.level1\.level2.object.searchable:                      false}
  208   - match: {fields.level1\.level2.object.aggregatable:                    false}
  209   - is_false: fields.level1\.level2.object.indices
  210   - is_false: fields.level1\.level2.object.non_aggregatable_indices
  211   - is_false: fields.level1\.level2.object.non_searchable_indices
  212   - match: {fields.level1\.level2\.leaf1.text.searchable:                 false}
  213   - match: {fields.level1\.level2\.leaf1.text.aggregatable:               false}
  214   - is_false: fields.level1\.level2\.leaf1.text.indices
  215   - is_false: fields.level1\.level2\.leaf1.text.non_aggregatable_indices
  216   - is_false: fields.level1\.level2\.leaf1.text..non_searchable_indices
  217 ---
  218 "Get prefix field caps":
  219   - skip:
  220       version: " - 5.3.99"
  221       reason:  this uses a new API that has been added in 5.4.0
  222 
  223   - do:
  224       field_caps:
  225         index: _all
  226         fields: "n*"
  227   - match: {fields.number.double.searchable:            true}
  228   - match: {fields.number.double.aggregatable:          true}
  229   - match: {fields.number.double.indices:               ["test1", "test2"]}
  230   - is_false: fields.number.double.non_searchable_indices
  231   - is_false: fields.number.double.non_aggregatable_indices
  232   - match: {fields.number.long.searchable:              true}
  233   - match: {fields.number.long.aggregatable:            true}
  234   - match: {fields.number.long.indices:                 ["test3"]}
  235   - is_false: fields.number.long.non_searchable_indices
  236   - is_false: fields.number.long.non_aggregatable_indices
  237 
  238 ---
  239 "Mix in non-existing field field caps":
  240   - skip:
  241       version: " - 5.4.0"
  242       reason:  "#24504 fixed a bug in this API in 5.4.1"
  243 
  244   - do:
  245       field_caps:
  246         index: 'test1,test2,test3'
  247         fields: [text, keyword, no_such_field, number, geo]
  248 
  249   - match: {fields.text.text.searchable:                true}
  250   - match: {fields.text.text.aggregatable:              false}
  251   - is_false: fields.text.text.indices
  252   - is_false: fields.text.text.non_searchable_indices
  253   - is_false: fields.text.text.non_aggregatable_indices
  254   - match: {fields.keyword.keyword.searchable:          true}
  255   - match: {fields.keyword.keyword.aggregatable:        true}
  256   - is_false: fields.text.keyword.indices
  257   - is_false: fields.text.keyword.non_searchable_indices
  258   - is_false: fields.text.keyword.non_aggregatable_indices
  259   - match: {fields.number.double.searchable:            true}
  260   - match: {fields.number.double.aggregatable:          true}
  261   - match: {fields.number.double.indices:               ["test1", "test2"]}
  262   - is_false: fields.number.double.non_searchable_indices
  263   - is_false: fields.number.double.non_aggregatable_indices
  264   - match: {fields.number.long.searchable:              true}
  265   - match: {fields.number.long.aggregatable:            true}
  266   - match: {fields.number.long.indices:                 ["test3"]}
  267   - is_false: fields.number.long.non_searchable_indices
  268   - is_false: fields.number.long.non_aggregatable_indices
  269   - match: {fields.geo.geo_point.searchable:            true}
  270   - match: {fields.geo.geo_point.aggregatable:          true}
  271   - match: {fields.geo.geo_point.indices:               ["test1", "test2"]}
  272   - is_false: fields.geo.geo_point.non_searchable_indices
  273   - is_false: fields.geo.geo_point.non_aggregatable_indices
  274   - match: {fields.geo.keyword.searchable:              true}
  275   - match: {fields.geo.keyword.aggregatable:            true}
  276   - match: {fields.geo.keyword.indices:                 ["test3"]}
  277   - is_false: fields.geo.keyword.non_searchable_indices
  278   - is_false: fields.geo.keyword.on_aggregatable_indices