"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.23/plugins/mapper-murmur3/src/test/resources/rest-api-spec/test/mapper_murmur3/10_basic.yml" (29 Dec 2021, 1345 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 # Integration tests for Mapper Murmur3 components
    2 #
    3 
    4 ---
    5 "Mapper Murmur3":
    6 
    7     - do:
    8         indices.create:
    9             index: test
   10             body:
   11                 mappings:
   12                     type1: { "properties": { "foo": { "type": "text", "fields": { "hash": { "type": "murmur3" } } } } }
   13 
   14     - do:
   15         index:
   16             index: test
   17             type: type1
   18             id: 0
   19             body: { "foo": null }
   20 
   21     - do:
   22         indices.refresh: {}
   23 
   24     - do:
   25         search:
   26             body: { "aggs": { "foo_count": { "cardinality": { "field": "foo.hash" } } } }
   27 
   28     - match: { aggregations.foo_count.value: 0 }
   29 
   30     - do:
   31         index:
   32             index: test
   33             type: type1
   34             id: 1
   35             body: { "foo": "bar" }
   36 
   37     - do:
   38         index:
   39             index: test
   40             type: type1
   41             id: 2
   42             body: { "foo": "baz" }
   43 
   44     - do:
   45         index:
   46             index: test
   47             type: type1
   48             id: 3
   49             body: { "foo": "quux" }
   50 
   51     - do:
   52         index:
   53             index: test
   54             type: type1
   55             id: 4
   56             body: { "foo": "bar" }
   57 
   58     - do:
   59         indices.refresh: {}
   60 
   61     - do:
   62         search:
   63             body: { "aggs": { "foo_count": { "cardinality": { "field": "foo.hash" } } } }
   64 
   65     - match: { aggregations.foo_count.value: 3 }