diff --git a/docs/examples/guide/004743b9c9f61588926ccf734696b713.asciidoc b/docs/examples/guide/004743b9c9f61588926ccf734696b713.asciidoc deleted file mode 100644 index 2681082708..0000000000 --- a/docs/examples/guide/004743b9c9f61588926ccf734696b713.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.forcemerge( - index: '.ds-my-data-stream-2099.03.07-000001', - max_num_segments: 1 -) -puts response ----- diff --git a/docs/examples/guide/004a17b42ab5155bb61da797a006fa9f.asciidoc b/docs/examples/guide/004a17b42ab5155bb61da797a006fa9f.asciidoc deleted file mode 100644 index d2470c1c95..0000000000 --- a/docs/examples/guide/004a17b42ab5155bb61da797a006fa9f.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - pinned: { - ids: [ - '1', - '4', - '100' - ], - organic: { - match: { - description: 'iphone' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/006e0e16c9f1da58c0bfe57377f7fc38.asciidoc b/docs/examples/guide/006e0e16c9f1da58c0bfe57377f7fc38.asciidoc deleted file mode 100644 index bae7a42fe9..0000000000 --- a/docs/examples/guide/006e0e16c9f1da58c0bfe57377f7fc38.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'whitespace', - filter: [ - 'stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/008ed823c89e703c447ac89c6b689833.asciidoc b/docs/examples/guide/008ed823c89e703c447ac89c6b689833.asciidoc deleted file mode 100644 index 56a7f36f96..0000000000 --- a/docs/examples/guide/008ed823c89e703c447ac89c6b689833.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.migration.post_feature_upgrade -puts response ----- diff --git a/docs/examples/guide/0091fc75271b1fbbd4269622a4881e8b.asciidoc b/docs/examples/guide/0091fc75271b1fbbd4269622a4881e8b.asciidoc deleted file mode 100644 index 5a97c4fcb7..0000000000 --- a/docs/examples/guide/0091fc75271b1fbbd4269622a4881e8b.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index', - body: { - query: { - match: { - 'http.clientip' => '40.135.0.0' - } - }, - fields: [ - 'http.clientip' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/00b3b6d76a368ae71277ea24af318693.asciidoc b/docs/examples/guide/00b3b6d76a368ae71277ea24af318693.asciidoc deleted file mode 100644 index d2342e5219..0000000000 --- a/docs/examples/guide/00b3b6d76a368ae71277ea24af318693.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.indices.shard_stores -puts response ----- diff --git a/docs/examples/guide/00c05aa931fc985985e3e21c93cf43ff.asciidoc b/docs/examples/guide/00c05aa931fc985985e3e21c93cf43ff.asciidoc deleted file mode 100644 index 2fdd1547c2..0000000000 --- a/docs/examples/guide/00c05aa931fc985985e3e21c93cf43ff.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: '{ "query": {{#toJson}}my_query{{/toJson}} }', - params: { - my_query: { - match_all: {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/00d65f7b9daa1c6b18eedd8ace206bae.asciidoc b/docs/examples/guide/00d65f7b9daa1c6b18eedd8ace206bae.asciidoc deleted file mode 100644 index c4411e7adb..0000000000 --- a/docs/examples/guide/00d65f7b9daa1c6b18eedd8ace206bae.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'asciifolding' - ], - text: 'açaí à la carte' - } -) -puts response ----- diff --git a/docs/examples/guide/00e0c964c79fcc1876ab957da2ffce82.asciidoc b/docs/examples/guide/00e0c964c79fcc1876ab957da2ffce82.asciidoc deleted file mode 100644 index cb1eb6136d..0000000000 --- a/docs/examples/guide/00e0c964c79fcc1876ab957da2ffce82.asciidoc +++ /dev/null @@ -1,68 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'italian_example', - body: { - settings: { - analysis: { - filter: { - italian_elision: { - type: 'elision', - articles: [ - 'c', - 'l', - 'all', - 'dall', - 'dell', - 'nell', - 'sull', - 'coll', - 'pell', - 'gl', - 'agl', - 'dagl', - 'degl', - 'negl', - 'sugl', - 'un', - 'm', - 't', - 's', - 'v', - 'd' - ], - articles_case: true - }, - italian_stop: { - type: 'stop', - stopwords: '_italian_' - }, - italian_keywords: { - type: 'keyword_marker', - keywords: [ - 'esempio' - ] - }, - italian_stemmer: { - type: 'stemmer', - language: 'light_italian' - } - }, - analyzer: { - rebuilt_italian: { - tokenizer: 'standard', - filter: [ - 'italian_elision', - 'lowercase', - 'italian_stop', - 'italian_keywords', - 'italian_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0163af36c8472ac0c5160c8b716f5b26.asciidoc b/docs/examples/guide/0163af36c8472ac0c5160c8b716f5b26.asciidoc deleted file mode 100644 index 8d2f65d5ce..0000000000 --- a/docs/examples/guide/0163af36c8472ac0c5160c8b716f5b26.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - filter_path: 'aggregations', - body: { - query: { - term: { - type: 't-shirt' - } - }, - aggregations: { - avg_price: { - avg: { - field: 'price' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/019e329ed5a930aef825266822e7377a.asciidoc b/docs/examples/guide/019e329ed5a930aef825266822e7377a.asciidoc deleted file mode 100644 index de704aafa6..0000000000 --- a/docs/examples/guide/019e329ed5a930aef825266822e7377a.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'asciifold_example', - body: { - settings: { - analysis: { - analyzer: { - standard_asciifolding: { - tokenizer: 'standard', - filter: [ - 'my_ascii_folding' - ] - } - }, - filter: { - my_ascii_folding: { - type: 'asciifolding', - preserve_original: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/01bc0f2ed30eb3dd23511d01ce0ac6e1.asciidoc b/docs/examples/guide/01bc0f2ed30eb3dd23511d01ce0ac6e1.asciidoc deleted file mode 100644 index ac275a952f..0000000000 --- a/docs/examples/guide/01bc0f2ed30eb3dd23511d01ce0ac6e1.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.transform.start_transform( - transform_id: 'ecommerce_transform' -) -puts response ----- diff --git a/docs/examples/guide/01da9e0620e48270617fc248e6415cac.asciidoc b/docs/examples/guide/01da9e0620e48270617fc248e6415cac.asciidoc deleted file mode 100644 index a666328412..0000000000 --- a/docs/examples/guide/01da9e0620e48270617fc248e6415cac.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - aggregations: { - "my-agg-name": { - terms: { - field: 'my-field' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/01f50acf7998b24969f451e922d145eb.asciidoc b/docs/examples/guide/01f50acf7998b24969f451e922d145eb.asciidoc deleted file mode 100644 index 8ca767e67e..0000000000 --- a/docs/examples/guide/01f50acf7998b24969f451e922d145eb.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'basque_example', - body: { - settings: { - analysis: { - filter: { - basque_stop: { - type: 'stop', - stopwords: '_basque_' - }, - basque_keywords: { - type: 'keyword_marker', - keywords: [ - 'Adibidez' - ] - }, - basque_stemmer: { - type: 'stemmer', - language: 'basque' - } - }, - analyzer: { - rebuilt_basque: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'basque_stop', - 'basque_keywords', - 'basque_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0246f73cc2ed3dfec577119e8cd15404.asciidoc b/docs/examples/guide/0246f73cc2ed3dfec577119e8cd15404.asciidoc deleted file mode 100644 index 265eba70c8..0000000000 --- a/docs/examples/guide/0246f73cc2ed3dfec577119e8cd15404.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - properties: { - name: { - properties: { - last: { - type: 'text' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/025155da86802ebf4c3aeee5aab692f9.asciidoc b/docs/examples/guide/025155da86802ebf4c3aeee5aab692f9.asciidoc deleted file mode 100644 index f88af02593..0000000000 --- a/docs/examples/guide/025155da86802ebf4c3aeee5aab692f9.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'sales', - body: { - mappings: { - properties: { - tags: { - type: 'keyword' - }, - comments: { - type: 'nested', - properties: { - username: { - type: 'keyword' - }, - comment: { - type: 'text' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0264e994a7e68561e2ca6be0f0d90ee9.asciidoc b/docs/examples/guide/0264e994a7e68561e2ca6be0f0d90ee9.asciidoc deleted file mode 100644 index f5955cef9e..0000000000 --- a/docs/examples/guide/0264e994a7e68561e2ca6be0f0d90ee9.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - "JapaneseCars": { - terms: { - field: 'make', - include: [ - 'mazda', - 'honda' - ] - } - }, - "ActiveCarManufacturers": { - terms: { - field: 'make', - exclude: [ - 'rover', - 'jensen' - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/02853293a5b7cd9cc7a886eb413bbeb6.asciidoc b/docs/examples/guide/02853293a5b7cd9cc7a886eb413bbeb6.asciidoc deleted file mode 100644 index d9972117f3..0000000000 --- a/docs/examples/guide/02853293a5b7cd9cc7a886eb413bbeb6.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'keyword', - char_filter: [ - { - type: 'mapping', - mappings: [ - '٠ => 0', - '١ => 1', - '٢ => 2', - '٣ => 3', - '٤ => 4', - '٥ => 5', - '٦ => 6', - '٧ => 7', - '٨ => 8', - '٩ => 9' - ] - } - ], - text: 'My license plate is ٢٥٠١٥' - } -) -puts response ----- diff --git a/docs/examples/guide/029de2f5383a42e1ac4ca1565bd2a130.asciidoc b/docs/examples/guide/029de2f5383a42e1ac4ca1565bd2a130.asciidoc deleted file mode 100644 index e1b67884dc..0000000000 --- a/docs/examples/guide/029de2f5383a42e1ac4ca1565bd2a130.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - full_name: { - type: 'text', - index_prefixes: { - min_chars: 1, - max_chars: 10 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/02b00f21e9d23d82276ace0dd154d779.asciidoc b/docs/examples/guide/02b00f21e9d23d82276ace0dd154d779.asciidoc deleted file mode 100644 index cae2a04070..0000000000 --- a/docs/examples/guide/02b00f21e9d23d82276ace0dd154d779.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - routing: 'user1,user2', - body: { - query: { - match: { - title: 'document' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/02b6aa3e5652839f03de3a655854b897.asciidoc b/docs/examples/guide/02b6aa3e5652839f03de3a655854b897.asciidoc deleted file mode 100644 index 262aa3d102..0000000000 --- a/docs/examples/guide/02b6aa3e5652839f03de3a655854b897.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/02c48d461536709c3fc8a0e8147c3787.asciidoc b/docs/examples/guide/02c48d461536709c3fc8a0e8147c3787.asciidoc deleted file mode 100644 index 474eac3b58..0000000000 --- a/docs/examples/guide/02c48d461536709c3fc8a0e8147c3787.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'pipelineB', - body: { - description: 'outer pipeline', - processors: [ - { - pipeline: { - name: 'pipelineA' - } - }, - { - set: { - field: 'outer_pipeline_set', - value: 'outer' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/02f65c6bab8f40bf3ce18160623d1870.asciidoc b/docs/examples/guide/02f65c6bab8f40bf3ce18160623d1870.asciidoc deleted file mode 100644 index bffe1567c1..0000000000 --- a/docs/examples/guide/02f65c6bab8f40bf3ce18160623d1870.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_template( - name: 'template_1' -) -puts response ----- diff --git a/docs/examples/guide/02fad6b80bb29c2a7e6840db2fc67b18.asciidoc b/docs/examples/guide/02fad6b80bb29c2a7e6840db2fc67b18.asciidoc deleted file mode 100644 index d417868cd4..0000000000 --- a/docs/examples/guide/02fad6b80bb29c2a7e6840db2fc67b18.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - my_wildcard: { - type: 'wildcard' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - my_wildcard: 'This string can be quite lengthy' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - wildcard: { - my_wildcard: { - value: '*quite*lengthy' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0308cbd85281f95fc458042afe3f587d.asciidoc b/docs/examples/guide/0308cbd85281f95fc458042afe3f587d.asciidoc deleted file mode 100644 index 1618bb9723..0000000000 --- a/docs/examples/guide/0308cbd85281f95fc458042afe3f587d.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'my-index-000001', - id: 0, - _source: '*.id' -) -puts response ----- diff --git a/docs/examples/guide/032eac56b798bea29390e102538f4a26.asciidoc b/docs/examples/guide/032eac56b798bea29390e102538f4a26.asciidoc deleted file mode 100644 index 83d77f5852..0000000000 --- a/docs/examples/guide/032eac56b798bea29390e102538f4a26.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.refresh( - index: 'my-index-000001,my-index-000002' -) -puts response ----- diff --git a/docs/examples/guide/033838729cfb5d1a28d04f69ee78d924.asciidoc b/docs/examples/guide/033838729cfb5d1a28d04f69ee78d924.asciidoc deleted file mode 100644 index 9afab92f19..0000000000 --- a/docs/examples/guide/033838729cfb5d1a28d04f69ee78d924.asciidoc +++ /dev/null @@ -1,41 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'Polygon', - orientation: 'LEFT', - coordinates: [ - [ - [ - -177, - 10 - ], - [ - 176, - 15 - ], - [ - 172, - 0 - ], - [ - 176, - -15 - ], - [ - -177, - -10 - ], - [ - -177, - 10 - ] - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/0350410d11579f4e876c798ce1eaef5b.asciidoc b/docs/examples/guide/0350410d11579f4e876c798ce1eaef5b.asciidoc deleted file mode 100644 index 4382f16605..0000000000 --- a/docs/examples/guide/0350410d11579f4e876c798ce1eaef5b.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 5, - refresh: true, - body: { - query: { - bool: { - should: [ - { - match: { - message: { - query: 'Japanese art', - _name: 'query1' - } - } - }, - { - match: { - message: { - query: 'Holand culture', - _name: 'query2' - } - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/03582fc93683e573062bcfda45e01d69.asciidoc b/docs/examples/guide/03582fc93683e573062bcfda45e01d69.asciidoc deleted file mode 100644 index fccacf3c74..0000000000 --- a/docs/examples/guide/03582fc93683e573062bcfda45e01d69.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_custom_analyzer: { - type: 'custom', - tokenizer: 'standard', - char_filter: [ - 'html_strip' - ], - filter: [ - 'lowercase', - 'asciifolding' - ] - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_custom_analyzer', - text: 'Is this déjà vu?' - } -) -puts response ----- diff --git a/docs/examples/guide/035a7a919eb6513b4769a3727b7d6447.asciidoc b/docs/examples/guide/035a7a919eb6513b4769a3727b7d6447.asciidoc deleted file mode 100644 index abc3ecec7c..0000000000 --- a/docs/examples/guide/035a7a919eb6513b4769a3727b7d6447.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - analyzer: 'whitespace', - text: 'The quick brown fox.' - } -) -puts response ----- diff --git a/docs/examples/guide/03b1d76fa0b773d5b7d74ecb7e1e1a80.asciidoc b/docs/examples/guide/03b1d76fa0b773d5b7d74ecb7e1e1a80.asciidoc deleted file mode 100644 index e692e58d76..0000000000 --- a/docs/examples/guide/03b1d76fa0b773d5b7d74ecb7e1e1a80.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.restore( - repository: 'my_repository', - snapshot: 'my_snapshot_2099.05.06', - body: { - indices: 'my-index,logs-my_app-default', - rename_pattern: '(.+)', - rename_replacement: 'restored-$1' - } -) -puts response ----- diff --git a/docs/examples/guide/04412d11783dac25b5fd2ec5407078a3.asciidoc b/docs/examples/guide/04412d11783dac25b5fd2ec5407078a3.asciidoc deleted file mode 100644 index 70b13f8c28..0000000000 --- a/docs/examples/guide/04412d11783dac25b5fd2ec5407078a3.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_api_key_id( - connector_id: 'my-connector', - body: { - api_key_id: 'my-api-key-id', - api_key_secret_id: 'my-connector-secret-id' - } -) -puts response ----- diff --git a/docs/examples/guide/047266b0d20fdb62ebc72d51952c8f6d.asciidoc b/docs/examples/guide/047266b0d20fdb62ebc72d51952c8f6d.asciidoc deleted file mode 100644 index 27ef7dd94f..0000000000 --- a/docs/examples/guide/047266b0d20fdb62ebc72d51952c8f6d.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - multi_match: { - query: 'Will Smith', - type: 'cross_fields', - fields: [ - 'first_name', - 'last_name' - ], - operator: 'and' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/048652b6abfe195da8ea8cef10ee01b1.asciidoc b/docs/examples/guide/048652b6abfe195da8ea8cef10ee01b1.asciidoc deleted file mode 100644 index 3a235d54cd..0000000000 --- a/docs/examples/guide/048652b6abfe195da8ea8cef10ee01b1.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.transform.reset_transform( - transform_id: 'ecommerce_transform' -) -puts response ----- diff --git a/docs/examples/guide/04d586a536061ec1045d0bb2dc3d1a5f.asciidoc b/docs/examples/guide/04d586a536061ec1045d0bb2dc3d1a5f.asciidoc deleted file mode 100644 index d80f6dc565..0000000000 --- a/docs/examples/guide/04d586a536061ec1045d0bb2dc3d1a5f.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'set_os', - body: { - description: 'sets the value of host.os.name from the field os', - processors: [ - { - set: { - field: 'host.os.name', - value: '{{{os}}}' - } - } - ] - } -) -puts response - -response = client.ingest.simulate( - id: 'set_os', - body: { - docs: [ - { - _source: { - os: 'Ubuntu' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/04d6ce0c903bd468afbecd3aa1c4a78a.asciidoc b/docs/examples/guide/04d6ce0c903bd468afbecd3aa1c4a78a.asciidoc deleted file mode 100644 index fbe3cb621a..0000000000 --- a/docs/examples/guide/04d6ce0c903bd468afbecd3aa1c4a78a.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline-id', - body: { - description: 'My optional pipeline description', - processors: [ - { - set: { - description: 'My optional processor description', - field: 'my-keyword-field', - value: 'foo' - } - } - ], - _meta: { - reason: 'set my-keyword-field to foo', - serialization: { - class: 'MyPipeline', - id: 10 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc b/docs/examples/guide/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc deleted file mode 100644 index e3de9aa74f..0000000000 --- a/docs/examples/guide/04f5dd677c777bcb15d7d5fa63275fc8.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cluster.health( - wait_for_status: 'yellow', - timeout: '50s' -) -puts response ----- diff --git a/docs/examples/guide/0502284d4685c478eb68761f979f4303.asciidoc b/docs/examples/guide/0502284d4685c478eb68761f979f4303.asciidoc deleted file mode 100644 index 3a918f0cf8..0000000000 --- a/docs/examples/guide/0502284d4685c478eb68761f979f4303.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.ml.evaluate_data_frame( - body: { - index: 'house_price_predictions', - query: { - bool: { - filter: [ - { - term: { - 'ml.is_training' => false - } - } - ] - } - }, - evaluation: { - regression: { - actual_field: 'price', - predicted_field: 'ml.price_prediction', - metrics: { - r_squared: {}, - mse: {}, - msle: { - offset: 10 - }, - huber: { - delta: 1.5 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/050b3947025fee403232b8e6e9112dab.asciidoc b/docs/examples/guide/050b3947025fee403232b8e6e9112dab.asciidoc deleted file mode 100644 index 26cd5ca8e4..0000000000 --- a/docs/examples/guide/050b3947025fee403232b8e6e9112dab.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'yaml', - body: { - query: 'SELECT * FROM library ORDER BY page_count DESC', - fetch_size: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/0518c673094fb18ecb491a3b78af4695.asciidoc b/docs/examples/guide/0518c673094fb18ecb491a3b78af4695.asciidoc deleted file mode 100644 index b2fbf9f8c4..0000000000 --- a/docs/examples/guide/0518c673094fb18ecb491a3b78af4695.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - warm: { - actions: { - allocate: { - include: { - box_type: 'hot,warm' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/05284c8ea91769c09c8db47db8a6629a.asciidoc b/docs/examples/guide/05284c8ea91769c09c8db47db8a6629a.asciidoc deleted file mode 100644 index 1905c95948..0000000000 --- a/docs/examples/guide/05284c8ea91769c09c8db47db8a6629a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.repositories( - v: true -) -puts response ----- diff --git a/docs/examples/guide/053497b6960f80fd7b005b7c6d54358f.asciidoc b/docs/examples/guide/053497b6960f80fd7b005b7c6d54358f.asciidoc deleted file mode 100644 index 3456a20b37..0000000000 --- a/docs/examples/guide/053497b6960f80fd7b005b7c6d54358f.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - delete: { - actions: { - delete: {} - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/05500e77aef581d92f6c605f7a48f7df.asciidoc b/docs/examples/guide/05500e77aef581d92f6c605f7a48f7df.asciidoc deleted file mode 100644 index 08bd3515c9..0000000000 --- a/docs/examples/guide/05500e77aef581d92f6c605f7a48f7df.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'polygon', - coordinates: [ - [ - [ - 1000, - -1001 - ], - [ - 1001, - -1001 - ], - [ - 1001, - -1000 - ], - [ - 1000, - -1000 - ], - [ - 1000, - -1001 - ] - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/059e04aaf093379401f665c33ac796dc.asciidoc b/docs/examples/guide/059e04aaf093379401f665c33ac796dc.asciidoc deleted file mode 100644 index 79f5d32fc0..0000000000 --- a/docs/examples/guide/059e04aaf093379401f665c33ac796dc.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - { - type: 'keyword_marker', - keywords: [ - 'jumping' - ] - }, - 'stemmer' - ], - text: 'fox running and jumping', - explain: true, - attributes: 'keyword' - } -) -puts response ----- diff --git a/docs/examples/guide/05a09078fe1016e900e445ad4039cf97.asciidoc b/docs/examples/guide/05a09078fe1016e900e445ad4039cf97.asciidoc deleted file mode 100644 index 3456e7448c..0000000000 --- a/docs/examples/guide/05a09078fe1016e900e445ad4039cf97.asciidoc +++ /dev/null @@ -1,81 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'clientips', - body: { - mappings: { - properties: { - client_ip: { - type: 'keyword' - }, - env: { - type: 'keyword' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'clientips', - body: [ - { - index: {} - }, - { - client_ip: '172.21.0.5', - env: 'Development' - }, - { - index: {} - }, - { - client_ip: '172.21.2.113', - env: 'QA' - }, - { - index: {} - }, - { - client_ip: '172.21.2.162', - env: 'QA' - }, - { - index: {} - }, - { - client_ip: '172.21.3.15', - env: 'Production' - }, - { - index: {} - }, - { - client_ip: '172.21.3.16', - env: 'Production' - } - ] -) -puts response - -response = client.enrich.put_policy( - name: 'clientip_policy', - body: { - match: { - indices: 'clientips', - match_field: 'client_ip', - enrich_fields: [ - 'env' - ] - } - } -) -puts response - -response = client.enrich.execute_policy( - name: 'clientip_policy', - wait_for_completion: false -) -puts response ----- diff --git a/docs/examples/guide/05ba0fdd0215e313ecea8a2f8f5a43b4.asciidoc b/docs/examples/guide/05ba0fdd0215e313ecea8a2f8f5a43b4.asciidoc deleted file mode 100644 index de2df2009a..0000000000 --- a/docs/examples/guide/05ba0fdd0215e313ecea8a2f8f5a43b4.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_data_stream( - name: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/05f4a4b284f68f7fb13603d7cd854083.asciidoc b/docs/examples/guide/05f4a4b284f68f7fb13603d7cd854083.asciidoc deleted file mode 100644 index 1a788829a4..0000000000 --- a/docs/examples/guide/05f4a4b284f68f7fb13603d7cd854083.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'logs-my_app-default', - body: { - index: { - lifecycle: { - name: 'new-lifecycle-policy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0601b5cb5328c9ebff30f4be1b210f93.asciidoc b/docs/examples/guide/0601b5cb5328c9ebff30f4be1b210f93.asciidoc deleted file mode 100644 index 71834cfff9..0000000000 --- a/docs/examples/guide/0601b5cb5328c9ebff30f4be1b210f93.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.status( - repository: 'my_repository', - snapshot: 'snapshot_2' -) -puts response ----- diff --git a/docs/examples/guide/060a56477e39f272fc5a9cfe47443cf1.asciidoc b/docs/examples/guide/060a56477e39f272fc5a9cfe47443cf1.asciidoc deleted file mode 100644 index 5da0dd5d43..0000000000 --- a/docs/examples/guide/060a56477e39f272fc5a9cfe47443cf1.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'my_tokenizer' - } - }, - tokenizer: { - my_tokenizer: { - type: 'simple_pattern', - pattern: '[0123456789]{3}' - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_analyzer', - text: 'fd-786-335-514-x' - } -) -puts response ----- diff --git a/docs/examples/guide/06454a8e85e2d3479c90390bb955eb39.asciidoc b/docs/examples/guide/06454a8e85e2d3479c90390bb955eb39.asciidoc deleted file mode 100644 index 14d18ed649..0000000000 --- a/docs/examples/guide/06454a8e85e2d3479c90390bb955eb39.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get( - repository: 'my_repository', - snapshot: 'snapshot*,-snapshot_3', - sort: 'name' -) -puts response ----- diff --git a/docs/examples/guide/066e0bdcdfa3b8afa5d1e5777f73fccb.asciidoc b/docs/examples/guide/066e0bdcdfa3b8afa5d1e5777f73fccb.asciidoc deleted file mode 100644 index 2970d32534..0000000000 --- a/docs/examples/guide/066e0bdcdfa3b8afa5d1e5777f73fccb.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.rollover( - alias: 'my-alias', - body: { - conditions: { - max_age: '7d', - max_docs: 1000, - max_primary_shard_size: '50gb', - max_primary_shard_docs: '2000' - } - } -) -puts response ----- diff --git a/docs/examples/guide/069030e5f43d8f8ce3e3eca40205027e.asciidoc b/docs/examples/guide/069030e5f43d8f8ce3e3eca40205027e.asciidoc deleted file mode 100644 index be881fc2db..0000000000 --- a/docs/examples/guide/069030e5f43d8f8ce3e3eca40205027e.asciidoc +++ /dev/null @@ -1,57 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - manager: { - properties: { - age: { - type: 'integer' - }, - name: { - type: 'text' - } - } - }, - employees: { - type: 'nested', - properties: { - age: { - type: 'integer' - }, - name: { - type: 'text' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - region: 'US', - manager: { - name: 'Alice White', - age: 30 - }, - employees: [ - { - name: 'John Smith', - age: 34 - }, - { - name: 'Peter Brown', - age: 26 - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/06a761823a694850a6efe5d5bf61478c.asciidoc b/docs/examples/guide/06a761823a694850a6efe5d5bf61478c.asciidoc deleted file mode 100644 index 3cc7753087..0000000000 --- a/docs/examples/guide/06a761823a694850a6efe5d5bf61478c.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.enrich.put_policy( - name: 'users-policy', - body: { - match: { - indices: 'users', - match_field: 'email', - enrich_fields: [ - 'first_name', - 'last_name', - 'city', - 'zip', - 'state' - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/06b5d3d56c4d4e3b61ae42ea26401c40.asciidoc b/docs/examples/guide/06b5d3d56c4d4e3b61ae42ea26401c40.asciidoc deleted file mode 100644 index 731cdabe85..0000000000 --- a/docs/examples/guide/06b5d3d56c4d4e3b61ae42ea26401c40.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.msearch( - index: 'my-index-000001', - body: [ - {}, - { - query: { - match: { - message: 'this is a test' - } - } - }, - { - index: 'my-index-000002' - }, - { - query: { - match_all: {} - } - } - ] -) -puts response ----- diff --git a/docs/examples/guide/06d65e3505dcb306977185e8545cf4a8.asciidoc b/docs/examples/guide/06d65e3505dcb306977185e8545cf4a8.asciidoc deleted file mode 100644 index 8ea30df5e7..0000000000 --- a/docs/examples/guide/06d65e3505dcb306977185e8545cf4a8.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.total_shards_per_node' => 400 - } - } -) -puts response ----- diff --git a/docs/examples/guide/070cf72783cfe534a04f2f64e4016052.asciidoc b/docs/examples/guide/070cf72783cfe534a04f2f64e4016052.asciidoc deleted file mode 100644 index c9cd446c1f..0000000000 --- a/docs/examples/guide/070cf72783cfe534a04f2f64e4016052.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - subobjects: false - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'metric_1', - body: { - time: '100ms', - 'time.min' => '10ms', - 'time.max' => '900ms' - } -) -puts response ----- diff --git a/docs/examples/guide/0718a0b4f4905a8c90c1ff93de557e56.asciidoc b/docs/examples/guide/0718a0b4f4905a8c90c1ff93de557e56.asciidoc deleted file mode 100644 index ba65274fc7..0000000000 --- a/docs/examples/guide/0718a0b4f4905a8c90c1ff93de557e56.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'exams', - body: { - size: 0, - aggregations: { - grades_stats: { - extended_stats: { - field: 'grade', - sigma: 3 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0737ebaea33631f001fb3f4226948492.asciidoc b/docs/examples/guide/0737ebaea33631f001fb3f4226948492.asciidoc deleted file mode 100644 index 3d5edd955c..0000000000 --- a/docs/examples/guide/0737ebaea33631f001fb3f4226948492.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my_ip_locations', - body: { - mappings: { - properties: { - geoip: { - properties: { - location: { - type: 'geo_point' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0755471d7dce4785d2e7ed0c10182ea3.asciidoc b/docs/examples/guide/0755471d7dce4785d2e7ed0c10182ea3.asciidoc deleted file mode 100644 index 36de4dcf43..0000000000 --- a/docs/examples/guide/0755471d7dce4785d2e7ed0c10182ea3.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.transform.get_transform_stats( - transform_id: 'ecommerce-customer-transform' -) -puts response ----- diff --git a/docs/examples/guide/07a5fdeb7805cec1d28ba288b28f5ff5.asciidoc b/docs/examples/guide/07a5fdeb7805cec1d28ba288b28f5ff5.asciidoc deleted file mode 100644 index 1f000c1352..0000000000 --- a/docs/examples/guide/07a5fdeb7805cec1d28ba288b28f5ff5.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.rollup.stop_job( - id: 'sensor', - wait_for_completion: true, - timeout: '10s' -) -puts response ----- diff --git a/docs/examples/guide/07ba3eaa931f2cf110052e3544db51f8.asciidoc b/docs/examples/guide/07ba3eaa931f2cf110052e3544db51f8.asciidoc deleted file mode 100644 index 3bb9d9604f..0000000000 --- a/docs/examples/guide/07ba3eaa931f2cf110052e3544db51f8.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - max_docs: 10, - source: { - index: 'my-index-000001', - query: { - function_score: { - random_score: {}, - min_score: 0.9 - } - } - }, - dest: { - index: 'my-new-index-000001' - } - } -) -puts response ----- diff --git a/docs/examples/guide/07c07f6d497b1a3012aa4320f830e09e.asciidoc b/docs/examples/guide/07c07f6d497b1a3012aa4320f830e09e.asciidoc deleted file mode 100644 index 9b656b7e25..0000000000 --- a/docs/examples/guide/07c07f6d497b1a3012aa4320f830e09e.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.ccr.forget_follower( - index: 'leader_index', - body: { - follower_cluster: 'follower_cluster', - follower_index: 'follower_index', - follower_index_uuid: 'vYpnaWPRQB6mNspmoCeYyA', - leader_remote_cluster: 'leader_cluster' - } -) -puts response ----- diff --git a/docs/examples/guide/07de76cb0e7f11c7533788faf8c093c3.asciidoc b/docs/examples/guide/07de76cb0e7f11c7533788faf8c093c3.asciidoc deleted file mode 100644 index d3ecbd4c96..0000000000 --- a/docs/examples/guide/07de76cb0e7f11c7533788faf8c093c3.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - title: { - type: 'text' - }, - labels: { - type: 'flattened' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/07ec38b97601286ec106986a84e1e5f7.asciidoc b/docs/examples/guide/07ec38b97601286ec106986a84e1e5f7.asciidoc deleted file mode 100644 index cafdcf46fe..0000000000 --- a/docs/examples/guide/07ec38b97601286ec106986a84e1e5f7.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'job-candidates', - body: { - mappings: { - properties: { - name: { - type: 'keyword' - }, - programming_languages: { - type: 'keyword' - }, - required_matches: { - type: 'long' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/080c34d8151d02b760571e3a2899fa97.asciidoc b/docs/examples/guide/080c34d8151d02b760571e3a2899fa97.asciidoc deleted file mode 100644 index 68b8abbfba..0000000000 --- a/docs/examples/guide/080c34d8151d02b760571e3a2899fa97.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - settings: { - analysis: { - filter: { - email: { - type: 'pattern_capture', - preserve_original: true, - patterns: [ - '([^@]+)', - '(\\p{L}+)', - '(\\d+)', - '@(.+)' - ] - } - }, - analyzer: { - email: { - tokenizer: 'uax_url_email', - filter: [ - 'email', - 'lowercase', - 'unique' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/083e514297c09e91211f0d168aef1b0b.asciidoc b/docs/examples/guide/083e514297c09e91211f0d168aef1b0b.asciidoc deleted file mode 100644 index 12732cfa40..0000000000 --- a/docs/examples/guide/083e514297c09e91211f0d168aef1b0b.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'logs-generic-default', - body: { - query: { - match: { - 'event.sequence' => '97' - } - }, - script: { - source: 'ctx._source.event.original = params.new_event', - lang: 'painless', - params: { - new_event: 'FOOBAR' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/086ec4c5d86bbf80fb80162e94037689.asciidoc b/docs/examples/guide/086ec4c5d86bbf80fb80162e94037689.asciidoc deleted file mode 100644 index 66813eba78..0000000000 --- a/docs/examples/guide/086ec4c5d86bbf80fb80162e94037689.asciidoc +++ /dev/null @@ -1,48 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - weighted_tokens: { - query_expansion_field: { - tokens: { - "2161": 0.4679, - "2621": 0.307, - "2782": 0.1299, - "2851": 0.1056, - "3088": 0.3041, - "3376": 0.1038, - "3467": 0.4873, - "3684": 0.8958, - "4380": 0.334, - "4542": 0.4636, - "4633": 2.2805, - "4785": 1.2628, - "4860": 1.0655, - "5133": 1.0709, - "7139": 1.0016, - "7224": 0.2486, - "7387": 0.0985, - "7394": 0.0542, - "8915": 0.369, - "9156": 2.8947, - "10505": 0.2771, - "11464": 0.3996, - "13525": 0.0088, - "14178": 0.8161, - "16893": 0.1376, - "17851": 1.5348, - "19939": 0.6012 - }, - pruning_config: { - tokens_freq_ratio_threshold: 5, - tokens_weight_threshold: 0.4, - only_score_pruned_tokens: false - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/08a76b3f5a8394d8f9084113334a260a.asciidoc b/docs/examples/guide/08a76b3f5a8394d8f9084113334a260a.asciidoc deleted file mode 100644 index 4f79f49626..0000000000 --- a/docs/examples/guide/08a76b3f5a8394d8f9084113334a260a.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_boxplot: { - boxplot: { - field: 'load_time', - compression: 200 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/08c9af9dd519c011deedd406f3061836.asciidoc b/docs/examples/guide/08c9af9dd519c011deedd406f3061836.asciidoc deleted file mode 100644 index b9e7c5f97b..0000000000 --- a/docs/examples/guide/08c9af9dd519c011deedd406f3061836.asciidoc +++ /dev/null @@ -1,50 +0,0 @@ -[source, ruby] ----- -response = client.ml.preview_datafeed( - body: { - datafeed_config: { - indices: [ - 'kibana_sample_data_ecommerce' - ], - query: { - bool: { - filter: [ - { - term: { - _index: 'kibana_sample_data_ecommerce' - } - } - ] - } - }, - scroll_size: 1000 - }, - job_config: { - description: 'Find customers spending an unusually high amount in an hour', - analysis_config: { - bucket_span: '1h', - detectors: [ - { - detector_description: 'High total sales', - function: 'high_sum', - field_name: 'taxful_total_price', - over_field_name: 'customer_full_name.keyword' - } - ], - influencers: [ - 'customer_full_name.keyword', - 'category.keyword' - ] - }, - analysis_limits: { - model_memory_limit: '10mb' - }, - data_description: { - time_field: 'order_date', - time_format: 'epoch_ms' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/08e08feb514b24006e13f258d617d873.asciidoc b/docs/examples/guide/08e08feb514b24006e13f258d617d873.asciidoc deleted file mode 100644 index d6e696d0ab..0000000000 --- a/docs/examples/guide/08e08feb514b24006e13f258d617d873.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.get_script( - id: 'calculate-score' -) -puts response ----- diff --git a/docs/examples/guide/08e79ca9fdcdfebb2c6a79e6837e649d.asciidoc b/docs/examples/guide/08e79ca9fdcdfebb2c6a79e6837e649d.asciidoc deleted file mode 100644 index 9364aa1746..0000000000 --- a/docs/examples/guide/08e79ca9fdcdfebb2c6a79e6837e649d.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - tag_cardinality: { - cardinality: { - field: 'tag', - missing: 'N/A' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/08f20902821a4f7a73ce7b959c5bdbdc.asciidoc b/docs/examples/guide/08f20902821a4f7a73ce7b959c5bdbdc.asciidoc deleted file mode 100644 index b09f73849c..0000000000 --- a/docs/examples/guide/08f20902821a4f7a73ce7b959c5bdbdc.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - regexp: { - 'user.id' => { - value: 'k.*y', - flags: 'ALL', - case_insensitive: true, - max_determinized_states: 10_000, - rewrite: 'constant_score_blended' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/091200b658023db31dffc2f08a85a9cc.asciidoc b/docs/examples/guide/091200b658023db31dffc2f08a85a9cc.asciidoc deleted file mode 100644 index 2978aa101a..0000000000 --- a/docs/examples/guide/091200b658023db31dffc2f08a85a9cc.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - index: { - 'routing.allocation.total_shards_per_node' => -1 - } - } -) -puts response ----- diff --git a/docs/examples/guide/0957bbd535f58c97b12ffba90813d64c.asciidoc b/docs/examples/guide/0957bbd535f58c97b12ffba90813d64c.asciidoc deleted file mode 100644 index f5c1386805..0000000000 --- a/docs/examples/guide/0957bbd535f58c97b12ffba90813d64c.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'analyze_sample', - body: { - settings: { - 'index.analyze.max_token_count' => 20_000 - } - } -) -puts response ----- diff --git a/docs/examples/guide/095d60b2cfc5004c97efc49f27287262.asciidoc b/docs/examples/guide/095d60b2cfc5004c97efc49f27287262.asciidoc deleted file mode 100644 index cd7377fe7a..0000000000 --- a/docs/examples/guide/095d60b2cfc5004c97efc49f27287262.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - sales_over_time: { - date_histogram: { - field: 'date', - fixed_interval: '30d' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/09769561f082b50558fb7d8707719963.asciidoc b/docs/examples/guide/09769561f082b50558fb7d8707719963.asciidoc deleted file mode 100644 index 9f3f884651..0000000000 --- a/docs/examples/guide/09769561f082b50558fb7d8707719963.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - metric: 'ingest', - filter_path: 'nodes.*.ingest' -) -puts response ----- diff --git a/docs/examples/guide/099006ab11b52ea99693401dceee8bad.asciidoc b/docs/examples/guide/099006ab11b52ea99693401dceee8bad.asciidoc deleted file mode 100644 index e6281251b5..0000000000 --- a/docs/examples/guide/099006ab11b52ea99693401dceee8bad.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.put_script( - id: 'calculate-score', - body: { - script: { - lang: 'painless', - source: "Math.log(_score * 2) + params['my_modifier']" - } - } -) -puts response ----- diff --git a/docs/examples/guide/09944369863fd8666d5301d717317276.asciidoc b/docs/examples/guide/09944369863fd8666d5301d717317276.asciidoc deleted file mode 100644 index 57af1b5507..0000000000 --- a/docs/examples/guide/09944369863fd8666d5301d717317276.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - { - type: 'condition', - filter: [ - 'lowercase' - ], - script: { - source: 'token.getTerm().length() < 5' - } - } - ], - text: 'THE QUICK BROWN FOX' - } -) -puts response ----- diff --git a/docs/examples/guide/09a44b619a99f6bf3f01bd5e258fd22d.asciidoc b/docs/examples/guide/09a44b619a99f6bf3f01bd5e258fd22d.asciidoc deleted file mode 100644 index ec431700d0..0000000000 --- a/docs/examples/guide/09a44b619a99f6bf3f01bd5e258fd22d.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'keyword', - text: 'New York' - } -) -puts response ----- diff --git a/docs/examples/guide/09a478fe32a7b7d814083ffa5297bcdf.asciidoc b/docs/examples/guide/09a478fe32a7b7d814083ffa5297bcdf.asciidoc deleted file mode 100644 index 9b1e738eab..0000000000 --- a/docs/examples/guide/09a478fe32a7b7d814083ffa5297bcdf.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - fuzzy: { - 'user.id' => { - value: 'ki' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/09bdf9a7e22733d668476724042a406c.asciidoc b/docs/examples/guide/09bdf9a7e22733d668476724042a406c.asciidoc deleted file mode 100644 index b4cb5b0eba..0000000000 --- a/docs/examples/guide/09bdf9a7e22733d668476724042a406c.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'timeseries_template', - body: { - index_patterns: [ - 'timeseries' - ], - data_stream: {}, - template: { - settings: { - number_of_shards: 1, - number_of_replicas: 1, - 'index.lifecycle.name' => 'timeseries_policy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/09d617863a103c82fb4101e6165ea7fe.asciidoc b/docs/examples/guide/09d617863a103c82fb4101e6165ea7fe.asciidoc deleted file mode 100644 index fde6242b68..0000000000 --- a/docs/examples/guide/09d617863a103c82fb4101e6165ea7fe.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match_all: {} - } - } -) -puts response ----- diff --git a/docs/examples/guide/09e6e06ba562f4b9bac59455e9151a80.asciidoc b/docs/examples/guide/09e6e06ba562f4b9bac59455e9151a80.asciidoc deleted file mode 100644 index dd3a8d7471..0000000000 --- a/docs/examples/guide/09e6e06ba562f4b9bac59455e9151a80.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.ml.evaluate_data_frame( - body: { - index: 'animal_classification', - evaluation: { - classification: { - actual_field: 'animal_class', - metrics: { - auc_roc: { - class_name: 'dog' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0a3003fa5af850e415634b50b1029859.asciidoc b/docs/examples/guide/0a3003fa5af850e415634b50b1029859.asciidoc deleted file mode 100644 index 90fe82158f..0000000000 --- a/docs/examples/guide/0a3003fa5af850e415634b50b1029859.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'logs-generic-default*', - filter_path: 'hits.hits._index', - body: { - query: { - match: { - 'event.sequence' => '97' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0a3186bf20b5359393406fc0cb433313.asciidoc b/docs/examples/guide/0a3186bf20b5359393406fc0cb433313.asciidoc deleted file mode 100644 index 156eb180a6..0000000000 --- a/docs/examples/guide/0a3186bf20b5359393406fc0cb433313.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'json', - body: { - query: 'SELECT * FROM library ORDER BY page_count DESC', - fetch_size: 5, - columnar: true - } -) -puts response ----- diff --git a/docs/examples/guide/0a46ac2968a574ce145f197f10d30152.asciidoc b/docs/examples/guide/0a46ac2968a574ce145f197f10d30152.asciidoc deleted file mode 100644 index dfc6e7fa64..0000000000 --- a/docs/examples/guide/0a46ac2968a574ce145f197f10d30152.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'library', - refresh: true, - body: [ - { - index: { - _id: 'Leviathan Wakes' - } - }, - { - name: 'Leviathan Wakes', - author: 'James S.A. Corey', - release_date: '2011-06-02', - page_count: 561 - }, - { - index: { - _id: 'Hyperion' - } - }, - { - name: 'Hyperion', - author: 'Dan Simmons', - release_date: '1989-05-26', - page_count: 482 - }, - { - index: { - _id: 'Dune' - } - }, - { - name: 'Dune', - author: 'Frank Herbert', - release_date: '1965-06-01', - page_count: 604 - } - ] -) -puts response ----- diff --git a/docs/examples/guide/0a46cc8fe93e372909660a63dc52ae3b.asciidoc b/docs/examples/guide/0a46cc8fe93e372909660a63dc52ae3b.asciidoc deleted file mode 100644 index faa598d71e..0000000000 --- a/docs/examples/guide/0a46cc8fe93e372909660a63dc52ae3b.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: '', - body: { - aliases: { - "my-alias": { - is_write_index: true - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0a650401134f07e40216f0d0d1a66a32.asciidoc b/docs/examples/guide/0a650401134f07e40216f0d0d1a66a32.asciidoc deleted file mode 100644 index ae6b0b230b..0000000000 --- a/docs/examples/guide/0a650401134f07e40216f0d0d1a66a32.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.allocation( - v: true -) -puts response ----- diff --git a/docs/examples/guide/0a758d9dec74d9e942cf41a06499234f.asciidoc b/docs/examples/guide/0a758d9dec74d9e942cf41a06499234f.asciidoc deleted file mode 100644 index 2036e91fce..0000000000 --- a/docs/examples/guide/0a758d9dec74d9e942cf41a06499234f.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - counter: 1, - tags: [ - 'red' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/0a84c5b7c0793be745b13eaf13e94422.asciidoc b/docs/examples/guide/0a84c5b7c0793be745b13eaf13e94422.asciidoc deleted file mode 100644 index ebbfac8bd3..0000000000 --- a/docs/examples/guide/0a84c5b7c0793be745b13eaf13e94422.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - index: { - 'routing.allocation.total_shards_per_node' => '2' - } - } -) -puts response ----- diff --git a/docs/examples/guide/0a9173f3b22716c78653976dc4799eae.asciidoc b/docs/examples/guide/0a9173f3b22716c78653976dc4799eae.asciidoc deleted file mode 100644 index 4529441b4b..0000000000 --- a/docs/examples/guide/0a9173f3b22716c78653976dc4799eae.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - product: { - terms: { - field: 'product' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0ac9e7dd7e4acba51888256326ed5ffe.asciidoc b/docs/examples/guide/0ac9e7dd7e4acba51888256326ed5ffe.asciidoc deleted file mode 100644 index 06e9740778..0000000000 --- a/docs/examples/guide/0ac9e7dd7e4acba51888256326ed5ffe.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - track_total_hits: true, - query: { - match: { - 'user.id' => 'elkbee' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0ad86b582aff1235f37ccb2cc90adad5.asciidoc b/docs/examples/guide/0ad86b582aff1235f37ccb2cc90adad5.asciidoc deleted file mode 100644 index 518bea889e..0000000000 --- a/docs/examples/guide/0ad86b582aff1235f37ccb2cc90adad5.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.open( - index: '.ds-my-data-stream-2099.03.07-000001' -) -puts response ----- diff --git a/docs/examples/guide/0b615ff4ef5a8847ee8109b2fd11619a.asciidoc b/docs/examples/guide/0b615ff4ef5a8847ee8109b2fd11619a.asciidoc deleted file mode 100644 index ec5254d778..0000000000 --- a/docs/examples/guide/0b615ff4ef5a8847ee8109b2fd11619a.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - script_score: { - query: { - match: { - message: 'some message' - } - }, - script: { - id: 'calculate-score', - params: { - my_modifier: 2 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0b913fb9e010d877c0be015519cfddc6.asciidoc b/docs/examples/guide/0b913fb9e010d877c0be015519cfddc6.asciidoc deleted file mode 100644 index 89567134c6..0000000000 --- a/docs/examples/guide/0b913fb9e010d877c0be015519cfddc6.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - body: { - "@timestamp": '2019-05-18T15:57:27.541Z', - ip: '225.44.217.191', - extension: 'jpg', - response: '200', - geo: { - coordinates: { - lat: 38.53146222, - lon: -121.7864906 - } - }, - url: 'https://media-for-the-masses.theacademyofperformingartsandscience.org/uploads/charles-fullerton.jpg' - } -) -puts response - -response = client.index( - index: 'my-index-000002', - body: { - "@timestamp": '2019-05-20T03:44:20.844Z', - ip: '198.247.165.49', - extension: 'php', - response: '200', - geo: { - coordinates: { - lat: 37.13189556, - lon: -76.4929875 - } - }, - memory: 241_720, - url: 'https://theacademyofperformingartsandscience.org/people/type:astronauts/name:laurel-b-clark/profile' - } -) -puts response ----- diff --git a/docs/examples/guide/0b987b4101e016653a32d7b092d47e4c.asciidoc b/docs/examples/guide/0b987b4101e016653a32d7b092d47e4c.asciidoc deleted file mode 100644 index b2b8b1fbed..0000000000 --- a/docs/examples/guide/0b987b4101e016653a32d7b092d47e4c.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - region: { - type: 'keyword' - }, - manager: { - properties: { - age: { - type: 'integer' - }, - name: { - properties: { - first: { - type: 'text' - }, - last: { - type: 'text' - } - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0ba5acede9d43af424e85428e7d35420.asciidoc b/docs/examples/guide/0ba5acede9d43af424e85428e7d35420.asciidoc deleted file mode 100644 index 87819a64c9..0000000000 --- a/docs/examples/guide/0ba5acede9d43af424e85428e7d35420.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'azure_openai_embeddings', - body: { - processors: [ - { - inference: { - model_id: 'azure_openai_embeddings', - input_output: { - input_field: 'content', - output_field: 'content_embedding' - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/0bcd380315ef4691b8c79df6ca53a85f.asciidoc b/docs/examples/guide/0bcd380315ef4691b8c79df6ca53a85f.asciidoc deleted file mode 100644 index d637dac41f..0000000000 --- a/docs/examples/guide/0bcd380315ef4691b8c79df6ca53a85f.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - sort: [ - { - price: { - unmapped_type: 'long' - } - } - ], - query: { - term: { - product: 'chocolate' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0bef1fdefeb2956d60d52d3f38397cad.asciidoc b/docs/examples/guide/0bef1fdefeb2956d60d52d3f38397cad.asciidoc deleted file mode 100644 index f2b8af6b88..0000000000 --- a/docs/examples/guide/0bef1fdefeb2956d60d52d3f38397cad.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0c2d9ac7e3f28d4d802e21cbbbcfeb34.asciidoc b/docs/examples/guide/0c2d9ac7e3f28d4d802e21cbbbcfeb34.asciidoc deleted file mode 100644 index f48c5bc41d..0000000000 --- a/docs/examples/guide/0c2d9ac7e3f28d4d802e21cbbbcfeb34.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.recovery( - v: true, - h: 'i,s,t,ty,st,shost,thost,f,fp,b,bp' -) -puts response ----- diff --git a/docs/examples/guide/0c464965126cc09e6812716a145991d4.asciidoc b/docs/examples/guide/0c464965126cc09e6812716a145991d4.asciidoc deleted file mode 100644 index 32eafee405..0000000000 --- a/docs/examples/guide/0c464965126cc09e6812716a145991d4.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.nodes.info( - node_id: 'ingest' -) -puts response ----- diff --git a/docs/examples/guide/0c688eecf4ebdffdbe1deae0983c3ed8.asciidoc b/docs/examples/guide/0c688eecf4ebdffdbe1deae0983c3ed8.asciidoc deleted file mode 100644 index 6e1fd73934..0000000000 --- a/docs/examples/guide/0c688eecf4ebdffdbe1deae0983c3ed8.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'user_hits', - body: { - size: 0, - aggregations: { - users_per_day: { - date_histogram: { - field: 'timestamp', - calendar_interval: 'day' - }, - aggregations: { - distinct_users: { - cardinality: { - field: 'user_id' - } - }, - total_new_users: { - cumulative_cardinality: { - buckets_path: 'distinct_users' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0c7c40cd17985c3dd32aeaadbafc4fce.asciidoc b/docs/examples/guide/0c7c40cd17985c3dd32aeaadbafc4fce.asciidoc deleted file mode 100644 index 272df3e322..0000000000 --- a/docs/examples/guide/0c7c40cd17985c3dd32aeaadbafc4fce.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: { - query: { - match: { - message: '{{^name_exists}}Hello World{{/name_exists}}' - } - } - }, - params: { - name_exists: false - } - } -) -puts response ----- diff --git a/docs/examples/guide/0c892d328b73d38396aaef6d9cbcd36b.asciidoc b/docs/examples/guide/0c892d328b73d38396aaef6d9cbcd36b.asciidoc deleted file mode 100644 index ae63da11c5..0000000000 --- a/docs/examples/guide/0c892d328b73d38396aaef6d9cbcd36b.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.delete( - index: 'my-index-000001', - id: 1, - routing: 'shard-1' -) -puts response ----- diff --git a/docs/examples/guide/0cee58617e75f493c5049d77be1c49f3.asciidoc b/docs/examples/guide/0cee58617e75f493c5049d77be1c49f3.asciidoc deleted file mode 100644 index 3a25f0bc33..0000000000 --- a/docs/examples/guide/0cee58617e75f493c5049d77be1c49f3.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - fuzzy: { - 'user.id' => { - value: 'ki', - fuzziness: 'AUTO', - max_expansions: 50, - prefix_length: 0, - transpositions: true, - rewrite: 'constant_score_blended' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0cf29da4b9f0503bd1a79bdc883aadbc.asciidoc b/docs/examples/guide/0cf29da4b9f0503bd1a79bdc883aadbc.asciidoc deleted file mode 100644 index 642fe40df3..0000000000 --- a/docs/examples/guide/0cf29da4b9f0503bd1a79bdc883aadbc.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'exams', - size: 0, - body: { - runtime_mappings: { - 'grade.corrected' => { - type: 'double', - script: { - source: "emit(Math.min(100, doc['grade'].value * params.correction))", - params: { - correction: 1.2 - } - } - } - }, - aggregations: { - avg_corrected_grade: { - avg: { - field: 'grade.corrected' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0d0f7ece06f21e624d21b09804732f61.asciidoc b/docs/examples/guide/0d0f7ece06f21e624d21b09804732f61.asciidoc deleted file mode 100644 index 34280e827d..0000000000 --- a/docs/examples/guide/0d0f7ece06f21e624d21b09804732f61.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'exams', - size: 0, - body: { - aggregations: { - grade_avg: { - avg: { - field: 'grade', - missing: 10 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0d49474511b236bc89e768c8ee91adf1.asciidoc b/docs/examples/guide/0d49474511b236bc89e768c8ee91adf1.asciidoc deleted file mode 100644 index 189dda82fb..0000000000 --- a/docs/examples/guide/0d49474511b236bc89e768c8ee91adf1.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - simple_query_string: { - query: '"fried eggs" +(eggplant | potato) -frittata', - fields: [ - 'title^5', - 'body' - ], - default_operator: 'and' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0d54ddad2bf6f76aa5c35f53ba77748a.asciidoc b/docs/examples/guide/0d54ddad2bf6f76aa5c35f53ba77748a.asciidoc deleted file mode 100644 index 26fa25dcad..0000000000 --- a/docs/examples/guide/0d54ddad2bf6f76aa5c35f53ba77748a.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'porter_stem' - ], - text: 'the foxes jumping quickly' - } -) -puts response ----- diff --git a/docs/examples/guide/0d59af9dc556dc526b9394051efa800a.asciidoc b/docs/examples/guide/0d59af9dc556dc526b9394051efa800a.asciidoc deleted file mode 100644 index 1f27691b0f..0000000000 --- a/docs/examples/guide/0d59af9dc556dc526b9394051efa800a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.rollover( - alias: 'logs-foo-bar' -) -puts response ----- diff --git a/docs/examples/guide/0d8063b484a18f8672fb5ed8712c5c97.asciidoc b/docs/examples/guide/0d8063b484a18f8672fb5ed8712c5c97.asciidoc deleted file mode 100644 index 7daf5568e9..0000000000 --- a/docs/examples/guide/0d8063b484a18f8672fb5ed8712c5c97.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'template_1', - body: { - index_patterns: [ - 'foo', - 'bar' - ], - template: { - settings: { - number_of_shards: 3 - } - }, - _meta: { - description: 'set number of shards to three', - serialization: { - class: 'MyIndexTemplate', - id: 17 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0da477cb8a7883539ce3ae7ac1e9c5cb.asciidoc b/docs/examples/guide/0da477cb8a7883539ce3ae7ac1e9c5cb.asciidoc deleted file mode 100644 index ad6f8ec901..0000000000 --- a/docs/examples/guide/0da477cb8a7883539ce3ae7ac1e9c5cb.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - prices: { - histogram: { - field: 'price', - interval: 50, - min_doc_count: 1 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0dd30ffe2f900dde86cc9bb601d5e68e.asciidoc b/docs/examples/guide/0dd30ffe2f900dde86cc9bb601d5e68e.asciidoc deleted file mode 100644 index 6a53c97aea..0000000000 --- a/docs/examples/guide/0dd30ffe2f900dde86cc9bb601d5e68e.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodes( - v: true, - h: 'id,ip,port,v,m' -) -puts response ----- diff --git a/docs/examples/guide/0dfa9733c94bc43c6f14c7b6984c98fb.asciidoc b/docs/examples/guide/0dfa9733c94bc43c6f14c7b6984c98fb.asciidoc deleted file mode 100644 index bfa2573b3a..0000000000 --- a/docs/examples/guide/0dfa9733c94bc43c6f14c7b6984c98fb.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.component_templates( - name: 'my-template-*', - v: true, - s: 'name' -) -puts response ----- diff --git a/docs/examples/guide/0e118857b815b62118a30c042f079db1.asciidoc b/docs/examples/guide/0e118857b815b62118a30c042f079db1.asciidoc deleted file mode 100644 index e0b884bc51..0000000000 --- a/docs/examples/guide/0e118857b815b62118a30c042f079db1.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - multi_match: { - query: 'quick brown f', - type: 'phrase_prefix', - fields: [ - 'subject', - 'message' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0e3b4a48a3450cd99c95ec46d4701b58.asciidoc b/docs/examples/guide/0e3b4a48a3450cd99c95ec46d4701b58.asciidoc deleted file mode 100644 index 57c8db68ce..0000000000 --- a/docs/examples/guide/0e3b4a48a3450cd99c95ec46d4701b58.asciidoc +++ /dev/null @@ -1,41 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - filter_path: 'aggregations', - body: { - aggregations: { - hats: { - filter: { - term: { - type: 'hat' - } - }, - aggregations: { - avg_price: { - avg: { - field: 'price' - } - } - } - }, - t_shirts: { - filter: { - term: { - type: 't-shirt' - } - }, - aggregations: { - avg_price: { - avg: { - field: 'price' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0e5db64154a722a5cbdb84b588ce2ce8.asciidoc b/docs/examples/guide/0e5db64154a722a5cbdb84b588ce2ce8.asciidoc deleted file mode 100644 index f2652904a4..0000000000 --- a/docs/examples/guide/0e5db64154a722a5cbdb84b588ce2ce8.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - f: { - type: 'scaled_float', - scaling_factor: 0.01 - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - f: 123 - } -) -puts response ----- diff --git a/docs/examples/guide/0e71a18d1aac61720cdc6b3f91fe643f.asciidoc b/docs/examples/guide/0e71a18d1aac61720cdc6b3f91fe643f.asciidoc deleted file mode 100644 index aa4ea9e17e..0000000000 --- a/docs/examples/guide/0e71a18d1aac61720cdc6b3f91fe643f.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - simple_query_string: { - fields: [ - 'content' - ], - query: 'foo bar -baz' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0e83f140237d75469a428ff403564bb5.asciidoc b/docs/examples/guide/0e83f140237d75469a428ff403564bb5.asciidoc deleted file mode 100644 index e81db18aed..0000000000 --- a/docs/examples/guide/0e83f140237d75469a428ff403564bb5.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.disk.watermark.low' => '100gb', - 'cluster.routing.allocation.disk.watermark.high' => '50gb', - 'cluster.routing.allocation.disk.watermark.flood_stage' => '10gb', - 'cluster.info.update.interval' => '1m' - } - } -) -puts response ----- diff --git a/docs/examples/guide/0eae571e9e1c40a40cb4b1c9530a8987.asciidoc b/docs/examples/guide/0eae571e9e1c40a40cb4b1c9530a8987.asciidoc deleted file mode 100644 index de7c0517f8..0000000000 --- a/docs/examples/guide/0eae571e9e1c40a40cb4b1c9530a8987.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.ilm.migrate_to_data_tiers( - body: { - legacy_template_to_delete: 'global-template', - node_attribute: 'custom_attribute_name' - } -) -puts response ----- diff --git a/docs/examples/guide/0eb2c1284a9829224913a860190580d8.asciidoc b/docs/examples/guide/0eb2c1284a9829224913a860190580d8.asciidoc deleted file mode 100644 index fc7e9e9a0a..0000000000 --- a/docs/examples/guide/0eb2c1284a9829224913a860190580d8.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'fingerprint_example', - body: { - settings: { - analysis: { - analyzer: { - whitespace_fingerprint: { - tokenizer: 'whitespace', - filter: [ - 'fingerprint' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0ec2178fb0103862b47cc20bc5885972.asciidoc b/docs/examples/guide/0ec2178fb0103862b47cc20bc5885972.asciidoc deleted file mode 100644 index f80dcdb0f4..0000000000 --- a/docs/examples/guide/0ec2178fb0103862b47cc20bc5885972.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.create_repository( - repository: 'my_fs_backup', - body: { - type: 'fs', - settings: { - location: 'my_fs_backup_location', - readonly: true - } - } -) -puts response ----- diff --git a/docs/examples/guide/0eccea755bd4f6dd47579a9022690546.asciidoc b/docs/examples/guide/0eccea755bd4f6dd47579a9022690546.asciidoc deleted file mode 100644 index 2a75495820..0000000000 --- a/docs/examples/guide/0eccea755bd4f6dd47579a9022690546.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - cluster: { - remote: { - my_remote: { - mode: 'proxy', - proxy_address: 'my.remote.cluster.com:9443' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0f2e5e006b663a88ee99b130ab1b4844.asciidoc b/docs/examples/guide/0f2e5e006b663a88ee99b130ab1b4844.asciidoc deleted file mode 100644 index f2fe2c785b..0000000000 --- a/docs/examples/guide/0f2e5e006b663a88ee99b130ab1b4844.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - sort: [ - { - _geo_distance: { - 'pin.location' => [ - [ - -70, - 40 - ], - [ - -71, - 42 - ] - ], - order: 'asc', - unit: 'km' - } - } - ], - query: { - term: { - user: 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0f3a78296825d507dda6771f7ceb9d61.asciidoc b/docs/examples/guide/0f3a78296825d507dda6771f7ceb9d61.asciidoc deleted file mode 100644 index 421f3f3b1f..0000000000 --- a/docs/examples/guide/0f3a78296825d507dda6771f7ceb9d61.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.exclude._ip' => '10.0.0.1' - } - } -) -puts response ----- diff --git a/docs/examples/guide/0f4583c56cfe5bd59eeb35bfba02957c.asciidoc b/docs/examples/guide/0f4583c56cfe5bd59eeb35bfba02957c.asciidoc deleted file mode 100644 index b6216816db..0000000000 --- a/docs/examples/guide/0f4583c56cfe5bd59eeb35bfba02957c.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.rank_eval( - index: 'my-index-000001', - body: { - requests: [ - { - id: 'JFK query', - request: { - query: { - match_all: {} - } - }, - ratings: [] - } - ], - metric: { - recall: { - k: 20, - relevant_rating_threshold: 1 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0f547926ebf092e19fc5fb433e9ac8c1.asciidoc b/docs/examples/guide/0f547926ebf092e19fc5fb433e9ac8c1.asciidoc deleted file mode 100644 index 91ec4aa1d1..0000000000 --- a/docs/examples/guide/0f547926ebf092e19fc5fb433e9ac8c1.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'whitespace', - filter: [ - 'lowercase', - 'porter_stem' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0fa220ee3fb267020382f74aa70eb1e9.asciidoc b/docs/examples/guide/0fa220ee3fb267020382f74aa70eb1e9.asciidoc deleted file mode 100644 index 57f3042edc..0000000000 --- a/docs/examples/guide/0fa220ee3fb267020382f74aa70eb1e9.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cluster.state( - metric: '_all', - index: 'foo,bar' -) -puts response ----- diff --git a/docs/examples/guide/0fb472645116d58ddef89ca976d15a01.asciidoc b/docs/examples/guide/0fb472645116d58ddef89ca976d15a01.asciidoc deleted file mode 100644 index 4131b63651..0000000000 --- a/docs/examples/guide/0fb472645116d58ddef89ca976d15a01.asciidoc +++ /dev/null @@ -1,70 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-index-000001', - refresh: true, - body: [ - { - index: {} - }, - { - "@timestamp": 1_516_729_294_000, - model_number: 'QVKC92Q', - measures: { - voltage: 5.2 - } - }, - { - index: {} - }, - { - "@timestamp": 1_516_642_894_000, - model_number: 'QVKC92Q', - measures: { - voltage: 5.8 - } - }, - { - index: {} - }, - { - "@timestamp": 1_516_556_494_000, - model_number: 'QVKC92Q', - measures: { - voltage: 5.1 - } - }, - { - index: {} - }, - { - "@timestamp": 1_516_470_094_000, - model_number: 'QVKC92Q', - measures: { - voltage: 5.6 - } - }, - { - index: {} - }, - { - "@timestamp": 1_516_383_694_000, - model_number: 'HG537PU', - measures: { - voltage: 4.2 - } - }, - { - index: {} - }, - { - "@timestamp": 1_516_297_294_000, - model_number: 'HG537PU', - measures: { - voltage: 4 - } - } - ] -) -puts response ----- diff --git a/docs/examples/guide/0fb7705ddbf1fc2b65d2de2e00fe5769.asciidoc b/docs/examples/guide/0fb7705ddbf1fc2b65d2de2e00fe5769.asciidoc deleted file mode 100644 index 29bbe6e7d3..0000000000 --- a/docs/examples/guide/0fb7705ddbf1fc2b65d2de2e00fe5769.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'ledger', - size: 0, - body: { - aggregations: { - profit: { - scripted_metric: { - init_script: { - id: 'my_init_script' - }, - map_script: { - id: 'my_map_script' - }, - combine_script: { - id: 'my_combine_script' - }, - params: { - field: 'amount' - }, - reduce_script: { - id: 'my_reduce_script' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0fd08e14ad651827be53897a6bdaf0b8.asciidoc b/docs/examples/guide/0fd08e14ad651827be53897a6bdaf0b8.asciidoc deleted file mode 100644 index 21ee35ddc2..0000000000 --- a/docs/examples/guide/0fd08e14ad651827be53897a6bdaf0b8.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match_bool_prefix: { - message: 'quick brown f' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/0fe74ccd098c742619805a7c0bd0fae6.asciidoc b/docs/examples/guide/0fe74ccd098c742619805a7c0bd0fae6.asciidoc deleted file mode 100644 index d3c2257aa4..0000000000 --- a/docs/examples/guide/0fe74ccd098c742619805a7c0bd0fae6.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.transform.schedule_now_transform( - transform_id: 'ecommerce_transform' -) -puts response ----- diff --git a/docs/examples/guide/100d4e33158069f3caa32e8bfa0eb3d0.asciidoc b/docs/examples/guide/100d4e33158069f3caa32e8bfa0eb3d0.asciidoc deleted file mode 100644 index 1e284eafb8..0000000000 --- a/docs/examples/guide/100d4e33158069f3caa32e8bfa0eb3d0.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic: 'runtime', - properties: { - "@timestamp": { - type: 'date' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/102c7de25d13c87cf28839ada9f63c95.asciidoc b/docs/examples/guide/102c7de25d13c87cf28839ada9f63c95.asciidoc deleted file mode 100644 index 443261629a..0000000000 --- a/docs/examples/guide/102c7de25d13c87cf28839ada9f63c95.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'index', - id: 1, - body: { - my_date: '2016-05-11T16:30:55.328Z' - } -) -puts response - -response = client.search( - index: 'index', - body: { - query: { - constant_score: { - filter: { - range: { - my_date: { - gte: 'now-1h', - lte: 'now' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/103296e16b4233926ad1f07360385606.asciidoc b/docs/examples/guide/103296e16b4233926ad1f07360385606.asciidoc deleted file mode 100644 index cb53f369a6..0000000000 --- a/docs/examples/guide/103296e16b4233926ad1f07360385606.asciidoc +++ /dev/null @@ -1,45 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'turkish_example', - body: { - settings: { - analysis: { - filter: { - turkish_stop: { - type: 'stop', - stopwords: '_turkish_' - }, - turkish_lowercase: { - type: 'lowercase', - language: 'turkish' - }, - turkish_keywords: { - type: 'keyword_marker', - keywords: [ - 'örnek' - ] - }, - turkish_stemmer: { - type: 'stemmer', - language: 'turkish' - } - }, - analyzer: { - rebuilt_turkish: { - tokenizer: 'standard', - filter: [ - 'apostrophe', - 'turkish_lowercase', - 'turkish_stop', - 'turkish_keywords', - 'turkish_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/10535507a9735fcf06600444b9067d4c.asciidoc b/docs/examples/guide/10535507a9735fcf06600444b9067d4c.asciidoc deleted file mode 100644 index ebf4c7b8c9..0000000000 --- a/docs/examples/guide/10535507a9735fcf06600444b9067d4c.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - text: { - type: 'text', - fields: { - raw: { - type: 'keyword' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - text: [ - 'the quick brown fox', - 'the quick brown fox', - 'jumped over the lazy dog' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/1070e59ba144cdf309fd9b2591612b95.asciidoc b/docs/examples/guide/1070e59ba144cdf309fd9b2591612b95.asciidoc deleted file mode 100644 index d2d1d286e0..0000000000 --- a/docs/examples/guide/1070e59ba144cdf309fd9b2591612b95.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'test', - id: 3, - body: { - test: 'test' - } -) -puts response - -response = client.index( - index: 'test', - id: 4, - refresh: false, - body: { - test: 'test' - } -) -puts response ----- diff --git a/docs/examples/guide/10d8b17e73d31dcd907de67327ed78a2.asciidoc b/docs/examples/guide/10d8b17e73d31dcd907de67327ed78a2.asciidoc deleted file mode 100644 index 8a1b952cb2..0000000000 --- a/docs/examples/guide/10d8b17e73d31dcd907de67327ed78a2.asciidoc +++ /dev/null @@ -1,50 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'dutch_example', - body: { - settings: { - analysis: { - filter: { - dutch_stop: { - type: 'stop', - stopwords: '_dutch_' - }, - dutch_keywords: { - type: 'keyword_marker', - keywords: [ - 'voorbeeld' - ] - }, - dutch_stemmer: { - type: 'stemmer', - language: 'dutch' - }, - dutch_override: { - type: 'stemmer_override', - rules: [ - 'fiets=>fiets', - 'bromfiets=>bromfiets', - 'ei=>eier', - 'kind=>kinder' - ] - } - }, - analyzer: { - rebuilt_dutch: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'dutch_stop', - 'dutch_keywords', - 'dutch_override', - 'dutch_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/10e4c1f246ada8c6b500d8ea6c1e335f.asciidoc b/docs/examples/guide/10e4c1f246ada8c6b500d8ea6c1e335f.asciidoc deleted file mode 100644 index d35334ab8a..0000000000 --- a/docs/examples/guide/10e4c1f246ada8c6b500d8ea6c1e335f.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - standard_shingle: { - tokenizer: 'standard', - filter: [ - 'shingle' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/10f0c8fed98455c460c374b50ffbb204.asciidoc b/docs/examples/guide/10f0c8fed98455c460c374b50ffbb204.asciidoc deleted file mode 100644 index dc9a483dd8..0000000000 --- a/docs/examples/guide/10f0c8fed98455c460c374b50ffbb204.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.rollover( - alias: 'dsl-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/111c69ca94162c1523b799a5c14723dd.asciidoc b/docs/examples/guide/111c69ca94162c1523b799a5c14723dd.asciidoc deleted file mode 100644 index 0984486d4f..0000000000 --- a/docs/examples/guide/111c69ca94162c1523b799a5c14723dd.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - full_text: 'Quick Brown Foxes!' - } -) -puts response ----- diff --git a/docs/examples/guide/1147a02afa087278e51fa365fb9e06b7.asciidoc b/docs/examples/guide/1147a02afa087278e51fa365fb9e06b7.asciidoc deleted file mode 100644 index d72c72314b..0000000000 --- a/docs/examples/guide/1147a02afa087278e51fa365fb9e06b7.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: '1000' - } -) -puts response ----- diff --git a/docs/examples/guide/114d470e752efa9672ca68d7290fada8.asciidoc b/docs/examples/guide/114d470e752efa9672ca68d7290fada8.asciidoc deleted file mode 100644 index 792a587c11..0000000000 --- a/docs/examples/guide/114d470e752efa9672ca68d7290fada8.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_alias( - index: 'my-data-stream', - name: 'my-alias' -) -puts response ----- diff --git a/docs/examples/guide/1153bd92ca18356db927054958cd95c6.asciidoc b/docs/examples/guide/1153bd92ca18356db927054958cd95c6.asciidoc deleted file mode 100644 index c3a0fba847..0000000000 --- a/docs/examples/guide/1153bd92ca18356db927054958cd95c6.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - function_score: { - field_value_factor: { - field: 'my-int', - factor: 1.2, - modifier: 'sqrt', - missing: 1 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/118f249a3b26c33416f641b33f2b74f8.asciidoc b/docs/examples/guide/118f249a3b26c33416f641b33f2b74f8.asciidoc deleted file mode 100644 index bceb1665bc..0000000000 --- a/docs/examples/guide/118f249a3b26c33416f641b33f2b74f8.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'my_tokenizer' - } - }, - tokenizer: { - my_tokenizer: { - type: 'pattern', - pattern: ',' - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_analyzer', - text: 'comma,separated,values' - } -) -puts response ----- diff --git a/docs/examples/guide/11c395d1649733bcab853fe31ec393b2.asciidoc b/docs/examples/guide/11c395d1649733bcab853fe31ec393b2.asciidoc deleted file mode 100644 index 3b0456c5ae..0000000000 --- a/docs/examples/guide/11c395d1649733bcab853fe31ec393b2.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.license.get -puts response ----- diff --git a/docs/examples/guide/11c43c4aa5435f8a99dcc0d1f03c648f.asciidoc b/docs/examples/guide/11c43c4aa5435f8a99dcc0d1f03c648f.asciidoc deleted file mode 100644 index a7aa3f0276..0000000000 --- a/docs/examples/guide/11c43c4aa5435f8a99dcc0d1f03c648f.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - aggregations: { - grade_max: { - max: { - field: 'grade', - missing: 10 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/11d9043d3050a7175069dec7e0adc963.asciidoc b/docs/examples/guide/11d9043d3050a7175069dec7e0adc963.asciidoc deleted file mode 100644 index bf6961e482..0000000000 --- a/docs/examples/guide/11d9043d3050a7175069dec7e0adc963.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - my_field: 'a\\b' - } -) -puts response ----- diff --git a/docs/examples/guide/11e772ff5dbb73408ae30a1a367a0d9b.asciidoc b/docs/examples/guide/11e772ff5dbb73408ae30a1a367a0d9b.asciidoc deleted file mode 100644 index cfe8d64c87..0000000000 --- a/docs/examples/guide/11e772ff5dbb73408ae30a1a367a0d9b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ingest.delete_pipeline( - id: '*' -) -puts response ----- diff --git a/docs/examples/guide/11e8d6e14686efabb8634b6522c05cb5.asciidoc b/docs/examples/guide/11e8d6e14686efabb8634b6522c05cb5.asciidoc deleted file mode 100644 index e7a9a68f0d..0000000000 --- a/docs/examples/guide/11e8d6e14686efabb8634b6522c05cb5.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - highlight: { - pre_tags: [ - '', - '' - ], - post_tags: [ - '', - '' - ], - fields: { - body: {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1233be1d4c9c7ca54126f1a0693b26de.asciidoc b/docs/examples/guide/1233be1d4c9c7ca54126f1a0693b26de.asciidoc deleted file mode 100644 index a31b98f842..0000000000 --- a/docs/examples/guide/1233be1d4c9c7ca54126f1a0693b26de.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 3, - routing: 1, - refresh: true, - body: { - my_id: '3', - text: 'This is an answer', - my_join_field: { - name: 'answer', - parent: '1' - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 4, - routing: 1, - refresh: true, - body: { - my_id: '4', - text: 'This is another answer', - my_join_field: { - name: 'answer', - parent: '1' - } - } -) -puts response ----- diff --git a/docs/examples/guide/123693835b3b85b9a2fa6fd1d3ad89c7.asciidoc b/docs/examples/guide/123693835b3b85b9a2fa6fd1d3ad89c7.asciidoc deleted file mode 100644 index 0f11355c04..0000000000 --- a/docs/examples/guide/123693835b3b85b9a2fa6fd1d3ad89c7.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - routing: 'user1', - refresh: true, - body: { - title: 'This is a document' - } -) -puts response - -response = client.get( - index: 'my-index-000001', - id: 1, - routing: 'user1' -) -puts response ----- diff --git a/docs/examples/guide/12433d2b637d002e8d5c9a1adce69d3b.asciidoc b/docs/examples/guide/12433d2b637d002e8d5c9a1adce69d3b.asciidoc deleted file mode 100644 index c467ac7408..0000000000 --- a/docs/examples/guide/12433d2b637d002e8d5c9a1adce69d3b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'publications' -) -puts response ----- diff --git a/docs/examples/guide/1252fa45847edba5ec2b2f33da70ec5b.asciidoc b/docs/examples/guide/1252fa45847edba5ec2b2f33da70ec5b.asciidoc deleted file mode 100644 index 43d9874813..0000000000 --- a/docs/examples/guide/1252fa45847edba5ec2b2f33da70ec5b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.state( - filter_path: 'routing_table.indices.**.state' -) -puts response ----- diff --git a/docs/examples/guide/1259a9c151730e42de35bb2d1ba700c6.asciidoc b/docs/examples/guide/1259a9c151730e42de35bb2d1ba700c6.asciidoc deleted file mode 100644 index 2b97cd6e6e..0000000000 --- a/docs/examples/guide/1259a9c151730e42de35bb2d1ba700c6.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_mapping( - index: 'my-index-000001,my-index-000002' -) -puts response ----- diff --git a/docs/examples/guide/1295f51b9e5d4ba9987b02478146b50b.asciidoc b/docs/examples/guide/1295f51b9e5d4ba9987b02478146b50b.asciidoc deleted file mode 100644 index b544c7f2f3..0000000000 --- a/docs/examples/guide/1295f51b9e5d4ba9987b02478146b50b.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - body: { - 'index.max_result_window' => 5000 - } -) -puts response - -response = client.cluster.put_settings( - body: { - persistent: { - 'search.max_buckets' => 20_000, - 'search.allow_expensive_queries' => false - } - } -) -puts response ----- diff --git a/docs/examples/guide/12cb446446211f95f651e196a1f059b4.asciidoc b/docs/examples/guide/12cb446446211f95f651e196a1f059b4.asciidoc deleted file mode 100644 index 56e8ae9a7a..0000000000 --- a/docs/examples/guide/12cb446446211f95f651e196a1f059b4.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.create( - repository: 'my_repository', - snapshot: 'my_snapshot', - wait_for_completion: true -) -puts response ----- diff --git a/docs/examples/guide/12d5ff4b8d3d832b32a7e7e2a520d0bb.asciidoc b/docs/examples/guide/12d5ff4b8d3d832b32a7e7e2a520d0bb.asciidoc deleted file mode 100644 index 8e15ff3918..0000000000 --- a/docs/examples/guide/12d5ff4b8d3d832b32a7e7e2a520d0bb.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_calendar_events( - calendar_id: 'planned-outages', - start: 1_635_638_400_000, - end: 1_635_724_800_000 -) -puts response ----- diff --git a/docs/examples/guide/12ec704d62ffedcb03787e6aba69d382.asciidoc b/docs/examples/guide/12ec704d62ffedcb03787e6aba69d382.asciidoc deleted file mode 100644 index b59df98dba..0000000000 --- a/docs/examples/guide/12ec704d62ffedcb03787e6aba69d382.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - { - type: 'stop', - stopwords: [ - 'a' - ] - }, - { - type: 'shingle', - filler_token: '+' - } - ], - text: 'fox jumps a lazy dog' - } -) -puts response ----- diff --git a/docs/examples/guide/12facf3617a41551ce2f0c4d005cb1c7.asciidoc b/docs/examples/guide/12facf3617a41551ce2f0c4d005cb1c7.asciidoc deleted file mode 100644 index 81ec68592a..0000000000 --- a/docs/examples/guide/12facf3617a41551ce2f0c4d005cb1c7.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'movies', - body: { - mappings: { - properties: { - name_and_plot: { - type: 'text' - }, - name: { - type: 'text', - copy_to: 'name_and_plot' - }, - plot: { - type: 'text', - copy_to: 'name_and_plot' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1302e24b0476e0e9af7a2c890edf9f62.asciidoc b/docs/examples/guide/1302e24b0476e0e9af7a2c890edf9f62.asciidoc deleted file mode 100644 index 367c24ff6c..0000000000 --- a/docs/examples/guide/1302e24b0476e0e9af7a2c890edf9f62.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - track_total_hits: false, - query: { - match: { - 'user.id' => 'elkbee' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1313c540fef7e7c18a066f07789673fc.asciidoc b/docs/examples/guide/1313c540fef7e7c18a066f07789673fc.asciidoc deleted file mode 100644 index d00a723a1b..0000000000 --- a/docs/examples/guide/1313c540fef7e7c18a066f07789673fc.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.sql.get_async( - id: 'FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=', - keep_alive: '5d', - wait_for_completion_timeout: '2s', - format: 'json' -) -puts response ----- diff --git a/docs/examples/guide/132ea3d5a0ffb6b5203e356e8329f679.asciidoc b/docs/examples/guide/132ea3d5a0ffb6b5203e356e8329f679.asciidoc deleted file mode 100644 index 7f95d322ad..0000000000 --- a/docs/examples/guide/132ea3d5a0ffb6b5203e356e8329f679.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - date: { - date_histogram: { - field: 'timestamp', - calendar_interval: '1d' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/134384b8c63cfbd8d762fb01757bb3f9.asciidoc b/docs/examples/guide/134384b8c63cfbd8d762fb01757bb3f9.asciidoc deleted file mode 100644 index d5811e51c1..0000000000 --- a/docs/examples/guide/134384b8c63cfbd8d762fb01757bb3f9.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'logs-debug', - body: { - date: '2019-12-12', - message: 'Starting up Elasticsearch', - level: 'debug' - } -) -puts response - -response = client.index( - index: 'logs-debug', - body: { - date: '2019-12-12', - message: 'Starting up Elasticsearch' - } -) -puts response ----- diff --git a/docs/examples/guide/135819da3a4bde684357c57a49ad8e85.asciidoc b/docs/examples/guide/135819da3a4bde684357c57a49ad8e85.asciidoc deleted file mode 100644 index 28cccbafd1..0000000000 --- a/docs/examples/guide/135819da3a4bde684357c57a49ad8e85.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.migration.deprecations -puts response ----- diff --git a/docs/examples/guide/13670d1534125831c2059eebd86d840c.asciidoc b/docs/examples/guide/13670d1534125831c2059eebd86d840c.asciidoc deleted file mode 100644 index 3db225101e..0000000000 --- a/docs/examples/guide/13670d1534125831c2059eebd86d840c.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'brazilian_example', - body: { - settings: { - analysis: { - filter: { - brazilian_stop: { - type: 'stop', - stopwords: '_brazilian_' - }, - brazilian_keywords: { - type: 'keyword_marker', - keywords: [ - 'exemplo' - ] - }, - brazilian_stemmer: { - type: 'stemmer', - language: 'brazilian' - } - }, - analyzer: { - rebuilt_brazilian: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'brazilian_stop', - 'brazilian_keywords', - 'brazilian_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/136ae86b8d497dda799cf1cb583df929.asciidoc b/docs/examples/guide/136ae86b8d497dda799cf1cb583df929.asciidoc deleted file mode 100644 index 5d96f055bd..0000000000 --- a/docs/examples/guide/136ae86b8d497dda799cf1cb583df929.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'publications', - body: { - mappings: { - properties: { - id: { - type: 'text' - }, - title: { - type: 'text' - }, - abstract: { - type: 'text' - }, - author: { - properties: { - id: { - type: 'text' - }, - name: { - type: 'text' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/137709a0a0dc38d6094291c9fc75b804.asciidoc b/docs/examples/guide/137709a0a0dc38d6094291c9fc75b804.asciidoc deleted file mode 100644 index e12d6a9508..0000000000 --- a/docs/examples/guide/137709a0a0dc38d6094291c9fc75b804.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - counter: 1, - tags: [ - 'production' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/137c62a4443bdd7d5b95a15022a9dc30.asciidoc b/docs/examples/guide/137c62a4443bdd7d5b95a15022a9dc30.asciidoc deleted file mode 100644 index 23857d752e..0000000000 --- a/docs/examples/guide/137c62a4443bdd7d5b95a15022a9dc30.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'arabic_example', - body: { - settings: { - analysis: { - filter: { - arabic_stop: { - type: 'stop', - stopwords: '_arabic_' - }, - arabic_keywords: { - type: 'keyword_marker', - keywords: [ - 'مثال' - ] - }, - arabic_stemmer: { - type: 'stemmer', - language: 'arabic' - } - }, - analyzer: { - rebuilt_arabic: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'decimal_digit', - 'arabic_stop', - 'arabic_normalization', - 'arabic_keywords', - 'arabic_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/138f7703c47ddf63633fdf5ca9bc7fa4.asciidoc b/docs/examples/guide/138f7703c47ddf63633fdf5ca9bc7fa4.asciidoc deleted file mode 100644 index 6ae5b44267..0000000000 --- a/docs/examples/guide/138f7703c47ddf63633fdf5ca9bc7fa4.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 2, - routing: 'user1', - body: { - counter: 1, - tags: [ - 'env2' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/13917f7cfb6a382c293275ff71134ec4.asciidoc b/docs/examples/guide/13917f7cfb6a382c293275ff71134ec4.asciidoc deleted file mode 100644 index cac3d1e470..0000000000 --- a/docs/examples/guide/13917f7cfb6a382c293275ff71134ec4.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: { - query: { - match: { - message: 'Hello {{#name_exists}}{{query_string}}{{/name_exists}}{{^name_exists}}World{{/name_exists}}' - } - } - }, - params: { - query_string: 'Kimchy', - name_exists: true - } - } -) -puts response ----- diff --git a/docs/examples/guide/13b02da42d3afe7f0b649e1c98ac9549.asciidoc b/docs/examples/guide/13b02da42d3afe7f0b649e1c98ac9549.asciidoc deleted file mode 100644 index 425b8d345b..0000000000 --- a/docs/examples/guide/13b02da42d3afe7f0b649e1c98ac9549.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'keep_types_example', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'standard', - filter: [ - 'extract_alpha' - ] - } - }, - filter: { - extract_alpha: { - type: 'keep_types', - types: [ - '' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/13cc51ca3a783cdbb1f1d353eaedbf23.asciidoc b/docs/examples/guide/13cc51ca3a783cdbb1f1d353eaedbf23.asciidoc deleted file mode 100644 index 4c2688cead..0000000000 --- a/docs/examples/guide/13cc51ca3a783cdbb1f1d353eaedbf23.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'logger.org.elasticsearch.xpack.security.authc' => 'debug' - } - } -) -puts response ----- diff --git a/docs/examples/guide/13d90ba227131aefbf4fcfd5992e662a.asciidoc b/docs/examples/guide/13d90ba227131aefbf4fcfd5992e662a.asciidoc deleted file mode 100644 index 5f5919e2a7..0000000000 --- a/docs/examples/guide/13d90ba227131aefbf4fcfd5992e662a.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - bool: { - should: [ - { - match: { - 'name.first' => { - query: 'shay', - _name: 'first' - } - } - }, - { - match: { - 'name.last' => { - query: 'banon', - _name: 'last' - } - } - } - ], - filter: { - terms: { - 'name.last' => [ - 'banon', - 'kimchy' - ], - _name: 'test' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/13ebcb01ebf1b5d2b5c52739db47e30c.asciidoc b/docs/examples/guide/13ebcb01ebf1b5d2b5c52739db47e30c.asciidoc deleted file mode 100644 index df6464e7f0..0000000000 --- a/docs/examples/guide/13ebcb01ebf1b5d2b5c52739db47e30c.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.recovery( - index: 'index1,index2', - human: true -) -puts response ----- diff --git a/docs/examples/guide/13ecdf99114098c76b050397d9c3d4e6.asciidoc b/docs/examples/guide/13ecdf99114098c76b050397d9c3d4e6.asciidoc deleted file mode 100644 index 5972158dfe..0000000000 --- a/docs/examples/guide/13ecdf99114098c76b050397d9c3d4e6.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.inference.inference( - task_type: 'sparse_embedding', - inference_id: 'my-elser-model', - body: { - input: 'The sky above the port was the color of television tuned to a dead channel.' - } -) -puts response ----- diff --git a/docs/examples/guide/14254a0e725044faedf9370ead76f6ce.asciidoc b/docs/examples/guide/14254a0e725044faedf9370ead76f6ce.asciidoc deleted file mode 100644 index 506c6aef6f..0000000000 --- a/docs/examples/guide/14254a0e725044faedf9370ead76f6ce.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.search( - q: 'user.id:elkbee', - size: 0, - terminate_after: 1 -) -puts response ----- diff --git a/docs/examples/guide/142de21c40e84e2e2d8d832e5b3b36db.asciidoc b/docs/examples/guide/142de21c40e84e2e2d8d832e5b3b36db.asciidoc deleted file mode 100644 index b3ab2321ca..0000000000 --- a/docs/examples/guide/142de21c40e84e2e2d8d832e5b3b36db.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ilm.migrate_to_data_tiers -puts response ----- diff --git a/docs/examples/guide/1452829804551d2d6acedd4e73b29637.asciidoc b/docs/examples/guide/1452829804551d2d6acedd4e73b29637.asciidoc deleted file mode 100644 index cd1d4fc573..0000000000 --- a/docs/examples/guide/1452829804551d2d6acedd4e73b29637.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.create_data_stream( - name: 'logs-foo-bar' -) -puts response ----- diff --git a/docs/examples/guide/146bd22fd0e7be2345619e8f11d3a4cb.asciidoc b/docs/examples/guide/146bd22fd0e7be2345619e8f11d3a4cb.asciidoc deleted file mode 100644 index 7fc50d82e4..0000000000 --- a/docs/examples/guide/146bd22fd0e7be2345619e8f11d3a4cb.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.tasks( - v: true, - s: 'time:desc', - h: 'type,action,running_time,node,cancellable' -) -puts response ----- diff --git a/docs/examples/guide/147d341cb212dcc015c129a9c5dcf9c9.asciidoc b/docs/examples/guide/147d341cb212dcc015c129a9c5dcf9c9.asciidoc deleted file mode 100644 index 0cd18c409a..0000000000 --- a/docs/examples/guide/147d341cb212dcc015c129a9c5dcf9c9.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ml.put_trained_model_alias( - model_id: 'flight-delay-prediction-1574775339910', - model_alias: 'flight_delay_model' -) -puts response ----- diff --git a/docs/examples/guide/14936b96cfb8ff999a833f615ba75495.asciidoc b/docs/examples/guide/14936b96cfb8ff999a833f615ba75495.asciidoc deleted file mode 100644 index e7d4e30d86..0000000000 --- a/docs/examples/guide/14936b96cfb8ff999a833f615ba75495.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'bicycles,other_cycles', - body: { - query: { - bool: { - must: { - match: { - description: 'dutch' - } - }, - filter: { - term: { - cycle_type: 'bicycle' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/149a0eea54cdf6ea3052af6dba2d2a63.asciidoc b/docs/examples/guide/149a0eea54cdf6ea3052af6dba2d2a63.asciidoc deleted file mode 100644 index 7711e3601e..0000000000 --- a/docs/examples/guide/149a0eea54cdf6ea3052af6dba2d2a63.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - warm: { - actions: { - set_priority: { - priority: 50 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/14a1db30e13eb1d03cfd9710ca847ebb.asciidoc b/docs/examples/guide/14a1db30e13eb1d03cfd9710ca847ebb.asciidoc deleted file mode 100644 index 0e7714c213..0000000000 --- a/docs/examples/guide/14a1db30e13eb1d03cfd9710ca847ebb.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-data-stream', - body: [ - { - create: {} - }, - { - "@timestamp": '2099-05-06T16:21:15.000Z', - message: '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736' - }, - { - create: {} - }, - { - "@timestamp": '2099-05-06T16:25:42.000Z', - message: '192.0.2.255 - - [06/May/2099:16:25:42 +0000] "GET /favicon.ico HTTP/1.0" 200 3638' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/14a49c13c399840e64c00b487aa820c9.asciidoc b/docs/examples/guide/14a49c13c399840e64c00b487aa820c9.asciidoc deleted file mode 100644 index db3686ed6d..0000000000 --- a/docs/examples/guide/14a49c13c399840e64c00b487aa820c9.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - date: { - type: 'date_nanos' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - date: [ - '2015-01-01T12:10:30.000Z', - '2014-01-01T12:10:30.000Z' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/14af7e2899e64f231068bded6aaf9ec5.asciidoc b/docs/examples/guide/14af7e2899e64f231068bded6aaf9ec5.asciidoc deleted file mode 100644 index d018ccd8fa..0000000000 --- a/docs/examples/guide/14af7e2899e64f231068bded6aaf9ec5.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - username: 'marywhite', - email: 'mary@white.com', - name: { - first: 'Mary', - middle: 'Alice', - last: 'White' - } - } -) -puts response - -response = client.indices.get_mapping( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/14afe65afee3d43f27aaaa5b37f26a31.asciidoc b/docs/examples/guide/14afe65afee3d43f27aaaa5b37f26a31.asciidoc deleted file mode 100644 index 5f446cbf10..0000000000 --- a/docs/examples/guide/14afe65afee3d43f27aaaa5b37f26a31.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'Point', - coordinates: [ - -77.03653, - 38.897676 - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/14b81f96297952970b78a3216e059596.asciidoc b/docs/examples/guide/14b81f96297952970b78a3216e059596.asciidoc deleted file mode 100644 index a3ed0b7747..0000000000 --- a/docs/examples/guide/14b81f96297952970b78a3216e059596.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.async_search.get( - id: 'FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=' -) -puts response ----- diff --git a/docs/examples/guide/14f124294a4a0e3a657d1468c36161cd.asciidoc b/docs/examples/guide/14f124294a4a0e3a657d1468c36161cd.asciidoc deleted file mode 100644 index 0125c1c7d0..0000000000 --- a/docs/examples/guide/14f124294a4a0e3a657d1468c36161cd.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'stats-index', - body: { - query: { - term: { - agg_metric: { - value: 702.3 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/14f2dab0583c5a9fcc39931d33194872.asciidoc b/docs/examples/guide/14f2dab0583c5a9fcc39931d33194872.asciidoc deleted file mode 100644 index a27fee5f50..0000000000 --- a/docs/examples/guide/14f2dab0583c5a9fcc39931d33194872.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sample_weblogs_by_clientip' -) -puts response ----- diff --git a/docs/examples/guide/150b5fee5678bf8cdf0932da73eada80.asciidoc b/docs/examples/guide/150b5fee5678bf8cdf0932da73eada80.asciidoc deleted file mode 100644 index 99ccc6f427..0000000000 --- a/docs/examples/guide/150b5fee5678bf8cdf0932da73eada80.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - metric: 'indices', - index_metric: 'fielddata', - fields: 'field1,field2' -) -puts response - -response = client.nodes.stats( - metric: 'indices', - index_metric: 'fielddata', - level: 'indices', - fields: 'field1,field2' -) -puts response - -response = client.nodes.stats( - metric: 'indices', - index_metric: 'fielddata', - level: 'shards', - fields: 'field1,field2' -) -puts response - -response = client.nodes.stats( - metric: 'indices', - index_metric: 'fielddata', - fields: 'field*' -) -puts response ----- diff --git a/docs/examples/guide/151d2b11807ec684b0c01aa89189a801.asciidoc b/docs/examples/guide/151d2b11807ec684b0c01aa89189a801.asciidoc deleted file mode 100644 index 8ed37d2191..0000000000 --- a/docs/examples/guide/151d2b11807ec684b0c01aa89189a801.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - fields: [ - 'title', - 'content' - ], - query: 'this that thus', - minimum_should_match: 2 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/154d703732daf5c5fcd0122e6a50213f.asciidoc b/docs/examples/guide/154d703732daf5c5fcd0122e6a50213f.asciidoc deleted file mode 100644 index c148862c88..0000000000 --- a/docs/examples/guide/154d703732daf5c5fcd0122e6a50213f.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - runtime: { - 'measures.start' => { - type: 'long' - }, - 'measures.end' => { - type: 'long' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/156bc64c94f9f3334fbce25165d2286a.asciidoc b/docs/examples/guide/156bc64c94f9f3334fbce25165d2286a.asciidoc deleted file mode 100644 index cb0e371518..0000000000 --- a/docs/examples/guide/156bc64c94f9f3334fbce25165d2286a.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - index: { - 'sort.field' => 'date', - 'sort.order' => 'desc' - } - }, - mappings: { - properties: { - date: { - type: 'date' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1570976f7807b88dc8a046b833be057b.asciidoc b/docs/examples/guide/1570976f7807b88dc8a046b833be057b.asciidoc deleted file mode 100644 index 2715d8fb6d..0000000000 --- a/docs/examples/guide/1570976f7807b88dc8a046b833be057b.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodes( - v: true, - s: 'master,name', - h: 'name,master,node.role,heap.percent,disk.used_percent,cpu' -) -puts response ----- diff --git a/docs/examples/guide/1572696b97822d3332be51700e09672f.asciidoc b/docs/examples/guide/1572696b97822d3332be51700e09672f.asciidoc deleted file mode 100644 index 4330f7f54e..0000000000 --- a/docs/examples/guide/1572696b97822d3332be51700e09672f.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'range_index', - body: { - query: { - range: { - time_frame: { - gte: '2015-10-31', - lte: '2015-11-01', - relation: 'within' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1598a0fec6b1ca78cadbaba65f465196.asciidoc b/docs/examples/guide/1598a0fec6b1ca78cadbaba65f465196.asciidoc deleted file mode 100644 index b958c7f2f9..0000000000 --- a/docs/examples/guide/1598a0fec6b1ca78cadbaba65f465196.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'my_tokenizer' - } - }, - tokenizer: { - my_tokenizer: { - type: 'pattern', - pattern: '"((?:\\\"|[^"]|\\\")+)"', - group: 1 - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_analyzer', - text: '"value", "value with embedded \" quote"' - } -) -puts response ----- diff --git a/docs/examples/guide/15a34bfe0ef8ef6333c8c7b55c011e5d.asciidoc b/docs/examples/guide/15a34bfe0ef8ef6333c8c7b55c011e5d.asciidoc deleted file mode 100644 index 4935d9b751..0000000000 --- a/docs/examples/guide/15a34bfe0ef8ef6333c8c7b55c011e5d.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - filter: [ - 'lowercase' - ], - text: 'BaR' - } -) -puts response ----- diff --git a/docs/examples/guide/15c76cc8a038f686395053a240262929.asciidoc b/docs/examples/guide/15c76cc8a038f686395053a240262929.asciidoc deleted file mode 100644 index 7348411d16..0000000000 --- a/docs/examples/guide/15c76cc8a038f686395053a240262929.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'classic_example', - body: { - settings: { - analysis: { - analyzer: { - classic_analyzer: { - tokenizer: 'classic', - filter: [ - 'classic' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/15d4be58359542775f4aff88e6d8adb5.asciidoc b/docs/examples/guide/15d4be58359542775f4aff88e6d8adb5.asciidoc deleted file mode 100644 index ac7b02a7a4..0000000000 --- a/docs/examples/guide/15d4be58359542775f4aff88e6d8adb5.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - id: 'my-pipeline', - body: { - docs: [ - { - _source: { - "my-keyword-field": 'FOO' - } - }, - { - _source: { - "my-keyword-field": 'BAR' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/15d948d593d2624ac5e2b155052048f0.asciidoc b/docs/examples/guide/15d948d593d2624ac5e2b155052048f0.asciidoc deleted file mode 100644 index 7e6542a653..0000000000 --- a/docs/examples/guide/15d948d593d2624ac5e2b155052048f0.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'keyword_repeat', - 'stemmer' - ], - text: 'jumping dog' - } -) -puts response ----- diff --git a/docs/examples/guide/15e90b82827c8512670820cf856a9c71.asciidoc b/docs/examples/guide/15e90b82827c8512670820cf856a9c71.asciidoc deleted file mode 100644 index 98ddf11ea9..0000000000 --- a/docs/examples/guide/15e90b82827c8512670820cf856a9c71.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'monthlyindex', - body: { - description: 'monthly date-time index naming', - processors: [ - { - date_index_name: { - field: 'date1', - index_name_prefix: 'my-index-', - date_rounding: 'M' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/1605be45a5711d1929d6ad2d1ae0f797.asciidoc b/docs/examples/guide/1605be45a5711d1929d6ad2d1ae0f797.asciidoc deleted file mode 100644 index 07e3f588f9..0000000000 --- a/docs/examples/guide/1605be45a5711d1929d6ad2d1ae0f797.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.state( - filter_path: 'metadata.cluster_coordination.last_committed_config' -) -puts response ----- diff --git a/docs/examples/guide/160986f49758f4e8345d183a842f6351.asciidoc b/docs/examples/guide/160986f49758f4e8345d183a842f6351.asciidoc deleted file mode 100644 index 89ebae40f4..0000000000 --- a/docs/examples/guide/160986f49758f4e8345d183a842f6351.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'cbor-attachment', - body: { - description: 'Extract attachment information', - processors: [ - { - attachment: { - field: 'data', - remove_binary: false - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/160f39a50847bad0be4be1529a95e4ce.asciidoc b/docs/examples/guide/160f39a50847bad0be4be1529a95e4ce.asciidoc deleted file mode 100644 index 4a64c25325..0000000000 --- a/docs/examples/guide/160f39a50847bad0be4be1529a95e4ce.asciidoc +++ /dev/null @@ -1,64 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'irish_example', - body: { - settings: { - analysis: { - filter: { - irish_hyphenation: { - type: 'stop', - stopwords: [ - 'h', - 'n', - 't' - ], - ignore_case: true - }, - irish_elision: { - type: 'elision', - articles: [ - 'd', - 'm', - 'b' - ], - articles_case: true - }, - irish_stop: { - type: 'stop', - stopwords: '_irish_' - }, - irish_lowercase: { - type: 'lowercase', - language: 'irish' - }, - irish_keywords: { - type: 'keyword_marker', - keywords: [ - 'sampla' - ] - }, - irish_stemmer: { - type: 'stemmer', - language: 'irish' - } - }, - analyzer: { - rebuilt_irish: { - tokenizer: 'standard', - filter: [ - 'irish_hyphenation', - 'irish_elision', - 'irish_lowercase', - 'irish_stop', - 'irish_keywords', - 'irish_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/16239fe9f0b0dcfd5ea64c08c6fed21d.asciidoc b/docs/examples/guide/16239fe9f0b0dcfd5ea64c08c6fed21d.asciidoc deleted file mode 100644 index 3468055977..0000000000 --- a/docs/examples/guide/16239fe9f0b0dcfd5ea64c08c6fed21d.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'issues', - body: { - mappings: { - properties: { - tags: { - type: 'keyword' - }, - comments: { - type: 'nested', - properties: { - username: { - type: 'keyword' - }, - comment: { - type: 'text' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/162b5b693b713f0bfab1209d59443c46.asciidoc b/docs/examples/guide/162b5b693b713f0bfab1209d59443c46.asciidoc deleted file mode 100644 index b8fb32a354..0000000000 --- a/docs/examples/guide/162b5b693b713f0bfab1209d59443c46.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - constant_score: { - filter: { - term: { - status: 'active' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/16351d99d0608789d04a0bb11a537098.asciidoc b/docs/examples/guide/16351d99d0608789d04a0bb11a537098.asciidoc deleted file mode 100644 index aa9ce033ce..0000000000 --- a/docs/examples/guide/16351d99d0608789d04a0bb11a537098.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'edge_ngram_example', - body: { - settings: { - analysis: { - analyzer: { - standard_edge_ngram: { - tokenizer: 'standard', - filter: [ - 'edge_ngram' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1637ef51d673b35cc8894ee80cd61c87.asciidoc b/docs/examples/guide/1637ef51d673b35cc8894ee80cd61c87.asciidoc deleted file mode 100644 index 09fb486c0b..0000000000 --- a/docs/examples/guide/1637ef51d673b35cc8894ee80cd61c87.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodes( - v: true, - s: 'cpu:desc' -) -puts response ----- diff --git a/docs/examples/guide/1648dd31d0fef01e7504ebeb687f4f30.asciidoc b/docs/examples/guide/1648dd31d0fef01e7504ebeb687f4f30.asciidoc deleted file mode 100644 index b95b27638b..0000000000 --- a/docs/examples/guide/1648dd31d0fef01e7504ebeb687f4f30.asciidoc +++ /dev/null @@ -1,54 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'test', - id: 1, - refresh: true, - body: { - url: 'https://en.wikipedia.org/wiki/2016_Summer_Olympics', - content: 'Rio 2016', - pagerank: 50.3, - url_length: 42, - topics: { - sports: 50, - brazil: 30 - } - } -) -puts response - -response = client.index( - index: 'test', - id: 2, - refresh: true, - body: { - url: 'https://en.wikipedia.org/wiki/2016_Brazilian_Grand_Prix', - content: 'Formula One motor race held on 13 November 2016', - pagerank: 50.3, - url_length: 47, - topics: { - sports: 35, - "formula one": 65, - brazil: 20 - } - } -) -puts response - -response = client.index( - index: 'test', - id: 3, - refresh: true, - body: { - url: 'https://en.wikipedia.org/wiki/Deadpool_(film)', - content: 'Deadpool is a 2016 American superhero film', - pagerank: 50.3, - url_length: 37, - topics: { - movies: 60, - "super hero": 65 - } - } -) -puts response ----- diff --git a/docs/examples/guide/1659420311d907d9fc024b96f4150216.asciidoc b/docs/examples/guide/1659420311d907d9fc024b96f4150216.asciidoc deleted file mode 100644 index cb819d7eb0..0000000000 --- a/docs/examples/guide/1659420311d907d9fc024b96f4150216.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - { - type: 'length', - min: 0, - max: 4 - } - ], - text: 'the quick brown fox jumps over the lazy dog' - } -) -puts response ----- diff --git a/docs/examples/guide/166bcfc6d5d39defec7ad6aa44d0914b.asciidoc b/docs/examples/guide/166bcfc6d5d39defec7ad6aa44d0914b.asciidoc deleted file mode 100644 index 92d7f24128..0000000000 --- a/docs/examples/guide/166bcfc6d5d39defec7ad6aa44d0914b.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.tasks.list -puts response - -response = client.tasks.list( - nodes: 'nodeId1,nodeId2' -) -puts response - -response = client.tasks.list( - nodes: 'nodeId1,nodeId2', - actions: 'cluster:*' -) -puts response ----- diff --git a/docs/examples/guide/16985e5b17d2da0955a14fbe02e8dfca.asciidoc b/docs/examples/guide/16985e5b17d2da0955a14fbe02e8dfca.asciidoc deleted file mode 100644 index e6f8972d81..0000000000 --- a/docs/examples/guide/16985e5b17d2da0955a14fbe02e8dfca.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.termvectors( - index: 'my-index-000001', - id: 1, - body: { - fields: [ - 'text' - ], - offsets: true, - payloads: true, - positions: true, - term_statistics: true, - field_statistics: true - } -) -puts response ----- diff --git a/docs/examples/guide/169b39bb889ecd47541bed3e48725488.asciidoc b/docs/examples/guide/169b39bb889ecd47541bed3e48725488.asciidoc deleted file mode 100644 index 50b187e574..0000000000 --- a/docs/examples/guide/169b39bb889ecd47541bed3e48725488.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'bug_reports', - body: { - query: { - term: { - labels: 'urgent' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/16fc93f0e9a395d0668483d29e3df9d8.asciidoc b/docs/examples/guide/16fc93f0e9a395d0668483d29e3df9d8.asciidoc deleted file mode 100644 index 5a5410cf7f..0000000000 --- a/docs/examples/guide/16fc93f0e9a395d0668483d29e3df9d8.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'mv', - refresh: true, - body: [ - { - index: {} - }, - { - a: 1, - b: [ - 2, - 1 - ] - }, - { - index: {} - }, - { - a: 2, - b: 3 - } - ] -) -puts response - -response = client.esql.query( - body: { - query: 'FROM mv | LIMIT 2', - version: '2024.04.01' - } -) -puts response ----- diff --git a/docs/examples/guide/170c8a3fb81a4e93cd3034a3b5a43ac9.asciidoc b/docs/examples/guide/170c8a3fb81a4e93cd3034a3b5a43ac9.asciidoc deleted file mode 100644 index 87a40e840c..0000000000 --- a/docs/examples/guide/170c8a3fb81a4e93cd3034a3b5a43ac9.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'test', - id: 1, - body: { - location: { - coordinates: [ - [ - 46.25, - 20.14 - ], - [ - 47.49, - 19.04 - ] - ], - type: 'multipoint' - } - } -) -puts response ----- diff --git a/docs/examples/guide/172155ca4bf6dfcbd489453f50739396.asciidoc b/docs/examples/guide/172155ca4bf6dfcbd489453f50739396.asciidoc deleted file mode 100644 index 4b961a02f4..0000000000 --- a/docs/examples/guide/172155ca4bf6dfcbd489453f50739396.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get( - repository: 'my_repository', - snapshot: 'snapshot*', - size: 2, - sort: 'name' -) -puts response ----- diff --git a/docs/examples/guide/17266cee5eaaddf08e5534bf580a1910.asciidoc b/docs/examples/guide/17266cee5eaaddf08e5534bf580a1910.asciidoc deleted file mode 100644 index d8da1c1241..0000000000 --- a/docs/examples/guide/17266cee5eaaddf08e5534bf580a1910.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.watcher.stats -puts response ----- diff --git a/docs/examples/guide/172d150e56a225155a62c7b18bf8da67.asciidoc b/docs/examples/guide/172d150e56a225155a62c7b18bf8da67.asciidoc deleted file mode 100644 index 5b30240eed..0000000000 --- a/docs/examples/guide/172d150e56a225155a62c7b18bf8da67.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'txt', - body: { - query: "SELECT YEAR(release_date) AS year FROM library WHERE page_count > 300 AND author = 'Frank Herbert' GROUP BY year HAVING COUNT(*) > 0" - } -) -puts response ----- diff --git a/docs/examples/guide/1736545c8b5674f6d311f3277eb387f1.asciidoc b/docs/examples/guide/1736545c8b5674f6d311f3277eb387f1.asciidoc deleted file mode 100644 index 2c07d094b6..0000000000 --- a/docs/examples/guide/1736545c8b5674f6d311f3277eb387f1.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_data_lifecycle( - name: 'my-data-stream', - body: { - data_retention: '30d' - } -) -puts response ----- diff --git a/docs/examples/guide/173b190078621415a80e851eaf794e8a.asciidoc b/docs/examples/guide/173b190078621415a80e851eaf794e8a.asciidoc deleted file mode 100644 index 89e2eecc22..0000000000 --- a/docs/examples/guide/173b190078621415a80e851eaf794e8a.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_english_analyzer: { - type: 'standard', - max_token_length: 5, - stopwords: '_english_' - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_english_analyzer', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/1745ac9e6d22a2ffe7ac381f9ba238f9.asciidoc b/docs/examples/guide/1745ac9e6d22a2ffe7ac381f9ba238f9.asciidoc deleted file mode 100644 index 840ca6f3de..0000000000 --- a/docs/examples/guide/1745ac9e6d22a2ffe7ac381f9ba238f9.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.nodes.hot_threads( - node_id: 'my-node,my-other-node' -) -puts response ----- diff --git a/docs/examples/guide/178be73b74ba9f297429e32267084ac7.asciidoc b/docs/examples/guide/178be73b74ba9f297429e32267084ac7.asciidoc deleted file mode 100644 index 9c514cc31d..0000000000 --- a/docs/examples/guide/178be73b74ba9f297429e32267084ac7.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - span_or: { - clauses: [ - { - span_term: { - field: 'value1' - } - }, - { - span_term: { - field: 'value2' - } - }, - { - span_term: { - field: 'value3' - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/178c920d5e8ec0071f77290fa059802c.asciidoc b/docs/examples/guide/178c920d5e8ec0071f77290fa059802c.asciidoc deleted file mode 100644 index f631129793..0000000000 --- a/docs/examples/guide/178c920d5e8ec0071f77290fa059802c.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - index: { - refresh_interval: '1s' - } - } -) -puts response ----- diff --git a/docs/examples/guide/179f0a3e84ff4bbac18787a018eabf89.asciidoc b/docs/examples/guide/179f0a3e84ff4bbac18787a018eabf89.asciidoc deleted file mode 100644 index 7cf180a12f..0000000000 --- a/docs/examples/guide/179f0a3e84ff4bbac18787a018eabf89.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - multi_match: { - query: 'Jon', - type: 'cross_fields', - analyzer: 'standard', - fields: [ - 'first', - 'last', - '*.edge' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/17a1e308761afd3282f13d44d7be008a.asciidoc b/docs/examples/guide/17a1e308761afd3282f13d44d7be008a.asciidoc deleted file mode 100644 index 715963d104..0000000000 --- a/docs/examples/guide/17a1e308761afd3282f13d44d7be008a.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'example', - body: { - mappings: { - properties: { - comment: { - type: 'text', - term_vector: 'with_positions_offsets' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/17c2b0a6b0305804ff3b7fd3b4a68df3.asciidoc b/docs/examples/guide/17c2b0a6b0305804ff3b7fd3b4a68df3.asciidoc deleted file mode 100644 index 72686cbc89..0000000000 --- a/docs/examples/guide/17c2b0a6b0305804ff3b7fd3b4a68df3.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - description: '_description', - processors: [ - { - set: { - field: 'field2', - value: '_value' - } - } - ] - }, - docs: [ - { - _index: 'index', - _id: 'id', - _source: { - foo: 'bar' - } - }, - { - _index: 'index', - _id: 'id', - _source: { - foo: 'rab' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/17dd67a66c49f7eb618dd17430e48dfa.asciidoc b/docs/examples/guide/17dd67a66c49f7eb618dd17430e48dfa.asciidoc deleted file mode 100644 index 46dde5cd46..0000000000 --- a/docs/examples/guide/17dd67a66c49f7eb618dd17430e48dfa.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'index', - body: { - query: { - constant_score: { - filter: { - range: { - my_date: { - gte: 'now-1h/m', - lte: 'now/m' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/17e6f3fac556f08a78f7a876e71acb89.asciidoc b/docs/examples/guide/17e6f3fac556f08a78f7a876e71acb89.asciidoc deleted file mode 100644 index 914ab1e5ae..0000000000 --- a/docs/examples/guide/17e6f3fac556f08a78f7a876e71acb89.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: '_all', - body: { - settings: { - 'index.unassigned.node_left.delayed_timeout' => '5m' - } - } -) -puts response ----- diff --git a/docs/examples/guide/17f8a8990b0166befa3bc2b10fd28134.asciidoc b/docs/examples/guide/17f8a8990b0166befa3bc2b10fd28134.asciidoc deleted file mode 100644 index 56e0c270e5..0000000000 --- a/docs/examples/guide/17f8a8990b0166befa3bc2b10fd28134.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 'match_value', - body: { - query: { - match: { - field: 'value' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/17fb298fb1e47f7d946a772d68f4e2df.asciidoc b/docs/examples/guide/17fb298fb1e47f7d946a772d68f4e2df.asciidoc deleted file mode 100644 index b036ff9e74..0000000000 --- a/docs/examples/guide/17fb298fb1e47f7d946a772d68f4e2df.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.delete_by_query( - index: 'my-data-stream', - body: { - query: { - match: { - 'user.id' => 'vlb44hny' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/182df084f028479ecbe8d7648ddad892.asciidoc b/docs/examples/guide/182df084f028479ecbe8d7648ddad892.asciidoc deleted file mode 100644 index 9880df0244..0000000000 --- a/docs/examples/guide/182df084f028479ecbe8d7648ddad892.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ilm.get_status -puts response ----- diff --git a/docs/examples/guide/186a7143d50e8c3ee01094e1a9ff0c0c.asciidoc b/docs/examples/guide/186a7143d50e8c3ee01094e1a9ff0c0c.asciidoc deleted file mode 100644 index 05ba3af0e9..0000000000 --- a/docs/examples/guide/186a7143d50e8c3ee01094e1a9ff0c0c.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'passage_vectors', - body: { - mappings: { - properties: { - full_text: { - type: 'text' - }, - creation_time: { - type: 'date' - }, - paragraph: { - type: 'nested', - properties: { - vector: { - type: 'dense_vector', - dims: 2, - index_options: { - type: 'hnsw' - } - }, - text: { - type: 'text', - index: false - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/187733e50c60350f3f75921bea3b72c2.asciidoc b/docs/examples/guide/187733e50c60350f3f75921bea3b72c2.asciidoc deleted file mode 100644 index 609f2ffb48..0000000000 --- a/docs/examples/guide/187733e50c60350f3f75921bea3b72c2.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - scroll: '1m', - body: { - slice: { - field: '@timestamp', - id: 0, - max: 10 - }, - query: { - match: { - message: 'foo' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/187e8786e0a90f1f6278cf89b670de0a.asciidoc b/docs/examples/guide/187e8786e0a90f1f6278cf89b670de0a.asciidoc deleted file mode 100644 index ab8d880b91..0000000000 --- a/docs/examples/guide/187e8786e0a90f1f6278cf89b670de0a.asciidoc +++ /dev/null @@ -1,41 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'german_example', - body: { - settings: { - analysis: { - filter: { - german_stop: { - type: 'stop', - stopwords: '_german_' - }, - german_keywords: { - type: 'keyword_marker', - keywords: [ - 'Beispiel' - ] - }, - german_stemmer: { - type: 'stemmer', - language: 'light_german' - } - }, - analyzer: { - rebuilt_german: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'german_stop', - 'german_keywords', - 'german_normalization', - 'german_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/188e6208cccb13027a5c1c95440841ee.asciidoc b/docs/examples/guide/188e6208cccb13027a5c1c95440841ee.asciidoc deleted file mode 100644 index 95343f1661..0000000000 --- a/docs/examples/guide/188e6208cccb13027a5c1c95440841ee.asciidoc +++ /dev/null @@ -1,60 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'logs', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - body: 'warning: page could not be rendered' - }, - { - index: { - _id: 2 - } - }, - { - body: 'authentication error' - }, - { - index: { - _id: 3 - } - }, - { - body: 'warning: connection timed out' - } - ] -) -puts response - -response = client.search( - index: 'logs', - body: { - size: 0, - aggregations: { - messages: { - filters: { - filters: { - errors: { - match: { - body: 'error' - } - }, - warnings: { - match: { - body: 'warning' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/189f0cd1ee2485cf11a2968f01d54e5b.asciidoc b/docs/examples/guide/189f0cd1ee2485cf11a2968f01d54e5b.asciidoc deleted file mode 100644 index b9d4a95e6f..0000000000 --- a/docs/examples/guide/189f0cd1ee2485cf11a2968f01d54e5b.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - }, - sales_deriv: { - derivative: { - buckets_path: 'sales', - unit: 'day' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc b/docs/examples/guide/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc deleted file mode 100644 index 571985994a..0000000000 --- a/docs/examples/guide/18ddb7e7a4bcafd449df956e828ed7a8.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.tasks.cancel( - task_id: 'r1A2WoRbTwKZ516z6NEs5A:36619' -) -puts response ----- diff --git a/docs/examples/guide/18de6782bd18f4a9baec2feec8c02a8b.asciidoc b/docs/examples/guide/18de6782bd18f4a9baec2feec8c02a8b.asciidoc deleted file mode 100644 index dc2206132f..0000000000 --- a/docs/examples/guide/18de6782bd18f4a9baec2feec8c02a8b.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000002', - body: { - mappings: { - properties: { - datetime: { - type: 'date', - format: 'uuuu/MM/dd HH:mm:ss||uuuu/MM/dd||epoch_millis' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/190a21e32db2125ddaea0f634e126a84.asciidoc b/docs/examples/guide/190a21e32db2125ddaea0f634e126a84.asciidoc deleted file mode 100644 index 6e906e36a3..0000000000 --- a/docs/examples/guide/190a21e32db2125ddaea0f634e126a84.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.clone( - index: 'my_source_index', - target: 'my_target_index' -) -puts response ----- diff --git a/docs/examples/guide/19174d872fd1e43cbfb7a96a33d13c96.asciidoc b/docs/examples/guide/19174d872fd1e43cbfb7a96a33d13c96.asciidoc deleted file mode 100644 index 51b4de48c7..0000000000 --- a/docs/examples/guide/19174d872fd1e43cbfb7a96a33d13c96.asciidoc +++ /dev/null @@ -1,83 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'places', - body: { - mappings: { - properties: { - geometry: { - type: 'shape' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'places', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - name: 'NEMO Science Museum', - geometry: 'POINT(491.2350 5237.4081)' - }, - { - index: { - _id: 2 - } - }, - { - name: 'Sportpark De Weeren', - geometry: { - type: 'Polygon', - coordinates: [ - [ - [ - 496.5305328369141, - 5239.347642069457 - ], - [ - 496.6979026794433, - 5239.172175893484 - ], - [ - 496.9425201416015, - 5239.238958618537 - ], - [ - 496.7944622039794, - 5239.420969150824 - ], - [ - 496.5305328369141, - 5239.347642069457 - ] - ] - ] - } - } - ] -) -puts response - -response = client.search( - index: 'places', - size: 0, - body: { - aggregations: { - centroid: { - cartesian_centroid: { - field: 'geometry' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/196aed02b11def364bab84e455c1a073.asciidoc b/docs/examples/guide/196aed02b11def364bab84e455c1a073.asciidoc deleted file mode 100644 index e1645aaf24..0000000000 --- a/docs/examples/guide/196aed02b11def364bab84e455c1a073.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'template_1', - body: { - index_patterns: [ - 'logs-*' - ], - data_stream: {} - } -) -puts response ----- diff --git a/docs/examples/guide/199f5165d876267080046c907e93483f.asciidoc b/docs/examples/guide/199f5165d876267080046c907e93483f.asciidoc deleted file mode 100644 index 8df212f06c..0000000000 --- a/docs/examples/guide/199f5165d876267080046c907e93483f.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - index: 'my-index-000001', - body: { - field: 'my-field', - text: 'this is a test' - } -) -puts response ----- diff --git a/docs/examples/guide/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc b/docs/examples/guide/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc deleted file mode 100644 index d7ed691180..0000000000 --- a/docs/examples/guide/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.simulate.ingest( - body: { - docs: [ - { - _index: 'my-index', - _id: '123', - _source: { - foo: 'bar' - } - }, - { - _index: 'my-index', - _id: '456', - _source: { - foo: 'rab' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/19ee488226d357d1576e7d3ae7a4693f.asciidoc b/docs/examples/guide/19ee488226d357d1576e7d3ae7a4693f.asciidoc deleted file mode 100644 index ac735eec83..0000000000 --- a/docs/examples/guide/19ee488226d357d1576e7d3ae7a4693f.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - analyzer: 'keyword', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/1a1f3421717ff744ed83232729289bb0.asciidoc b/docs/examples/guide/1a1f3421717ff744ed83232729289bb0.asciidoc deleted file mode 100644 index e9658b8273..0000000000 --- a/docs/examples/guide/1a1f3421717ff744ed83232729289bb0.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.slm.delete_lifecycle( - policy_id: 'daily-snapshots' -) -puts response ----- diff --git a/docs/examples/guide/1a3897cfb4f974c09d0d847baac8aa6d.asciidoc b/docs/examples/guide/1a3897cfb4f974c09d0d847baac8aa6d.asciidoc deleted file mode 100644 index 885040d292..0000000000 --- a/docs/examples/guide/1a3897cfb4f974c09d0d847baac8aa6d.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.stats( - level: 'shards', - human: true, - expand_wildcards: 'all', - filter_path: 'indices.*.total.indexing.index_total' -) -puts response ----- diff --git a/docs/examples/guide/1a4f8beb6847678880ca113ee6fb75ca.asciidoc b/docs/examples/guide/1a4f8beb6847678880ca113ee6fb75ca.asciidoc deleted file mode 100644 index 1405c2dabd..0000000000 --- a/docs/examples/guide/1a4f8beb6847678880ca113ee6fb75ca.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'music', - pretty: true, - body: { - suggest: { - "song-suggest": { - regex: 'n[ever|i]r', - completion: { - field: 'suggest' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1a6dbe5df488c4a16e2f1101ba8a25d9.asciidoc b/docs/examples/guide/1a6dbe5df488c4a16e2f1101ba8a25d9.asciidoc deleted file mode 100644 index 6fb9956e5f..0000000000 --- a/docs/examples/guide/1a6dbe5df488c4a16e2f1101ba8a25d9.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'pattern', - text: "The foo_bar_size's default is 5." - } -) -puts response ----- diff --git a/docs/examples/guide/1a81fe0186369838531e116e85aa4ccd.asciidoc b/docs/examples/guide/1a81fe0186369838531e116e85aa4ccd.asciidoc deleted file mode 100644 index bdd35667ed..0000000000 --- a/docs/examples/guide/1a81fe0186369838531e116e85aa4ccd.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'shirts', - body: { - mappings: { - properties: { - brand: { - type: 'keyword' - }, - color: { - type: 'keyword' - }, - model: { - type: 'keyword' - } - } - } - } -) -puts response - -response = client.index( - index: 'shirts', - id: 1, - refresh: true, - body: { - brand: 'gucci', - color: 'red', - model: 'slim' - } -) -puts response ----- diff --git a/docs/examples/guide/1a9efb56adb2cd84faa9825a129381b9.asciidoc b/docs/examples/guide/1a9efb56adb2cd84faa9825a129381b9.asciidoc deleted file mode 100644 index c94db7876a..0000000000 --- a/docs/examples/guide/1a9efb56adb2cd84faa9825a129381b9.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.rollup.rollup_search( - index: 'sensor-1,sensor_rollup', - body: { - size: 0, - aggregations: { - max_temperature: { - max: { - field: 'temperature' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1aa91d3d48140d6367b6cabca8737b8f.asciidoc b/docs/examples/guide/1aa91d3d48140d6367b6cabca8737b8f.asciidoc deleted file mode 100644 index fca0994881..0000000000 --- a/docs/examples/guide/1aa91d3d48140d6367b6cabca8737b8f.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - body: [ - { - update: { - _id: '5', - _index: 'index1' - } - }, - { - doc: { - my_field: 'foo' - } - }, - { - update: { - _id: '6', - _index: 'index1' - } - }, - { - doc: { - my_field: 'foo' - } - }, - { - create: { - _id: '7', - _index: 'index1' - } - }, - { - my_field: 'foo' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc b/docs/examples/guide/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc deleted file mode 100644 index 75b7f4fdaf..0000000000 --- a/docs/examples/guide/1aa96eeaf63fc967e166d1a2fcdccccc.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000002', - body: { - mappings: { - properties: { - metrics: { - subobjects: false, - properties: { - time: { - type: 'object', - properties: { - min: { - type: 'long' - }, - max: { - type: 'long' - } - } - } - } - } - } - } - } -) -puts response - -response = client.indices.get_mapping( - index: 'my-index-000002' -) -puts response ----- diff --git a/docs/examples/guide/1adee74383e5594e45c937177d75aa2a.asciidoc b/docs/examples/guide/1adee74383e5594e45c937177d75aa2a.asciidoc deleted file mode 100644 index a528b73d14..0000000000 --- a/docs/examples/guide/1adee74383e5594e45c937177d75aa2a.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_index', - body: { - query: { - match_all: {} - }, - sort: { - my_counter: 'desc' - } - } -) -puts response ----- diff --git a/docs/examples/guide/1b0b29e5cd7550c648d0892378e93804.asciidoc b/docs/examples/guide/1b0b29e5cd7550c648d0892378e93804.asciidoc deleted file mode 100644 index a89bbc7c17..0000000000 --- a/docs/examples/guide/1b0b29e5cd7550c648d0892378e93804.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_calendar_job( - calendar_id: 'planned-outages', - job_id: 'total-requests' -) -puts response ----- diff --git a/docs/examples/guide/1b0f40959a7a4d124372f2bd3f7eac85.asciidoc b/docs/examples/guide/1b0f40959a7a4d124372f2bd3f7eac85.asciidoc deleted file mode 100644 index f561e3f387..0000000000 --- a/docs/examples/guide/1b0f40959a7a4d124372f2bd3f7eac85.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'custom_fingerprint_example', - body: { - settings: { - analysis: { - analyzer: { - whitespace_: { - tokenizer: 'whitespace', - filter: [ - 'fingerprint_plus_concat' - ] - } - }, - filter: { - fingerprint_plus_concat: { - type: 'fingerprint', - max_output_size: 100, - separator: '+' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1b2ab75d3c8064fac6ecc63104396c02.asciidoc b/docs/examples/guide/1b2ab75d3c8064fac6ecc63104396c02.asciidoc deleted file mode 100644 index b59c6cc428..0000000000 --- a/docs/examples/guide/1b2ab75d3c8064fac6ecc63104396c02.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ml.put_calendar_job( - calendar_id: 'planned-outages', - job_id: 'total-requests' -) -puts response ----- diff --git a/docs/examples/guide/1b37e2237c9e3aaf84d56cc5c0bdb9ec.asciidoc b/docs/examples/guide/1b37e2237c9e3aaf84d56cc5c0bdb9ec.asciidoc deleted file mode 100644 index 28d57c8eca..0000000000 --- a/docs/examples/guide/1b37e2237c9e3aaf84d56cc5c0bdb9ec.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'shrink-index', - body: { - policy: { - phases: { - warm: { - min_age: '5d', - actions: { - shrink: { - number_of_shards: 4 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1b47d988b218ee595430ec91eba91d80.asciidoc b/docs/examples/guide/1b47d988b218ee595430ec91eba91d80.asciidoc deleted file mode 100644 index 16c1e35f70..0000000000 --- a/docs/examples/guide/1b47d988b218ee595430ec91eba91d80.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'logs-foo', - body: { - index_patterns: [ - 'logs-foo-*' - ], - data_stream: {}, - composed_of: [ - 'logs-foo_component1', - 'logs-foo_component2' - ], - ignore_missing_component_templates: [ - 'logs-foo_component2' - ], - priority: 500 - } -) -puts response ----- diff --git a/docs/examples/guide/1b5c8d6e61930a308008b5b1ace2aa07.asciidoc b/docs/examples/guide/1b5c8d6e61930a308008b5b1ace2aa07.asciidoc deleted file mode 100644 index 6630104c85..0000000000 --- a/docs/examples/guide/1b5c8d6e61930a308008b5b1ace2aa07.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - 'manager.name' => 'Alice White' - } - }, - aggregations: { - "Employees": { - nested: { - path: 'employees' - }, - aggregations: { - "Employee Ages": { - histogram: { - field: 'employees.age', - interval: 5 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1ba7afe23a26fe9ac7856d8c5bc1059d.asciidoc b/docs/examples/guide/1ba7afe23a26fe9ac7856d8c5bc1059d.asciidoc deleted file mode 100644 index 99da9848af..0000000000 --- a/docs/examples/guide/1ba7afe23a26fe9ac7856d8c5bc1059d.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'romanian_example', - body: { - settings: { - analysis: { - filter: { - romanian_stop: { - type: 'stop', - stopwords: '_romanian_' - }, - romanian_keywords: { - type: 'keyword_marker', - keywords: [ - 'exemplu' - ] - }, - romanian_stemmer: { - type: 'stemmer', - language: 'romanian' - } - }, - analyzer: { - rebuilt_romanian: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'romanian_stop', - 'romanian_keywords', - 'romanian_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1c142bc8cac8d9dcb4f60e22902d434f.asciidoc b/docs/examples/guide/1c142bc8cac8d9dcb4f60e22902d434f.asciidoc deleted file mode 100644 index ce965d9b85..0000000000 --- a/docs/examples/guide/1c142bc8cac8d9dcb4f60e22902d434f.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - size: 0, - body: { - aggregations: { - message_stats: { - string_stats: { - field: 'message.keyword', - show_distribution: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1c1f2a6a193d9e64c37242b2824b3031.asciidoc b/docs/examples/guide/1c1f2a6a193d9e64c37242b2824b3031.asciidoc deleted file mode 100644 index f133387e99..0000000000 --- a/docs/examples/guide/1c1f2a6a193d9e64c37242b2824b3031.asciidoc +++ /dev/null @@ -1,56 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'source_template', - body: { - template: { - settings: { - index: { - number_of_replicas: 2, - number_of_shards: 2, - mode: 'time_series', - routing_path: [ - 'metricset' - ] - } - }, - mappings: { - properties: { - "@timestamp": { - type: 'date' - }, - metricset: { - type: 'keyword', - time_series_dimension: true - }, - "k8s": { - properties: { - tx: { - type: 'long' - }, - rx: { - type: 'long' - } - } - } - } - } - } - } -) -puts response - -response = client.indices.put_index_template( - name: 1, - body: { - index_patterns: [ - 'k8s*' - ], - composed_of: [ - 'source_template' - ], - data_stream: {} - } -) -puts response ----- diff --git a/docs/examples/guide/1c3e3c4f2d268f1826a9b417e1868a58.asciidoc b/docs/examples/guide/1c3e3c4f2d268f1826a9b417e1868a58.asciidoc deleted file mode 100644 index 852e14f12d..0000000000 --- a/docs/examples/guide/1c3e3c4f2d268f1826a9b417e1868a58.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'my-index-000001', - id: 1, - body: { - script: { - source: "ctx._source.tags.add(params['tag'])", - lang: 'painless', - params: { - tag: 'blue' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1c87b5bf682bc1e8809a657529e14b07.asciidoc b/docs/examples/guide/1c87b5bf682bc1e8809a657529e14b07.asciidoc deleted file mode 100644 index 43546a0bfb..0000000000 --- a/docs/examples/guide/1c87b5bf682bc1e8809a657529e14b07.asciidoc +++ /dev/null @@ -1,59 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'shapes', - body: { - mappings: { - properties: { - location: { - type: 'geo_shape' - } - } - } - } -) -puts response - -response = client.index( - index: 'shapes', - id: 'deu', - body: { - location: { - type: 'envelope', - coordinates: [ - [ - 13, - 53 - ], - [ - 14, - 52 - ] - ] - } - } -) -puts response - -response = client.search( - index: 'example', - body: { - query: { - bool: { - filter: { - geo_shape: { - location: { - indexed_shape: { - index: 'shapes', - id: 'deu', - path: 'location' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1c8b6768c4eefc76fcb38708152f561b.asciidoc b/docs/examples/guide/1c8b6768c4eefc76fcb38708152f561b.asciidoc deleted file mode 100644 index 0db58c045d..0000000000 --- a/docs/examples/guide/1c8b6768c4eefc76fcb38708152f561b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_data_frame_analytics( - id: 'loganalytics' -) -puts response ----- diff --git a/docs/examples/guide/1cab9da122778a95061831265c250cc1.asciidoc b/docs/examples/guide/1cab9da122778a95061831265c250cc1.asciidoc deleted file mode 100644 index fcc0cd1445..0000000000 --- a/docs/examples/guide/1cab9da122778a95061831265c250cc1.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - runtime_mappings: { - tags: { - type: 'keyword', - script: "\n emit(doc['type'].value);\n if (doc['promoted'].value) {\n emit('hot');\n }\n " - } - }, - aggregations: { - tags_count: { - value_count: { - field: 'tags' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1cadbcf2cfeb312f73b7f098291356ac.asciidoc b/docs/examples/guide/1cadbcf2cfeb312f73b7f098291356ac.asciidoc deleted file mode 100644 index 034775dae3..0000000000 --- a/docs/examples/guide/1cadbcf2cfeb312f73b7f098291356ac.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'MULTIPOINT (102.0 2.0, 103.0 2.0)' - } -) -puts response ----- diff --git a/docs/examples/guide/1cb3b45335ab1b9697c358104d44ea39.asciidoc b/docs/examples/guide/1cb3b45335ab1b9697c358104d44ea39.asciidoc deleted file mode 100644 index 431f740523..0000000000 --- a/docs/examples/guide/1cb3b45335ab1b9697c358104d44ea39.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'xpack.security.transport.filter.enabled' => false - } - } -) -puts response ----- diff --git a/docs/examples/guide/1cca4bb2f0ea7e43181be8bd965149d4.asciidoc b/docs/examples/guide/1cca4bb2f0ea7e43181be8bd965149d4.asciidoc deleted file mode 100644 index 1ab31ad1e1..0000000000 --- a/docs/examples/guide/1cca4bb2f0ea7e43181be8bd965149d4.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.eql.get( - id: 'FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=', - wait_for_completion_timeout: '2s' -) -puts response ----- diff --git a/docs/examples/guide/1cd3b9d65576a9212eef898eb3105758.asciidoc b/docs/examples/guide/1cd3b9d65576a9212eef898eb3105758.asciidoc deleted file mode 100644 index 76116fcedb..0000000000 --- a/docs/examples/guide/1cd3b9d65576a9212eef898eb3105758.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.enable' => 'primaries' - } - } -) -puts response ----- diff --git a/docs/examples/guide/1ce2cbfe1430c8837c19304a6b648af3.asciidoc b/docs/examples/guide/1ce2cbfe1430c8837c19304a6b648af3.asciidoc deleted file mode 100644 index ab0394bf90..0000000000 --- a/docs/examples/guide/1ce2cbfe1430c8837c19304a6b648af3.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.esql.query( - body: { - query: 'FROM mv | EVAL b + 2, a + b | LIMIT 4', - version: '2024.04.01' - } -) -puts response ----- diff --git a/docs/examples/guide/1cea60c47d5c0e150b4c8fff4cd75ffe.asciidoc b/docs/examples/guide/1cea60c47d5c0e150b4c8fff4cd75ffe.asciidoc deleted file mode 100644 index c1cb6a423e..0000000000 --- a/docs/examples/guide/1cea60c47d5c0e150b4c8fff4cd75ffe.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - processors: [ - { - script: { - description: 'Set index based on `lang` field and `dataset` param', - lang: 'painless', - source: "\n ctx['_index'] = ctx['lang'] + '-' + params['dataset'];\n ", - params: { - dataset: 'catalog' - } - } - } - ] - }, - docs: [ - { - _index: 'generic-index', - _source: { - lang: 'fr' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/1cecd4d87a92427175157d41859df2af.asciidoc b/docs/examples/guide/1cecd4d87a92427175157d41859df2af.asciidoc deleted file mode 100644 index 980bca0a3f..0000000000 --- a/docs/examples/guide/1cecd4d87a92427175157d41859df2af.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.cluster.allocation_explain( - body: { - index: 'my-index-000001', - shard: 0, - primary: false, - current_node: 'my-node' - } -) -puts response ----- diff --git a/docs/examples/guide/1cfa04e9654c1484e3d4c75bf439400a.asciidoc b/docs/examples/guide/1cfa04e9654c1484e3d4c75bf439400a.asciidoc deleted file mode 100644 index b12afda61e..0000000000 --- a/docs/examples/guide/1cfa04e9654c1484e3d4c75bf439400a.asciidoc +++ /dev/null @@ -1,58 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'polygon', - coordinates: [ - [ - [ - 1000, - -1001 - ], - [ - 1001, - -1001 - ], - [ - 1001, - -1000 - ], - [ - 1000, - -1000 - ], - [ - 1000, - -1001 - ] - ], - [ - [ - 1000.2, - -1001.2 - ], - [ - 1000.8, - -1001.2 - ], - [ - 1000.8, - -1001.8 - ], - [ - 1000.2, - -1001.8 - ], - [ - 1000.2, - -1001.2 - ] - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/1d746272a7511bf91302a15b5c58ca0e.asciidoc b/docs/examples/guide/1d746272a7511bf91302a15b5c58ca0e.asciidoc deleted file mode 100644 index 91ad0a31e5..0000000000 --- a/docs/examples/guide/1d746272a7511bf91302a15b5c58ca0e.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'passage_vectors', - body: { - fields: [ - 'full_text', - 'creation_time' - ], - _source: false, - knn: { - query_vector: [ - 0.45, - 45 - ], - field: 'paragraph.vector', - k: 2, - num_candidates: 2 - } - } -) -puts response ----- diff --git a/docs/examples/guide/1d827ae674970692643ea81991e5396e.asciidoc b/docs/examples/guide/1d827ae674970692643ea81991e5396e.asciidoc deleted file mode 100644 index 7f49129ea6..0000000000 --- a/docs/examples/guide/1d827ae674970692643ea81991e5396e.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - flattened: { - type: 'flattened' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - flattened: { - field: [ - 'apple', - 'apple', - 'banana', - 'avocado', - '10', - '200', - 'AVOCADO', - 'Banana', - 'Tangerine' - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/1d918e206ad8dab916e59183da24d9ec.asciidoc b/docs/examples/guide/1d918e206ad8dab916e59183da24d9ec.asciidoc deleted file mode 100644 index aa554fcd02..0000000000 --- a/docs/examples/guide/1d918e206ad8dab916e59183da24d9ec.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: '.watches', - body: { - 'index.routing.allocation.include.role' => 'watcher' - } -) -puts response ----- diff --git a/docs/examples/guide/1d9b695a17cffd910c496c9b03c75d6f.asciidoc b/docs/examples/guide/1d9b695a17cffd910c496c9b03c75d6f.asciidoc deleted file mode 100644 index 0bfbbe2d71..0000000000 --- a/docs/examples/guide/1d9b695a17cffd910c496c9b03c75d6f.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'pre-dsl-ilm-policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_primary_shard_size: '50gb' - } - } - }, - delete: { - min_age: '7d', - actions: { - delete: {} - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1db086021e83205b6eab3b7765911cc2.asciidoc b/docs/examples/guide/1db086021e83205b6eab3b7765911cc2.asciidoc deleted file mode 100644 index 2ddd6eb633..0000000000 --- a/docs/examples/guide/1db086021e83205b6eab3b7765911cc2.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'parent_example', - body: { - mappings: { - properties: { - join: { - type: 'join', - relations: { - question: 'answer' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc b/docs/examples/guide/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc deleted file mode 100644 index 2b4c69cf6d..0000000000 --- a/docs/examples/guide/1dbb8cf17fbc45c87c7d2f75f15f9778.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.state( - filter_path: 'metadata.indices.*.stat*' -) -puts response ----- diff --git a/docs/examples/guide/1e08e054c761353f99211cd18e8ca47b.asciidoc b/docs/examples/guide/1e08e054c761353f99211cd18e8ca47b.asciidoc deleted file mode 100644 index 3606b9edfe..0000000000 --- a/docs/examples/guide/1e08e054c761353f99211cd18e8ca47b.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_model_snapshot( - job_id: 'farequote', - snapshot_id: 1_491_948_163 -) -puts response ----- diff --git a/docs/examples/guide/1e0f203aced9344382081ab095c44dde.asciidoc b/docs/examples/guide/1e0f203aced9344382081ab095c44dde.asciidoc deleted file mode 100644 index d824e5400e..0000000000 --- a/docs/examples/guide/1e0f203aced9344382081ab095c44dde.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - text: { - type: 'text', - store: true - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - text: [ - 'the quick brown fox', - 'the quick brown fox', - 'jumped over the lazy dog' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc b/docs/examples/guide/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc deleted file mode 100644 index 7c65324eb7..0000000000 --- a/docs/examples/guide/1e18a67caf8f06ff2710ec4a8b30f625.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.state( - filter_path: 'metadata.indices.*.state,-metadata.indices.logstash-*' -) -puts response ----- diff --git a/docs/examples/guide/1e2c5cef7a3f254c71a33865eb4d7569.asciidoc b/docs/examples/guide/1e2c5cef7a3f254c71a33865eb4d7569.asciidoc deleted file mode 100644 index c586d609f6..0000000000 --- a/docs/examples/guide/1e2c5cef7a3f254c71a33865eb4d7569.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'items', - body: { - query: { - bool: { - must: { - match: { - name: 'chocolate' - } - }, - should: { - distance_feature: { - field: 'production_date', - pivot: '7d', - origin: 'now' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1e3384bc255729b65a6f0fc8011ff733.asciidoc b/docs/examples/guide/1e3384bc255729b65a6f0fc8011ff733.asciidoc deleted file mode 100644 index 8489ad15ef..0000000000 --- a/docs/examples/guide/1e3384bc255729b65a6f0fc8011ff733.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.segments( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/1e547696f54582840040b1aa6661760c.asciidoc b/docs/examples/guide/1e547696f54582840040b1aa6661760c.asciidoc deleted file mode 100644 index 94b430e817..0000000000 --- a/docs/examples/guide/1e547696f54582840040b1aa6661760c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.rollover( - alias: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/1e871f060dbe1a5c316ed205278804a8.asciidoc b/docs/examples/guide/1e871f060dbe1a5c316ed205278804a8.asciidoc deleted file mode 100644 index 9b40317e3a..0000000000 --- a/docs/examples/guide/1e871f060dbe1a5c316ed205278804a8.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - countries: { - terms: { - field: 'artist.country', - order: { - "rock>playback_stats.avg": 'desc' - } - }, - aggregations: { - rock: { - filter: { - term: { - genre: 'rock' - } - }, - aggregations: { - playback_stats: { - stats: { - field: 'play_count' - } - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1e94a2bb95bc245bcfb87ac7d611cf49.asciidoc b/docs/examples/guide/1e94a2bb95bc245bcfb87ac7d611cf49.asciidoc deleted file mode 100644 index 95b97b0d29..0000000000 --- a/docs/examples/guide/1e94a2bb95bc245bcfb87ac7d611cf49.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_outlier: { - percentiles: { - field: 'load_time', - tdigest: { - execution_hint: 'high_accuracy' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1e9cab0b2727624e22e8cf4e7ca498ac.asciidoc b/docs/examples/guide/1e9cab0b2727624e22e8cf4e7ca498ac.asciidoc deleted file mode 100644 index b14ee093b3..0000000000 --- a/docs/examples/guide/1e9cab0b2727624e22e8cf4e7ca498ac.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.health( - pretty: true -) -puts response ----- diff --git a/docs/examples/guide/1ea24f67fbbb6293d53caf2fe0c4b984.asciidoc b/docs/examples/guide/1ea24f67fbbb6293d53caf2fe0c4b984.asciidoc deleted file mode 100644 index 9cac90e786..0000000000 --- a/docs/examples/guide/1ea24f67fbbb6293d53caf2fe0c4b984.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - analyzer: 'simple', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/1eb9c6ecb827ca69f7b17f7d2a26eae9.asciidoc b/docs/examples/guide/1eb9c6ecb827ca69f7b17f7d2a26eae9.asciidoc deleted file mode 100644 index a40eec98d0..0000000000 --- a/docs/examples/guide/1eb9c6ecb827ca69f7b17f7d2a26eae9.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: { - query: { - term: { - 'url.full' => '{{#url}}{{host}}/{{page}}{{/url}}' - } - } - }, - params: { - host: 'http://example.com', - page: 'hello-world' - } - } -) -puts response ----- diff --git a/docs/examples/guide/1ec66f188f681598cb5d7df700b214e3.asciidoc b/docs/examples/guide/1ec66f188f681598cb5d7df700b214e3.asciidoc deleted file mode 100644 index 024824cd26..0000000000 --- a/docs/examples/guide/1ec66f188f681598cb5d7df700b214e3.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_custom_analyzer: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'my_custom_keyword_marker_filter', - 'porter_stem' - ] - } - }, - filter: { - my_custom_keyword_marker_filter: { - type: 'keyword_marker', - keywords_path: 'analysis/example_word_list.txt' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1ed26c7b445ab1c167bd9385e1f0066f.asciidoc b/docs/examples/guide/1ed26c7b445ab1c167bd9385e1f0066f.asciidoc deleted file mode 100644 index f3725a76de..0000000000 --- a/docs/examples/guide/1ed26c7b445ab1c167bd9385e1f0066f.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.sql.delete_async( - id: 'FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=' -) -puts response ----- diff --git a/docs/examples/guide/1ed77bf308fa4ab328b36060e412f500.asciidoc b/docs/examples/guide/1ed77bf308fa4ab328b36060e412f500.asciidoc deleted file mode 100644 index fb386b3b81..0000000000 --- a/docs/examples/guide/1ed77bf308fa4ab328b36060e412f500.asciidoc +++ /dev/null @@ -1,91 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'metrics_index', - body: { - mappings: { - properties: { - network: { - properties: { - name: { - type: 'keyword' - } - } - }, - latency_histo: { - type: 'histogram' - } - } - } - } -) -puts response - -response = client.index( - index: 'metrics_index', - id: 1, - refresh: true, - body: { - 'network.name' => 'net-1', - latency_histo: { - values: [ - 1, - 3, - 8, - 12, - 15 - ], - counts: [ - 3, - 7, - 23, - 12, - 6 - ] - } - } -) -puts response - -response = client.index( - index: 'metrics_index', - id: 2, - refresh: true, - body: { - 'network.name' => 'net-2', - latency_histo: { - values: [ - 1, - 6, - 8, - 12, - 14 - ], - counts: [ - 8, - 17, - 8, - 7, - 6 - ] - } - } -) -puts response - -response = client.search( - index: 'metrics_index', - size: 0, - body: { - aggregations: { - latency_buckets: { - histogram: { - field: 'latency_histo', - interval: 5 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1eea46b08610972b79fdc4649748455d.asciidoc b/docs/examples/guide/1eea46b08610972b79fdc4649748455d.asciidoc deleted file mode 100644 index 255d13170e..0000000000 --- a/docs/examples/guide/1eea46b08610972b79fdc4649748455d.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - script_score: { - query: { - bool: { - filter: { - term: { - status: 'published' - } - } - } - }, - script: { - source: "cosineSimilarity(params.query_vector, 'my_dense_vector') + 1.0", - params: { - query_vector: [ - 4, - 3.4, - -0.2 - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1ef5119db55a6f2b6fc0ab92f36e7f8e.asciidoc b/docs/examples/guide/1ef5119db55a6f2b6fc0ab92f36e7f8e.asciidoc deleted file mode 100644 index 0ba2ce8387..0000000000 --- a/docs/examples/guide/1ef5119db55a6f2b6fc0ab92f36e7f8e.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - sort: [ - { - post_date: { - format: 'strict_date_optional_time_nanos' - } - } - ], - query: { - term: { - user: 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1f00e73c144603e97f6c14ab15fa1913.asciidoc b/docs/examples/guide/1f00e73c144603e97f6c14ab15fa1913.asciidoc deleted file mode 100644 index 0d517d81f6..0000000000 --- a/docs/examples/guide/1f00e73c144603e97f6c14ab15fa1913.asciidoc +++ /dev/null @@ -1,44 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'greek_example', - body: { - settings: { - analysis: { - filter: { - greek_stop: { - type: 'stop', - stopwords: '_greek_' - }, - greek_lowercase: { - type: 'lowercase', - language: 'greek' - }, - greek_keywords: { - type: 'keyword_marker', - keywords: [ - 'παράδειγμα' - ] - }, - greek_stemmer: { - type: 'stemmer', - language: 'greek' - } - }, - analyzer: { - rebuilt_greek: { - tokenizer: 'standard', - filter: [ - 'greek_lowercase', - 'greek_stop', - 'greek_keywords', - 'greek_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1f13c7caef9c2fe0f73fce8795bbc9b0.asciidoc b/docs/examples/guide/1f13c7caef9c2fe0f73fce8795bbc9b0.asciidoc deleted file mode 100644 index 52967db723..0000000000 --- a/docs/examples/guide/1f13c7caef9c2fe0f73fce8795bbc9b0.asciidoc +++ /dev/null @@ -1,49 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - std_folded: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'lowercase', - 'asciifolding' - ] - } - } - } - }, - mappings: { - properties: { - my_text: { - type: 'text', - analyzer: 'std_folded' - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'std_folded', - text: 'Is this déjà vu?' - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - field: 'my_text', - text: 'Is this déjà vu?' - } -) -puts response ----- diff --git a/docs/examples/guide/1f3dd84ab11bae09d3f99b1b3536e239.asciidoc b/docs/examples/guide/1f3dd84ab11bae09d3f99b1b3536e239.asciidoc deleted file mode 100644 index 27a31503cd..0000000000 --- a/docs/examples/guide/1f3dd84ab11bae09d3f99b1b3536e239.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.create( - repository: 'my_repository', - snapshot: 'my_snapshot' -) -puts response ----- diff --git a/docs/examples/guide/1f507659757e2844cefced25848540a0.asciidoc b/docs/examples/guide/1f507659757e2844cefced25848540a0.asciidoc deleted file mode 100644 index 4681d24d98..0000000000 --- a/docs/examples/guide/1f507659757e2844cefced25848540a0.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_distance: { - distance: '12km', - 'pin.location' => [ - -70, - 40 - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1f673e1a0de2970dc648618d5425a994.asciidoc b/docs/examples/guide/1f673e1a0de2970dc648618d5425a994.asciidoc deleted file mode 100644 index a3270597a4..0000000000 --- a/docs/examples/guide/1f673e1a0de2970dc648618d5425a994.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.refresh -puts response - -response = client.search( - index: 'my-new-index-000001', - size: 0, - filter_path: 'hits.total' -) -puts response ----- diff --git a/docs/examples/guide/1f6a190fa1aade1fb66680388f184ef9.asciidoc b/docs/examples/guide/1f6a190fa1aade1fb66680388f184ef9.asciidoc deleted file mode 100644 index 4ab0f74b92..0000000000 --- a/docs/examples/guide/1f6a190fa1aade1fb66680388f184ef9.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.validate_query( - index: 'my-index-000001', - rewrite: true, - all_shards: true, - body: { - query: { - match: { - 'user.id' => { - query: 'kimchy', - fuzziness: 'auto' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1f900f7178e80051e75d4fd04467cf49.asciidoc b/docs/examples/guide/1f900f7178e80051e75d4fd04467cf49.asciidoc deleted file mode 100644 index ae05117f68..0000000000 --- a/docs/examples/guide/1f900f7178e80051e75d4fd04467cf49.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - pipeline: 'pipelineB', - body: { - field: 'value' - } -) -puts response ----- diff --git a/docs/examples/guide/1fcc4a3280be399753dcfd5c489ff682.asciidoc b/docs/examples/guide/1fcc4a3280be399753dcfd5c489ff682.asciidoc deleted file mode 100644 index ba41c64e82..0000000000 --- a/docs/examples/guide/1fcc4a3280be399753dcfd5c489ff682.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - my_range: { - type: 'ip_range' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - my_range: [ - '10.0.0.0/24', - { - gte: '10.0.0.0', - lte: '10.0.0.255' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/1fddbd602a6acf896a393cdb500a2831.asciidoc b/docs/examples/guide/1fddbd602a6acf896a393cdb500a2831.asciidoc deleted file mode 100644 index d95d44799e..0000000000 --- a/docs/examples/guide/1fddbd602a6acf896a393cdb500a2831.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - by_date: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - avg_number_of_sales_per_year: { - rate: { - field: 'price', - unit: 'year', - mode: 'value_count' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1fe2ed1d65c4774755de44c9b9d6ed67.asciidoc b/docs/examples/guide/1fe2ed1d65c4774755de44c9b9d6ed67.asciidoc deleted file mode 100644 index 9f3f884651..0000000000 --- a/docs/examples/guide/1fe2ed1d65c4774755de44c9b9d6ed67.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - metric: 'ingest', - filter_path: 'nodes.*.ingest' -) -puts response ----- diff --git a/docs/examples/guide/1ff296e868635fd102239871a331331b.asciidoc b/docs/examples/guide/1ff296e868635fd102239871a331331b.asciidoc deleted file mode 100644 index ffb62ca1e6..0000000000 --- a/docs/examples/guide/1ff296e868635fd102239871a331331b.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - type_count: { - cardinality: { - field: 'type', - precision_threshold: 100 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/1ff9b263b7c3e83278bb6a776a51590a.asciidoc b/docs/examples/guide/1ff9b263b7c3e83278bb6a776a51590a.asciidoc deleted file mode 100644 index 3007561c39..0000000000 --- a/docs/examples/guide/1ff9b263b7c3e83278bb6a776a51590a.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - prices: { - histogram: { - field: 'price', - interval: 50 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/20005d8a6555b259b299d862cd218701.asciidoc b/docs/examples/guide/20005d8a6555b259b299d862cd218701.asciidoc deleted file mode 100644 index 1ba48c244a..0000000000 --- a/docs/examples/guide/20005d8a6555b259b299d862cd218701.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - message: { - query: 'this is a test', - operator: 'and' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2006f577a113bda40905cf7b405bf1cf.asciidoc b/docs/examples/guide/2006f577a113bda40905cf7b405bf1cf.asciidoc deleted file mode 100644 index bd49ea005f..0000000000 --- a/docs/examples/guide/2006f577a113bda40905cf7b405bf1cf.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - processors: [ - { - set: { - description: "If 'url.scheme' is 'http', set 'url.insecure' to true", - if: 'ctx.url?.scheme =~ /^http[^s]/', - field: 'url.insecure', - value: true - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/2009f2d1ba0780a799a0fdce889c9739.asciidoc b/docs/examples/guide/2009f2d1ba0780a799a0fdce889c9739.asciidoc deleted file mode 100644 index c206fffad9..0000000000 --- a/docs/examples/guide/2009f2d1ba0780a799a0fdce889c9739.asciidoc +++ /dev/null @@ -1,64 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'passage_vectors', - refresh: true, - body: [ - { - index: { - _id: '1' - } - }, - { - full_text: 'first paragraph another paragraph', - creation_time: '2019-05-04', - paragraph: [ - { - vector: [ - 0.45, - 45 - ], - text: 'first paragraph', - paragraph_id: '1' - }, - { - vector: [ - 0.8, - 0.6 - ], - text: 'another paragraph', - paragraph_id: '2' - } - ] - }, - { - index: { - _id: '2' - } - }, - { - full_text: 'number one paragraph number two paragraph', - creation_time: '2020-05-04', - paragraph: [ - { - vector: [ - 1.2, - 4.5 - ], - text: 'number one paragraph', - paragraph_id: '1' - }, - { - vector: [ - -1, - 42 - ], - text: 'number two paragraph', - paragraph_id: '2' - } - ] - } - ] -) -puts response ----- diff --git a/docs/examples/guide/200f6d4cc7b9c300b8962a119e03873f.asciidoc b/docs/examples/guide/200f6d4cc7b9c300b8962a119e03873f.asciidoc deleted file mode 100644 index 63c9efa833..0000000000 --- a/docs/examples/guide/200f6d4cc7b9c300b8962a119e03873f.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_data_stream( - name: 'my-data-stream*' -) -puts response ----- diff --git a/docs/examples/guide/20162e1dac807a7604f58dad814d1bc5.asciidoc b/docs/examples/guide/20162e1dac807a7604f58dad814d1bc5.asciidoc deleted file mode 100644 index eabde4bbe6..0000000000 --- a/docs/examples/guide/20162e1dac807a7604f58dad814d1bc5.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - en: { - tokenizer: 'standard', - filter: [ - 'my_en_US_dict_stemmer' - ] - } - }, - filter: { - "my_en_US_dict_stemmer": { - type: 'hunspell', - locale: 'en_US', - dedup: false - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/20407c847adb8393ce41dc656384afc4.asciidoc b/docs/examples/guide/20407c847adb8393ce41dc656384afc4.asciidoc deleted file mode 100644 index 9d11ea16f9..0000000000 --- a/docs/examples/guide/20407c847adb8393ce41dc656384afc4.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'passage_vectors', - body: { - fields: [ - 'creation_time', - 'full_text' - ], - _source: false, - knn: { - query_vector: [ - 0.45, - 45 - ], - field: 'paragraph.vector', - k: 2, - num_candidates: 2, - filter: { - bool: { - filter: [ - { - range: { - creation_time: { - gte: '2019-05-01', - lte: '2019-05-05' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2051ffe025550ab6645bfd525eaed3c4.asciidoc b/docs/examples/guide/2051ffe025550ab6645bfd525eaed3c4.asciidoc deleted file mode 100644 index 237e9d305f..0000000000 --- a/docs/examples/guide/2051ffe025550ab6645bfd525eaed3c4.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_bounding_box: { - 'pin.location' => { - top_left: 'POINT (-74.1 40.73)', - bottom_right: 'POINT (-71.12 40.01)' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2063713516847eef5d1dbf4ca1e877b0.asciidoc b/docs/examples/guide/2063713516847eef5d1dbf4ca1e877b0.asciidoc deleted file mode 100644 index 40df93ed48..0000000000 --- a/docs/examples/guide/2063713516847eef5d1dbf4ca1e877b0.asciidoc +++ /dev/null @@ -1,94 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'museums', - body: { - mappings: { - properties: { - location: { - type: 'geo_point' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'museums', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - location: 'POINT (4.912350 52.374081)', - name: 'NEMO Science Museum' - }, - { - index: { - _id: 2 - } - }, - { - location: 'POINT (4.901618 52.369219)', - name: 'Museum Het Rembrandthuis' - }, - { - index: { - _id: 3 - } - }, - { - location: 'POINT (4.914722 52.371667)', - name: 'Nederlands Scheepvaartmuseum' - }, - { - index: { - _id: 4 - } - }, - { - location: 'POINT (4.405200 51.222900)', - name: 'Letterenhuis' - }, - { - index: { - _id: 5 - } - }, - { - location: 'POINT (2.336389 48.861111)', - name: 'Musée du Louvre' - }, - { - index: { - _id: 6 - } - }, - { - location: 'POINT (2.327000 48.860000)', - name: "Musée d'Orsay" - } - ] -) -puts response - -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - "large-grid": { - geohex_grid: { - field: 'location', - precision: 4 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/206c723296be8ef8d58aef3ee01f5ba2.asciidoc b/docs/examples/guide/206c723296be8ef8d58aef3ee01f5ba2.asciidoc deleted file mode 100644 index 29ebb4cc2e..0000000000 --- a/docs/examples/guide/206c723296be8ef8d58aef3ee01f5ba2.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - my_date_histo: { - date_histogram: { - field: 'timestamp', - calendar_interval: 'day' - }, - aggregations: { - the_deriv: { - derivative: { - buckets_path: '_count' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/206d57bf0cb022c8229894e7753eca83.asciidoc b/docs/examples/guide/206d57bf0cb022c8229894e7753eca83.asciidoc deleted file mode 100644 index aa9018c84d..0000000000 --- a/docs/examples/guide/206d57bf0cb022c8229894e7753eca83.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'example', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_shape: { - location: { - shape: { - type: 'envelope', - coordinates: [ - [ - 13, - 53 - ], - [ - 14, - 52 - ] - ] - }, - relation: 'within' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2081739da0c69de8af6f5bf9e94433e6.asciidoc b/docs/examples/guide/2081739da0c69de8af6f5bf9e94433e6.asciidoc deleted file mode 100644 index ca8445843c..0000000000 --- a/docs/examples/guide/2081739da0c69de8af6f5bf9e94433e6.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'MULTILINESTRING ((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0), (100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8))' - } -) -puts response ----- diff --git a/docs/examples/guide/208c2b41bd1659aae8f02fa3e3b7378a.asciidoc b/docs/examples/guide/208c2b41bd1659aae8f02fa3e3b7378a.asciidoc deleted file mode 100644 index 63ca307cc6..0000000000 --- a/docs/examples/guide/208c2b41bd1659aae8f02fa3e3b7378a.asciidoc +++ /dev/null @@ -1,49 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - first_name: { - type: 'text', - copy_to: 'full_name' - }, - last_name: { - type: 'text', - copy_to: 'full_name' - }, - full_name: { - type: 'text' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - first_name: 'John', - last_name: 'Smith' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - full_name: { - query: 'John Smith', - operator: 'and' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/209a9190082498f0b7daa26f8834846b.asciidoc b/docs/examples/guide/209a9190082498f0b7daa26f8834846b.asciidoc deleted file mode 100644 index 64d93b58ba..0000000000 --- a/docs/examples/guide/209a9190082498f0b7daa26f8834846b.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - properties: { - title: { - type: 'text', - norms: false - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/20bc71cc5bbe04184e27827f3777a406.asciidoc b/docs/examples/guide/20bc71cc5bbe04184e27827f3777a406.asciidoc deleted file mode 100644 index b9da9ba6ce..0000000000 --- a/docs/examples/guide/20bc71cc5bbe04184e27827f3777a406.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - fields: [ - '@timestamp', - 'day_of_week' - ], - _source: false - } -) -puts response ----- diff --git a/docs/examples/guide/20e3b181114e00c943a27a9bbcf85f15.asciidoc b/docs/examples/guide/20e3b181114e00c943a27a9bbcf85f15.asciidoc deleted file mode 100644 index ea6dba96f7..0000000000 --- a/docs/examples/guide/20e3b181114e00c943a27a9bbcf85f15.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_records( - job_id: 'low_request_rate', - body: { - sort: 'record_score', - desc: true, - start: '1454944100000' - } -) -puts response ----- diff --git a/docs/examples/guide/20f62d0540bf6261549bd286416eae28.asciidoc b/docs/examples/guide/20f62d0540bf6261549bd286416eae28.asciidoc deleted file mode 100644 index 6f1752eb7c..0000000000 --- a/docs/examples/guide/20f62d0540bf6261549bd286416eae28.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.enrich.put_policy( - name: 'my-policy', - body: { - match: { - indices: 'users', - match_field: 'email', - enrich_fields: [ - 'first_name', - 'last_name', - 'city', - 'zip', - 'state' - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/2105f2d1d81977054a93163a175793ce.asciidoc b/docs/examples/guide/2105f2d1d81977054a93163a175793ce.asciidoc deleted file mode 100644 index 3d489981ec..0000000000 --- a/docs/examples/guide/2105f2d1d81977054a93163a175793ce.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.status -puts response ----- diff --git a/docs/examples/guide/2155c920d7d860f3ee7542f2211b4fec.asciidoc b/docs/examples/guide/2155c920d7d860f3ee7542f2211b4fec.asciidoc deleted file mode 100644 index f6c627b4bc..0000000000 --- a/docs/examples/guide/2155c920d7d860f3ee7542f2211b4fec.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - text_expansion: { - "": { - model_id: 'the model to produce the token weights', - model_text: 'the query string' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/21565b72da426776e445b1a166f6e104.asciidoc b/docs/examples/guide/21565b72da426776e445b1a166f6e104.asciidoc deleted file mode 100644 index 1af4e498a5..0000000000 --- a/docs/examples/guide/21565b72da426776e445b1a166f6e104.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - "my-join-field": { - type: 'join', - relations: { - parent: 'child' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/216848930c2d344fe0bed0daa70c35b9.asciidoc b/docs/examples/guide/216848930c2d344fe0bed0daa70c35b9.asciidoc deleted file mode 100644 index 43b04bf023..0000000000 --- a/docs/examples/guide/216848930c2d344fe0bed0daa70c35b9.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.tasks.list( - detailed: true, - actions: '*/delete/byquery' -) -puts response ----- diff --git a/docs/examples/guide/216a6573ab4ab023e5dcac4eaa08c3c8.asciidoc b/docs/examples/guide/216a6573ab4ab023e5dcac4eaa08c3c8.asciidoc deleted file mode 100644 index 4288280d51..0000000000 --- a/docs/examples/guide/216a6573ab4ab023e5dcac4eaa08c3c8.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.verify_repository( - repository: 'my_unverified_backup' -) -puts response ----- diff --git a/docs/examples/guide/21715c32c140feeab04b38ff6d6de111.asciidoc b/docs/examples/guide/21715c32c140feeab04b38ff6d6de111.asciidoc deleted file mode 100644 index adee29f2d5..0000000000 --- a/docs/examples/guide/21715c32c140feeab04b38ff6d6de111.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_mapping( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/2185c9dfc62a59313df1702ec1c3513e.asciidoc b/docs/examples/guide/2185c9dfc62a59313df1702ec1c3513e.asciidoc deleted file mode 100644 index cc3fff289d..0000000000 --- a/docs/examples/guide/2185c9dfc62a59313df1702ec1c3513e.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_outlier: { - percentiles: { - field: 'load_time', - percents: [ - 95, - 99, - 99.9 - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/218b9009f120e8ad33f710e019179562.asciidoc b/docs/examples/guide/218b9009f120e8ad33f710e019179562.asciidoc deleted file mode 100644 index c54a7cd531..0000000000 --- a/docs/examples/guide/218b9009f120e8ad33f710e019179562.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get_repository( - repository: 'my_repository' -) -puts response ----- diff --git a/docs/examples/guide/21a226d91d8edd209f6a821064e83918.asciidoc b/docs/examples/guide/21a226d91d8edd209f6a821064e83918.asciidoc deleted file mode 100644 index 7d648484ba..0000000000 --- a/docs/examples/guide/21a226d91d8edd209f6a821064e83918.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - query: { - match: { - type: 't-shirt' - } - }, - aggregations: { - all_products: { - global: {}, - aggregations: { - avg_price: { - avg: { - field: 'price' - } - } - } - }, - t_shirts: { - avg: { - field: 'price' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/21bb03ca9123de3237c1c76934f9f172.asciidoc b/docs/examples/guide/21bb03ca9123de3237c1c76934f9f172.asciidoc deleted file mode 100644 index fc4cbd5dfd..0000000000 --- a/docs/examples/guide/21bb03ca9123de3237c1c76934f9f172.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'logs', - id: 4, - refresh: true, - body: { - body: 'info: user Bob logged out' - } -) -puts response - -response = client.search( - index: 'logs', - body: { - size: 0, - aggregations: { - messages: { - filters: { - other_bucket_key: 'other_messages', - filters: { - errors: { - match: { - body: 'error' - } - }, - warnings: { - match: { - body: 'warning' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/21c1e6ee886140ce0cd67184dd19b981.asciidoc b/docs/examples/guide/21c1e6ee886140ce0cd67184dd19b981.asciidoc deleted file mode 100644 index 831af726ea..0000000000 --- a/docs/examples/guide/21c1e6ee886140ce0cd67184dd19b981.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.dangling_indices.list_dangling_indices -puts response ----- diff --git a/docs/examples/guide/21d0ab6e420bfe7a1639db6af5b2e9c0.asciidoc b/docs/examples/guide/21d0ab6e420bfe7a1639db6af5b2e9c0.asciidoc deleted file mode 100644 index 649fd51ca7..0000000000 --- a/docs/examples/guide/21d0ab6e420bfe7a1639db6af5b2e9c0.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'reviews', - filter_path: 'aggregations', - body: { - size: 0, - runtime_mappings: { - 'rating.out_of_ten' => { - type: 'long', - script: { - source: "emit(doc['rating'].value * params.scaleFactor)", - params: { - "scaleFactor": 2 - } - } - } - }, - aggregations: { - review_average: { - avg: { - field: 'rating.out_of_ten' - } - }, - review_variability: { - median_absolute_deviation: { - field: 'rating.out_of_ten' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc b/docs/examples/guide/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc deleted file mode 100644 index 6b26b2063b..0000000000 --- a/docs/examples/guide/2224143c45dfc83a2d10b98cd4f94bb5.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index', - body: { - query: { - bool: { - must_not: [ - { - nested: { - path: 'comments', - query: { - term: { - 'comments.author' => 'nik9000' - } - } - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2238ac4170275f6cfc2af49c3f014cbc.asciidoc b/docs/examples/guide/2238ac4170275f6cfc2af49c3f014cbc.asciidoc deleted file mode 100644 index b56b0daa0e..0000000000 --- a/docs/examples/guide/2238ac4170275f6cfc2af49c3f014cbc.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'exams', - body: { - size: 0, - runtime_mappings: { - 'grade.corrected' => { - type: 'double', - script: { - source: "emit(Math.min(100, doc['grade'].value * params.correction))", - params: { - correction: 1.2 - } - } - } - }, - aggregations: { - grades_stats: { - extended_stats: { - field: 'grade.corrected' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/22882d4eb8b99f44c8e0d3a2c893fc4b.asciidoc b/docs/examples/guide/22882d4eb8b99f44c8e0d3a2c893fc4b.asciidoc deleted file mode 100644 index 3228d3d11d..0000000000 --- a/docs/examples/guide/22882d4eb8b99f44c8e0d3a2c893fc4b.asciidoc +++ /dev/null @@ -1,45 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - "my-small": { - type: 'keyword', - ignore_above: 2 - }, - "my-large": { - type: 'keyword' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - "my-small": [ - 'ok', - 'bad' - ], - "my-large": 'ok content' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - fields: [ - 'my-*' - ], - _source: false - } -) -puts response ----- diff --git a/docs/examples/guide/229b83cbcd8efa1b0288a728a2abacb4.asciidoc b/docs/examples/guide/229b83cbcd8efa1b0288a728a2abacb4.asciidoc deleted file mode 100644 index 4261775eb1..0000000000 --- a/docs/examples/guide/229b83cbcd8efa1b0288a728a2abacb4.asciidoc +++ /dev/null @@ -1,78 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - location: { - type: 'point' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - text: 'Point as an object using GeoJSON format', - location: { - type: 'Point', - coordinates: [ - -71.34, - 41.12 - ] - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - text: 'Point as a WKT POINT primitive', - location: 'POINT (-71.34 41.12)' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 3, - body: { - text: "Point as an object with 'x' and 'y' keys", - location: { - x: -71.34, - y: 41.12 - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 4, - body: { - text: 'Point as an array', - location: [ - -71.34, - 41.12 - ] - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 5, - body: { - text: 'Point as a string', - location: '-71.34,41.12' - } -) -puts response ----- diff --git a/docs/examples/guide/22cb99d4e6ba3101a2d9f59764a90877.asciidoc b/docs/examples/guide/22cb99d4e6ba3101a2d9f59764a90877.asciidoc deleted file mode 100644 index 0408e0fdf8..0000000000 --- a/docs/examples/guide/22cb99d4e6ba3101a2d9f59764a90877.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'POINT (-77.03653 38.897676)' - } -) -puts response ----- diff --git a/docs/examples/guide/22d8e92b4100f8e4f52260ef8d3aa2b2.asciidoc b/docs/examples/guide/22d8e92b4100f8e4f52260ef8d3aa2b2.asciidoc deleted file mode 100644 index d48c76941d..0000000000 --- a/docs/examples/guide/22d8e92b4100f8e4f52260ef8d3aa2b2.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - name: { - type: 'text' - }, - blob: { - type: 'binary' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - name: 'Some binary blob', - blob: 'U29tZSBiaW5hcnkgYmxvYg==' - } -) -puts response ----- diff --git a/docs/examples/guide/22dd833336fa22c8a8f67bb754ffba9a.asciidoc b/docs/examples/guide/22dd833336fa22c8a8f67bb754ffba9a.asciidoc deleted file mode 100644 index fdce36bfd6..0000000000 --- a/docs/examples/guide/22dd833336fa22c8a8f67bb754ffba9a.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'azure-openai-embeddings', - body: { - knn: { - field: 'content_embedding', - query_vector_builder: { - text_embedding: { - model_id: 'azure_openai_embeddings', - model_text: 'Calculate fuel cost' - } - }, - k: 10, - num_candidates: 100 - }, - _source: [ - 'id', - 'content' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/22dde5fe7ac5d85d52115641a68b3c55.asciidoc b/docs/examples/guide/22dde5fe7ac5d85d52115641a68b3c55.asciidoc deleted file mode 100644 index 883e72427b..0000000000 --- a/docs/examples/guide/22dde5fe7ac5d85d52115641a68b3c55.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'lowercase', - { - type: 'stop', - stopwords: [ - 'a', - 'is', - 'this' - ] - } - ], - text: 'this is a test' - } -) -puts response ----- diff --git a/docs/examples/guide/22ef90a7fb057728d2115f0c6f551819.asciidoc b/docs/examples/guide/22ef90a7fb057728d2115f0c6f551819.asciidoc deleted file mode 100644 index 4368b2b760..0000000000 --- a/docs/examples/guide/22ef90a7fb057728d2115f0c6f551819.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - aggregations: { - price_ranges: { - range: { - field: 'price', - ranges: [ - { - to: 100 - }, - { - from: 100, - to: 200 - }, - { - from: 200 - } - ] - }, - aggregations: { - price_stats: { - stats: { - field: 'price' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/23074748d6c978176df5b04265e88938.asciidoc b/docs/examples/guide/23074748d6c978176df5b04265e88938.asciidoc deleted file mode 100644 index 537cb50a5b..0000000000 --- a/docs/examples/guide/23074748d6c978176df5b04265e88938.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_settings( - index: 'my-index-000001', - name: 'index.routing.allocation.include._tier_preference', - flat_settings: true -) -puts response ----- diff --git a/docs/examples/guide/2308c9948cbebd2092eec03b11281005.asciidoc b/docs/examples/guide/2308c9948cbebd2092eec03b11281005.asciidoc deleted file mode 100644 index e640cf2d1b..0000000000 --- a/docs/examples/guide/2308c9948cbebd2092eec03b11281005.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.create_repository( - repository: 'my_fs_backup', - body: { - type: 'fs', - settings: { - location: 'E:\\Mount\\Backups\\My_fs_backup_location' - } - } -) -puts response ----- diff --git a/docs/examples/guide/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc b/docs/examples/guide/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc deleted file mode 100644 index 937d675bcd..0000000000 --- a/docs/examples/guide/2310d84ebf113f2a3ed14cc53172ae4a.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index', - body: { - query: { - text_expansion: { - 'ml.tokens' => { - model_id: '.elser_model_2', - model_text: 'How is the weather in Jamaica?' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2342a56279106ea643026df657bf7f88.asciidoc b/docs/examples/guide/2342a56279106ea643026df657bf7f88.asciidoc deleted file mode 100644 index e268e25c7d..0000000000 --- a/docs/examples/guide/2342a56279106ea643026df657bf7f88.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index', - body: { - settings: { - index: { - similarity: { - my_similarity: { - type: 'DFR', - basic_model: 'g', - after_effect: 'l', - normalization: 'h2', - "normalization.h2.c": '3.0' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/236f50d89a07b83119af72e367e685da.asciidoc b/docs/examples/guide/236f50d89a07b83119af72e367e685da.asciidoc deleted file mode 100644 index b3d6bb3581..0000000000 --- a/docs/examples/guide/236f50d89a07b83119af72e367e685da.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_primary_shard_size: '50gb', - max_age: '30d', - min_primary_shard_size: '1gb' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/23aa7360acbc249d787947ae7f729114.asciidoc b/docs/examples/guide/23aa7360acbc249d787947ae7f729114.asciidoc deleted file mode 100644 index 581c8ec011..0000000000 --- a/docs/examples/guide/23aa7360acbc249d787947ae7f729114.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test_index', - body: { - settings: { - index: { - analysis: { - analyzer: { - synonym: { - tokenizer: 'standard', - filter: [ - 'my_stop', - 'synonym' - ] - } - }, - filter: { - my_stop: { - type: 'stop', - stopwords: [ - 'bar' - ] - }, - synonym: { - type: 'synonym', - lenient: true, - synonyms: [ - 'foo, bar => baz' - ] - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/23af230e824f48b9cd56a4cf973d788c.asciidoc b/docs/examples/guide/23af230e824f48b9cd56a4cf973d788c.asciidoc deleted file mode 100644 index 58424f15be..0000000000 --- a/docs/examples/guide/23af230e824f48b9cd56a4cf973d788c.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - 'index.search.slowlog.threshold.query.warn' => '10s', - 'index.search.slowlog.threshold.query.info' => '5s', - 'index.search.slowlog.threshold.query.debug' => '2s', - 'index.search.slowlog.threshold.query.trace' => '500ms', - 'index.search.slowlog.threshold.fetch.warn' => '1s', - 'index.search.slowlog.threshold.fetch.info' => '800ms', - 'index.search.slowlog.threshold.fetch.debug' => '500ms', - 'index.search.slowlog.threshold.fetch.trace' => '200ms' - } -) -puts response ----- diff --git a/docs/examples/guide/23c4ae62f7035f2796e0ac3c7c4c20a9.asciidoc b/docs/examples/guide/23c4ae62f7035f2796e0ac3c7c4c20a9.asciidoc deleted file mode 100644 index ab20805961..0000000000 --- a/docs/examples/guide/23c4ae62f7035f2796e0ac3c7c4c20a9.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - warm: { - actions: { - migrate: {}, - allocate: { - number_of_replicas: 1 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2408020186af569a76a30eccadaed0d5.asciidoc b/docs/examples/guide/2408020186af569a76a30eccadaed0d5.asciidoc deleted file mode 100644 index 4dd7ca025e..0000000000 --- a/docs/examples/guide/2408020186af569a76a30eccadaed0d5.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - processors: [ - { - script: { - description: "Extract 'tags' from 'env' field", - lang: 'painless', - source: "\n String[] envSplit = ctx['env'].splitOnToken(params['delimiter']);\n ArrayList tags = new ArrayList();\n tags.add(envSplit[params['position']].trim());\n ctx['tags'] = tags;\n ", - params: { - delimiter: '-', - position: 1 - } - } - } - ] - }, - docs: [ - { - _source: { - env: 'es01-prod' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/242a26ced0e5706e48dcda19a4003094.asciidoc b/docs/examples/guide/242a26ced0e5706e48dcda19a4003094.asciidoc deleted file mode 100644 index ac2e07bfb2..0000000000 --- a/docs/examples/guide/242a26ced0e5706e48dcda19a4003094.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - remote: { - host: 'http://otherhost:9200', - username: 'user', - password: 'pass' - }, - index: 'my-index-000001', - query: { - match: { - test: 'data' - } - } - }, - dest: { - index: 'my-new-index-000001' - } - } -) -puts response ----- diff --git a/docs/examples/guide/24ad3c234f69f55a3fbe2d488e70178a.asciidoc b/docs/examples/guide/24ad3c234f69f55a3fbe2d488e70178a.asciidoc deleted file mode 100644 index 938c15b190..0000000000 --- a/docs/examples/guide/24ad3c234f69f55a3fbe2d488e70178a.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.ml.evaluate_data_frame( - body: { - index: 'student_performance_mathematics_reg', - query: { - term: { - 'ml.is_training' => { - value: true - } - } - }, - evaluation: { - regression: { - actual_field: 'G3', - predicted_field: 'ml.G3_prediction', - metrics: { - r_squared: {}, - mse: {}, - msle: {}, - huber: {} - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/24aee6033bf77a68ced74e3fd9d34283.asciidoc b/docs/examples/guide/24aee6033bf77a68ced74e3fd9d34283.asciidoc deleted file mode 100644 index fb9bb372d1..0000000000 --- a/docs/examples/guide/24aee6033bf77a68ced74e3fd9d34283.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_template( - name: 'template_1,template_2' -) -puts response ----- diff --git a/docs/examples/guide/24bdccb07bba7e7e6ff45d3d4cd83064.asciidoc b/docs/examples/guide/24bdccb07bba7e7e6ff45d3d4cd83064.asciidoc deleted file mode 100644 index 60735cf9cb..0000000000 --- a/docs/examples/guide/24bdccb07bba7e7e6ff45d3d4cd83064.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'my-data-stream', - pipeline: 'my-pipeline' -) -puts response - -response = client.reindex( - body: { - source: { - index: 'my-data-stream' - }, - dest: { - index: 'my-new-data-stream', - op_type: 'create', - pipeline: 'my-pipeline' - } - } -) -puts response ----- diff --git a/docs/examples/guide/24d66b2ebdf662d8b03e17214e65c825.asciidoc b/docs/examples/guide/24d66b2ebdf662d8b03e17214e65c825.asciidoc deleted file mode 100644 index e9e2c858ea..0000000000 --- a/docs/examples/guide/24d66b2ebdf662d8b03e17214e65c825.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'xpack.profiling.templates.enabled' => false - } - } -) -puts response ----- diff --git a/docs/examples/guide/24f4dfdf9922d5aa79151675b7767742.asciidoc b/docs/examples/guide/24f4dfdf9922d5aa79151675b7767742.asciidoc deleted file mode 100644 index ab0acb0adc..0000000000 --- a/docs/examples/guide/24f4dfdf9922d5aa79151675b7767742.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - scroll: '1m', - body: { - size: 100, - query: { - match: { - message: 'foo' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/253140cb1e270e5ee23e15dbaeaaa0ea.asciidoc b/docs/examples/guide/253140cb1e270e5ee23e15dbaeaaa0ea.asciidoc deleted file mode 100644 index 0b6f9e5f40..0000000000 --- a/docs/examples/guide/253140cb1e270e5ee23e15dbaeaaa0ea.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.data_streams_stats( - human: true -) -puts response ----- diff --git a/docs/examples/guide/25576b6773322f0929d4c635a940dba0.asciidoc b/docs/examples/guide/25576b6773322f0929d4c635a940dba0.asciidoc deleted file mode 100644 index 4f7217efce..0000000000 --- a/docs/examples/guide/25576b6773322f0929d4c635a940dba0.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - fields: [ - 'title', - 'content' - ], - query: 'this OR that OR thus', - type: 'cross_fields', - minimum_should_match: 2 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/256eba7a77c8890a43afeda8ce8a3225.asciidoc b/docs/examples/guide/256eba7a77c8890a43afeda8ce8a3225.asciidoc deleted file mode 100644 index f32c912892..0000000000 --- a/docs/examples/guide/256eba7a77c8890a43afeda8ce8a3225.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-text-embeddings-pipeline', - body: { - description: 'Text embedding pipeline', - processors: [ - { - inference: { - model_id: 'sentence-transformers__msmarco-minilm-l-12-v3', - target_field: 'my_embeddings', - field_map: { - my_text_field: 'text_field' - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/25737fd456fd317cc4cc2db76b6cf28e.asciidoc b/docs/examples/guide/25737fd456fd317cc4cc2db76b6cf28e.asciidoc deleted file mode 100644 index 61d7fac0f3..0000000000 --- a/docs/examples/guide/25737fd456fd317cc4cc2db76b6cf28e.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test-000001', - body: { - aliases: { - "test-alias": { - is_write_index: true - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2592e5361f7ea3b3dd1840f63d760dae.asciidoc b/docs/examples/guide/2592e5361f7ea3b3dd1840f63d760dae.asciidoc deleted file mode 100644 index b7e07f9abd..0000000000 --- a/docs/examples/guide/2592e5361f7ea3b3dd1840f63d760dae.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - more_like_this: { - fields: [ - 'name.first', - 'name.last' - ], - like: [ - { - _index: 'marvel', - doc: { - name: { - first: 'Ben', - last: 'Grimm' - }, - _doc: "You got no idea what I'd... what I'd give to be invisible." - } - }, - { - _index: 'marvel', - _id: '2' - } - ], - min_term_freq: 1, - max_query_terms: 12 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/25981b7b3d55b87e1484586d57b695b1.asciidoc b/docs/examples/guide/25981b7b3d55b87e1484586d57b695b1.asciidoc deleted file mode 100644 index bb761bab2d..0000000000 --- a/docs/examples/guide/25981b7b3d55b87e1484586d57b695b1.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'products', - id: 1567, - body: { - product: 'r2d2', - details: 'A resourceful astromech droid' - } -) -puts response ----- diff --git a/docs/examples/guide/25a0dad6547d432f5a3d394528f1c138.asciidoc b/docs/examples/guide/25a0dad6547d432f5a3d394528f1c138.asciidoc deleted file mode 100644 index 5dce42d77c..0000000000 --- a/docs/examples/guide/25a0dad6547d432f5a3d394528f1c138.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'my-index-000001', - id: 2, - routing: 'user1', - stored_fields: 'tags,counter' -) -puts response ----- diff --git a/docs/examples/guide/25ae1a698f867ba5139605cc952436c0.asciidoc b/docs/examples/guide/25ae1a698f867ba5139605cc952436c0.asciidoc deleted file mode 100644 index 3e7bc5ab99..0000000000 --- a/docs/examples/guide/25ae1a698f867ba5139605cc952436c0.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'place', - pretty: true, - body: { - suggest: { - place_suggestion: { - prefix: 'tim', - completion: { - field: 'suggest', - size: 10, - contexts: { - place_type: [ - { - context: 'cafe' - }, - { - context: 'restaurants', - boost: 2 - } - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/25c0e66a433a0cd596e0641b752ff6d7.asciidoc b/docs/examples/guide/25c0e66a433a0cd596e0641b752ff6d7.asciidoc deleted file mode 100644 index 0ad408e35a..0000000000 --- a/docs/examples/guide/25c0e66a433a0cd596e0641b752ff6d7.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.shards( - h: 'index,shard,prirep,state,unassigned.reason' -) -puts response ----- diff --git a/docs/examples/guide/25d40d3049e57e2bb70c2c5b88bd7b87.asciidoc b/docs/examples/guide/25d40d3049e57e2bb70c2c5b88bd7b87.asciidoc deleted file mode 100644 index 0f12f3a9aa..0000000000 --- a/docs/examples/guide/25d40d3049e57e2bb70c2c5b88bd7b87.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: '_all', - body: { - settings: { - 'index.unassigned.node_left.delayed_timeout' => '0' - } - } -) -puts response ----- diff --git a/docs/examples/guide/25ecfe423548ac1d7cc86de4a18c48c6.asciidoc b/docs/examples/guide/25ecfe423548ac1d7cc86de4a18c48c6.asciidoc deleted file mode 100644 index 729de86f10..0000000000 --- a/docs/examples/guide/25ecfe423548ac1d7cc86de4a18c48c6.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'standard', - char_filter: [ - 'my_char_filter' - ] - } - }, - char_filter: { - my_char_filter: { - type: 'pattern_replace', - pattern: '(\\d+)-(?=\\d)', - replacement: '$1_' - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_analyzer', - text: 'My credit card is 123-456-789' - } -) -puts response ----- diff --git a/docs/examples/guide/25ed47fcb890fcf8d8518ae067362d18.asciidoc b/docs/examples/guide/25ed47fcb890fcf8d8518ae067362d18.asciidoc deleted file mode 100644 index cd7f6fa3cc..0000000000 --- a/docs/examples/guide/25ed47fcb890fcf8d8518ae067362d18.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'reviews', - body: { - size: 0, - aggregations: { - review_average: { - avg: { - field: 'rating' - } - }, - review_variability: { - median_absolute_deviation: { - field: 'rating' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/26168987f799cdc4ee4151c85ba7afc5.asciidoc b/docs/examples/guide/26168987f799cdc4ee4151c85ba7afc5.asciidoc deleted file mode 100644 index d7ec1ed341..0000000000 --- a/docs/examples/guide/26168987f799cdc4ee4151c85ba7afc5.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - filter_path: 'aggregations', - body: { - aggregations: { - "my-num-field-stats": { - stats: { - field: 'my-num-field' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/262a778d754add491fbc9c721ac25bf0.asciidoc b/docs/examples/guide/262a778d754add491fbc9c721ac25bf0.asciidoc deleted file mode 100644 index f0478a7b3c..0000000000 --- a/docs/examples/guide/262a778d754add491fbc9c721ac25bf0.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - analyzer: 'whitespace', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/26419320085434680142567d5fda9c35.asciidoc b/docs/examples/guide/26419320085434680142567d5fda9c35.asciidoc deleted file mode 100644 index 499459b3e3..0000000000 --- a/docs/examples/guide/26419320085434680142567d5fda9c35.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'network-traffic', - body: { - size: 0, - aggregations: { - "ipv4-subnets": { - ip_prefix: { - field: 'ipv4', - prefix_length: 24, - min_doc_count: 3 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2643b8c512cb3f3449259cdf498c6ab5.asciidoc b/docs/examples/guide/2643b8c512cb3f3449259cdf498c6ab5.asciidoc deleted file mode 100644 index a60f1b5fea..0000000000 --- a/docs/examples/guide/2643b8c512cb3f3449259cdf498c6ab5.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - date: { - date_histogram: { - field: 'timestamp', - calendar_interval: '1d' - } - } - }, - { - product: { - terms: { - field: 'product' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2646710ece0c4c843aebeacd370d0396.asciidoc b/docs/examples/guide/2646710ece0c4c843aebeacd370d0396.asciidoc deleted file mode 100644 index d8d4796cc6..0000000000 --- a/docs/examples/guide/2646710ece0c4c843aebeacd370d0396.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-byte-quantized-index', - body: { - mappings: { - properties: { - my_vector: { - type: 'dense_vector', - dims: 3, - index: true, - index_options: { - type: 'int8_hnsw' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/26abfc49c238c2b5d259983ac38dbcee.asciidoc b/docs/examples/guide/26abfc49c238c2b5d259983ac38dbcee.asciidoc deleted file mode 100644 index a26962f700..0000000000 --- a/docs/examples/guide/26abfc49c238c2b5d259983ac38dbcee.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'index', - body: { - query: { - simple_query_string: { - fields: [ - 'body' - ], - quote_field_suffix: '.exact', - query: '"ski"' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/26bd8c027c82cd72c007c10fa66dc97f.asciidoc b/docs/examples/guide/26bd8c027c82cd72c007c10fa66dc97f.asciidoc deleted file mode 100644 index 105d3df487..0000000000 --- a/docs/examples/guide/26bd8c027c82cd72c007c10fa66dc97f.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.restore( - repository: 'my_repository', - snapshot: 'my_snapshot_2099.05.06', - body: { - indices: '*', - include_global_state: true - } -) -puts response ----- diff --git a/docs/examples/guide/26d3ab748a855eb383e992eb1ff79662.asciidoc b/docs/examples/guide/26d3ab748a855eb383e992eb1ff79662.asciidoc deleted file mode 100644 index 6ee491e62a..0000000000 --- a/docs/examples/guide/26d3ab748a855eb383e992eb1ff79662.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.eql.delete( - id: 'FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=' -) -puts response ----- diff --git a/docs/examples/guide/26f237f9bf14e8b972cc33ff6aebefa2.asciidoc b/docs/examples/guide/26f237f9bf14e8b972cc33ff6aebefa2.asciidoc deleted file mode 100644 index 4ef5ee61ae..0000000000 --- a/docs/examples/guide/26f237f9bf14e8b972cc33ff6aebefa2.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'stemmer' - ], - text: 'fox running and jumping' - } -) -puts response ----- diff --git a/docs/examples/guide/270549e6b062228312c4e7a54a2c2209.asciidoc b/docs/examples/guide/270549e6b062228312c4e7a54a2c2209.asciidoc deleted file mode 100644 index 7b7b48955d..0000000000 --- a/docs/examples/guide/270549e6b062228312c4e7a54a2c2209.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.nodes.hot_threads -puts response ----- diff --git a/docs/examples/guide/2716453454dbf9c6dde2ea6850a62214.asciidoc b/docs/examples/guide/2716453454dbf9c6dde2ea6850a62214.asciidoc deleted file mode 100644 index 83db230794..0000000000 --- a/docs/examples/guide/2716453454dbf9c6dde2ea6850a62214.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'trips', - body: { - mappings: { - properties: { - distance: { - type: 'long' - }, - route_length_miles: { - type: 'alias', - path: 'distance' - }, - transit_mode: { - type: 'keyword' - } - } - } - } -) -puts response - -response = client.search( - body: { - query: { - range: { - route_length_miles: { - gte: 39 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/271fe0b452b62189505ce4a1d6f8bde1.asciidoc b/docs/examples/guide/271fe0b452b62189505ce4a1d6f8bde1.asciidoc deleted file mode 100644 index 56585a8151..0000000000 --- a/docs/examples/guide/271fe0b452b62189505ce4a1d6f8bde1.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_outlier: { - percentiles: { - field: 'load_time', - keyed: false - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2720e613d520ce352b62e990c2d283f7.asciidoc b/docs/examples/guide/2720e613d520ce352b62e990c2d283f7.asciidoc deleted file mode 100644 index 2288963ea3..0000000000 --- a/docs/examples/guide/2720e613d520ce352b62e990c2d283f7.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ilm.remove_policy( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/2731a8577ad734a732d784c5dcb1225d.asciidoc b/docs/examples/guide/2731a8577ad734a732d784c5dcb1225d.asciidoc deleted file mode 100644 index 1d24401ccf..0000000000 --- a/docs/examples/guide/2731a8577ad734a732d784c5dcb1225d.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'norwegian_example', - body: { - settings: { - analysis: { - filter: { - norwegian_stop: { - type: 'stop', - stopwords: '_norwegian_' - }, - norwegian_keywords: { - type: 'keyword_marker', - keywords: [ - 'eksempel' - ] - }, - norwegian_stemmer: { - type: 'stemmer', - language: 'norwegian' - } - }, - analyzer: { - rebuilt_norwegian: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'norwegian_stop', - 'norwegian_keywords', - 'norwegian_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/27384266370152add76471dd0332a2f1.asciidoc b/docs/examples/guide/27384266370152add76471dd0332a2f1.asciidoc deleted file mode 100644 index ea187447aa..0000000000 --- a/docs/examples/guide/27384266370152add76471dd0332a2f1.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.transform.update_transform( - transform_id: 'simple-kibana-ecomm-pivot', - body: { - source: { - index: 'kibana_sample_data_ecommerce', - query: { - term: { - 'geoip.continent_name' => { - value: 'Asia' - } - } - } - }, - description: 'Maximum priced ecommerce data by customer_id in Asia', - dest: { - index: 'kibana_sample_data_ecommerce_transform_v2', - pipeline: 'add_timestamp_pipeline' - }, - frequency: '15m', - sync: { - time: { - field: 'order_date', - delay: '120s' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2740b69e7246ac6d1ad249382f21d534.asciidoc b/docs/examples/guide/2740b69e7246ac6d1ad249382f21d534.asciidoc deleted file mode 100644 index 128cb9a7ca..0000000000 --- a/docs/examples/guide/2740b69e7246ac6d1ad249382f21d534.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index', - body: { - mappings: { - properties: { - "my-agg-metric-field": { - type: 'aggregate_metric_double', - metrics: [ - 'min', - 'max', - 'sum', - 'value_count' - ], - default_metric: 'max' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/274feaaa727e0ddf61b3c0f093182839.asciidoc b/docs/examples/guide/274feaaa727e0ddf61b3c0f093182839.asciidoc deleted file mode 100644 index 7108c73033..0000000000 --- a/docs/examples/guide/274feaaa727e0ddf61b3c0f093182839.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - runtime_mappings: { - duration: { - type: 'long', - script: { - source: "\n emit(doc['measures.end'].value - doc['measures.start'].value);\n " - } - } - }, - aggregations: { - duration_stats: { - stats: { - field: 'duration' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/275ec358d5d1e4b9ff06cb4ae7e47650.asciidoc b/docs/examples/guide/275ec358d5d1e4b9ff06cb4ae7e47650.asciidoc deleted file mode 100644 index a8fac88fe6..0000000000 --- a/docs/examples/guide/275ec358d5d1e4b9ff06cb4ae7e47650.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_index_template( - name: 'temp*' -) -puts response ----- diff --git a/docs/examples/guide/27600d6a78623b69689d4218618e4278.asciidoc b/docs/examples/guide/27600d6a78623b69689d4218618e4278.asciidoc deleted file mode 100644 index ee04bf34da..0000000000 --- a/docs/examples/guide/27600d6a78623b69689d4218618e4278.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_index', - body: { - query: { - term: { - my_counter: 18_446_744_073_709_552_000 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/278d5bfa1a01f91d5c84679ef1bca390.asciidoc b/docs/examples/guide/278d5bfa1a01f91d5c84679ef1bca390.asciidoc deleted file mode 100644 index 6ce42dcb8d..0000000000 --- a/docs/examples/guide/278d5bfa1a01f91d5c84679ef1bca390.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'products', - id: 1567 -) -puts response ----- diff --git a/docs/examples/guide/2793fa53b7d269852aa74f6bf57e34dc.asciidoc b/docs/examples/guide/2793fa53b7d269852aa74f6bf57e34dc.asciidoc deleted file mode 100644 index 0d5aea1e5b..0000000000 --- a/docs/examples/guide/2793fa53b7d269852aa74f6bf57e34dc.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'ngram_custom_example', - body: { - settings: { - index: { - max_ngram_diff: 2 - }, - analysis: { - analyzer: { - default: { - tokenizer: 'whitespace', - filter: [ - '3_5_grams' - ] - } - }, - filter: { - "3_5_grams": { - type: 'ngram', - min_gram: 3, - max_gram: 5 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/279e2b29261971999923fdc658bba8ff.asciidoc b/docs/examples/guide/279e2b29261971999923fdc658bba8ff.asciidoc deleted file mode 100644 index 81c0dc4380..0000000000 --- a/docs/examples/guide/279e2b29261971999923fdc658bba8ff.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - _source: { - includes: [ - 'obj1.*', - 'obj2.*' - ], - excludes: [ - '*.description' - ] - }, - query: { - term: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/27f9f604e7a48799fa30529cbc0ff619.asciidoc b/docs/examples/guide/27f9f604e7a48799fa30529cbc0ff619.asciidoc deleted file mode 100644 index 2e198240b5..0000000000 --- a/docs/examples/guide/27f9f604e7a48799fa30529cbc0ff619.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'delimited_payload_example', - body: { - settings: { - analysis: { - analyzer: { - whitespace_plus_delimited: { - tokenizer: 'whitespace', - filter: [ - 'plus_delimited' - ] - } - }, - filter: { - plus_delimited: { - type: 'delimited_payload', - delimiter: '+', - encoding: 'int' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2826510e4aeb1c0d8dc43d317ed7624a.asciidoc b/docs/examples/guide/2826510e4aeb1c0d8dc43d317ed7624a.asciidoc deleted file mode 100644 index b40d8a3797..0000000000 --- a/docs/examples/guide/2826510e4aeb1c0d8dc43d317ed7624a.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - bool: { - type: 'boolean' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - bool: [ - true, - false, - true, - false - ] - } -) -puts response ----- diff --git a/docs/examples/guide/28415647fced5f983b42f8435332a625.asciidoc b/docs/examples/guide/28415647fced5f983b42f8435332a625.asciidoc deleted file mode 100644 index fb8d1707f8..0000000000 --- a/docs/examples/guide/28415647fced5f983b42f8435332a625.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - processors: [ - { - lowercase: { - field: 'my-keyword-field' - } - } - ] - }, - docs: [ - { - _source: { - "my-keyword-field": 'FOO' - } - }, - { - _source: { - "my-keyword-field": 'BAR' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/28543836b62b5622a402e6f7731d68f0.asciidoc b/docs/examples/guide/28543836b62b5622a402e6f7731d68f0.asciidoc deleted file mode 100644 index f2c56f82c0..0000000000 --- a/docs/examples/guide/28543836b62b5622a402e6f7731d68f0.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.indices.downsample( - index: '.ds-my-data-stream-2023.07.26-000001', - target_index: '.ds-my-data-stream-2023.07.26-000001-downsample', - body: { - fixed_interval: '1h' - } -) -puts response ----- diff --git a/docs/examples/guide/2856a5ceff1861aa9a78099f1c517fe7.asciidoc b/docs/examples/guide/2856a5ceff1861aa9a78099f1c517fe7.asciidoc deleted file mode 100644 index d5c6f035de..0000000000 --- a/docs/examples/guide/2856a5ceff1861aa9a78099f1c517fe7.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_mapping( - index: '.watches' -) -puts response ----- diff --git a/docs/examples/guide/2879d7bf4167194b102bf97117327164.asciidoc b/docs/examples/guide/2879d7bf4167194b102bf97117327164.asciidoc deleted file mode 100644 index d8d340d75f..0000000000 --- a/docs/examples/guide/2879d7bf4167194b102bf97117327164.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'keyword', - char_filter: [ - 'html_strip' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2891aa10ee9d474780adf94d5607f2db.asciidoc b/docs/examples/guide/2891aa10ee9d474780adf94d5607f2db.asciidoc deleted file mode 100644 index 78af65febf..0000000000 --- a/docs/examples/guide/2891aa10ee9d474780adf94d5607f2db.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'index_long,index_double', - body: { - sort: [ - { - field: { - numeric_type: 'double' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/2897ccc2a3bf3d0cd89328ee4413fae5.asciidoc b/docs/examples/guide/2897ccc2a3bf3d0cd89328ee4413fae5.asciidoc deleted file mode 100644 index f1c4802004..0000000000 --- a/docs/examples/guide/2897ccc2a3bf3d0cd89328ee4413fae5.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.async_search.get( - id: 'FklQYndoTDJ2VEFlMEVBTzFJMGhJVFEaLVlKYndBWWZSMUdicUc4WVlEaFl4ZzoxNTU=' -) -puts response ----- diff --git a/docs/examples/guide/28ac880057135e46b3b00c7f3976538c.asciidoc b/docs/examples/guide/28ac880057135e46b3b00c7f3976538c.asciidoc deleted file mode 100644 index 4f5df5b79b..0000000000 --- a/docs/examples/guide/28ac880057135e46b3b00c7f3976538c.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'test', - body: { - 'index.routing.allocation.include._ip' => '192.168.2.*' - } -) -puts response ----- diff --git a/docs/examples/guide/2932e6f71e247cf52e11d2f38f114ddf.asciidoc b/docs/examples/guide/2932e6f71e247cf52e11d2f38f114ddf.asciidoc deleted file mode 100644 index 5511b9bcb1..0000000000 --- a/docs/examples/guide/2932e6f71e247cf52e11d2f38f114ddf.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - slices: 5, - refresh: true, - body: { - source: { - index: 'my-index-000001' - }, - dest: { - index: 'my-new-index-000001' - } - } -) -puts response ----- diff --git a/docs/examples/guide/295b3aaeb223612afdd991744dc9c873.asciidoc b/docs/examples/guide/295b3aaeb223612afdd991744dc9c873.asciidoc deleted file mode 100644 index 2727e89305..0000000000 --- a/docs/examples/guide/295b3aaeb223612afdd991744dc9c873.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my_test_scores_pipeline', - body: { - description: 'Calculates the total test score', - processors: [ - { - script: { - source: 'ctx.total_score = (ctx.math_score + ctx.verbal_score)' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/29783e5de3a5f3c985cbf11094cf49a0.asciidoc b/docs/examples/guide/29783e5de3a5f3c985cbf11094cf49a0.asciidoc deleted file mode 100644 index 7bb88d6192..0000000000 --- a/docs/examples/guide/29783e5de3a5f3c985cbf11094cf49a0.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'keyword_repeat', - 'stemmer', - 'remove_duplicates' - ], - text: 'fox running and jumping', - explain: true, - attributes: 'keyword' - } -) -puts response ----- diff --git a/docs/examples/guide/29824032d7d64512d17458fdd687b1f6.asciidoc b/docs/examples/guide/29824032d7d64512d17458fdd687b1f6.asciidoc deleted file mode 100644 index 9eda88252d..0000000000 --- a/docs/examples/guide/29824032d7d64512d17458fdd687b1f6.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.tasks.list( - parent_task_id: 'oTUltX4IQMOUUVeiohTt8A:123' -) -puts response ----- diff --git a/docs/examples/guide/2988a112b590ae2320940887125fe36a.asciidoc b/docs/examples/guide/2988a112b590ae2320940887125fe36a.asciidoc deleted file mode 100644 index b7074ac60d..0000000000 --- a/docs/examples/guide/2988a112b590ae2320940887125fe36a.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.esql.query( - body: { - query: 'FROM mv | EVAL b=MV_MIN(b) | EVAL b + 2, a + b | LIMIT 4', - version: '2024.04.01' - } -) -puts response ----- diff --git a/docs/examples/guide/29953082744b7a36e437b392a6391c81.asciidoc b/docs/examples/guide/29953082744b7a36e437b392a6391c81.asciidoc deleted file mode 100644 index d8b66a0146..0000000000 --- a/docs/examples/guide/29953082744b7a36e437b392a6391c81.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - id: 'my-search-template', - params: { - from: 20, - size: 10 - } - } -) -puts response ----- diff --git a/docs/examples/guide/299900fb08da80fe455cf3f1bb7d62ee.asciidoc b/docs/examples/guide/299900fb08da80fe455cf3f1bb7d62ee.asciidoc deleted file mode 100644 index 8d3d414ef0..0000000000 --- a/docs/examples/guide/299900fb08da80fe455cf3f1bb7d62ee.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_field_mapping( - index: 'publications', - fields: 'title' -) -puts response ----- diff --git a/docs/examples/guide/29d9df958de292cec50daaf31844b573.asciidoc b/docs/examples/guide/29d9df958de292cec50daaf31844b573.asciidoc deleted file mode 100644 index 3e3d9809fd..0000000000 --- a/docs/examples/guide/29d9df958de292cec50daaf31844b573.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_field_mapping( - index: 'my-index-000001,my-index-000002', - fields: 'message' -) -puts response ----- diff --git a/docs/examples/guide/2a247e36a86a373bcbf478ac9a588f44.asciidoc b/docs/examples/guide/2a247e36a86a373bcbf478ac9a588f44.asciidoc deleted file mode 100644 index 05d9d3e308..0000000000 --- a/docs/examples/guide/2a247e36a86a373bcbf478ac9a588f44.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - routing: 'kimchy', - body: { - "@timestamp": '2099-11-15T13:12:00', - message: 'GET /search HTTP/1.1 200 1070000', - user: { - id: 'kimchy' - } - } -) -puts response ----- diff --git a/docs/examples/guide/2a287d213a812b98d8353c563a058cfc.asciidoc b/docs/examples/guide/2a287d213a812b98d8353c563a058cfc.asciidoc deleted file mode 100644 index a787231939..0000000000 --- a/docs/examples/guide/2a287d213a812b98d8353c563a058cfc.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_boxplot: { - boxplot: { - field: 'load_time' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2a44d254e6e32abe97515fd2eb34705d.asciidoc b/docs/examples/guide/2a44d254e6e32abe97515fd2eb34705d.asciidoc deleted file mode 100644 index ce200fb776..0000000000 --- a/docs/examples/guide/2a44d254e6e32abe97515fd2eb34705d.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.sql.get_async( - id: 'FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=', - wait_for_completion_timeout: '2s', - format: 'json' -) -puts response ----- diff --git a/docs/examples/guide/2a47d11c6e19c9da5104e738359ea8a8.asciidoc b/docs/examples/guide/2a47d11c6e19c9da5104e738359ea8a8.asciidoc deleted file mode 100644 index 9481eff5e8..0000000000 --- a/docs/examples/guide/2a47d11c6e19c9da5104e738359ea8a8.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ilm.start -puts response ----- diff --git a/docs/examples/guide/2a70194ebd2f01a3229a5092513676b3.asciidoc b/docs/examples/guide/2a70194ebd2f01a3229a5092513676b3.asciidoc deleted file mode 100644 index 467ff16633..0000000000 --- a/docs/examples/guide/2a70194ebd2f01a3229a5092513676b3.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'keyword', - char_filter: [ - 'my_custom_html_strip_char_filter' - ] - } - }, - char_filter: { - my_custom_html_strip_char_filter: { - type: 'html_strip', - escaped_tags: [ - 'b' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2a71e2d7f7179dd76183d30789046808.asciidoc b/docs/examples/guide/2a71e2d7f7179dd76183d30789046808.asciidoc deleted file mode 100644 index 0abe51fb52..0000000000 --- a/docs/examples/guide/2a71e2d7f7179dd76183d30789046808.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'mv', - refresh: true, - body: [ - { - index: {} - }, - { - a: 1, - b: [ - 2, - 1 - ] - }, - { - index: {} - }, - { - a: 2, - b: 3 - } - ] -) -puts response ----- diff --git a/docs/examples/guide/2a91e1fb8ad93a188fa9d77ec01bc431.asciidoc b/docs/examples/guide/2a91e1fb8ad93a188fa9d77ec01bc431.asciidoc deleted file mode 100644 index a7b1406e87..0000000000 --- a/docs/examples/guide/2a91e1fb8ad93a188fa9d77ec01bc431.asciidoc +++ /dev/null @@ -1,54 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - mappings: { - properties: { - comments: { - type: 'nested' - } - } - } - } -) -puts response - -response = client.index( - index: 'test', - id: 1, - refresh: true, - body: { - title: 'Test title', - comments: [ - { - author: 'kimchy', - number: 1 - }, - { - author: 'nik9000', - number: 2 - } - ] - } -) -puts response - -response = client.search( - index: 'test', - body: { - query: { - nested: { - path: 'comments', - query: { - match: { - 'comments.number' => 2 - } - }, - inner_hits: {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2a9747bcfaf1f9491ebd410b3fcb6798.asciidoc b/docs/examples/guide/2a9747bcfaf1f9491ebd410b3fcb6798.asciidoc deleted file mode 100644 index 36609528be..0000000000 --- a/docs/examples/guide/2a9747bcfaf1f9491ebd410b3fcb6798.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - query: '(new york city) OR (big apple)', - default_field: 'content' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2aa548b692fc2fe7b6f0d90eb8b2ae29.asciidoc b/docs/examples/guide/2aa548b692fc2fe7b6f0d90eb8b2ae29.asciidoc deleted file mode 100644 index bd0307dc70..0000000000 --- a/docs/examples/guide/2aa548b692fc2fe7b6f0d90eb8b2ae29.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.watcher.delete_watch( - id: 'my_watch' -) -puts response ----- diff --git a/docs/examples/guide/2abfe0d3f5593d23d2dfa608b1e2532a.asciidoc b/docs/examples/guide/2abfe0d3f5593d23d2dfa608b1e2532a.asciidoc deleted file mode 100644 index 4a192666d3..0000000000 --- a/docs/examples/guide/2abfe0d3f5593d23d2dfa608b1e2532a.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - user_name: { - terms: { - field: 'user_name' - } - } - }, - { - date: { - date_histogram: { - field: 'timestamp', - calendar_interval: '1d', - order: 'desc' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2ac7efe3919ee0c7971f5d502f482662.asciidoc b/docs/examples/guide/2ac7efe3919ee0c7971f5d502f482662.asciidoc deleted file mode 100644 index f5c76fcb11..0000000000 --- a/docs/examples/guide/2ac7efe3919ee0c7971f5d502f482662.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - script_score: { - query: { - bool: { - filter: { - term: { - status: 'published' - } - } - } - }, - script: { - source: "1 / (1 + l1norm(params.queryVector, 'my_dense_vector'))", - params: { - "queryVector": [ - 4, - 3.4, - -0.2 - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2ad35a13262f98574a48f88b4a838512.asciidoc b/docs/examples/guide/2ad35a13262f98574a48f88b4a838512.asciidoc deleted file mode 100644 index d298a4aa9f..0000000000 --- a/docs/examples/guide/2ad35a13262f98574a48f88b4a838512.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'current_year', - id: 1 -) -puts response ----- diff --git a/docs/examples/guide/2ade05fb3fb06a67df25e097dfadb045.asciidoc b/docs/examples/guide/2ade05fb3fb06a67df25e097dfadb045.asciidoc deleted file mode 100644 index a1c3edde02..0000000000 --- a/docs/examples/guide/2ade05fb3fb06a67df25e097dfadb045.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'my-index-000001', - id: 'my_id' -) -puts response ----- diff --git a/docs/examples/guide/2afc1231679898bd864d06679d9e951b.asciidoc b/docs/examples/guide/2afc1231679898bd864d06679d9e951b.asciidoc deleted file mode 100644 index 152ff9b7f4..0000000000 --- a/docs/examples/guide/2afc1231679898bd864d06679d9e951b.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - histo: { - date_histogram: { - field: 'date', - calendar_interval: 'day' - }, - aggregations: { - categories: { - terms: { - field: 'category' - } - }, - min_bucket_selector: { - bucket_selector: { - buckets_path: { - count: 'categories._bucket_count' - }, - script: { - source: 'params.count != 0' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2afdf0d83724953aa2875b5fb37d60cc.asciidoc b/docs/examples/guide/2afdf0d83724953aa2875b5fb37d60cc.asciidoc deleted file mode 100644 index f146aeb501..0000000000 --- a/docs/examples/guide/2afdf0d83724953aa2875b5fb37d60cc.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.esql.async_query_get( - id: 'FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=', - wait_for_completion_timeout: '30s' -) -puts response ----- diff --git a/docs/examples/guide/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc b/docs/examples/guide/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc deleted file mode 100644 index d9089312cf..0000000000 --- a/docs/examples/guide/2b1c560f00d9bcf5caaf56c03f6b5962.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.sync_job_list( - job_type: 'full,incremental' -) -puts response ----- diff --git a/docs/examples/guide/2b59b014349d45bf894aca90b2b1fbe0.asciidoc b/docs/examples/guide/2b59b014349d45bf894aca90b2b1fbe0.asciidoc deleted file mode 100644 index 24577d2d71..0000000000 --- a/docs/examples/guide/2b59b014349d45bf894aca90b2b1fbe0.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete_data_stream( - name: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/2b5a5f8689f04d095fa86570130ee4d4.asciidoc b/docs/examples/guide/2b5a5f8689f04d095fa86570130ee4d4.asciidoc deleted file mode 100644 index 412e6c0bbb..0000000000 --- a/docs/examples/guide/2b5a5f8689f04d095fa86570130ee4d4.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - my_id: { - type: 'keyword' - }, - my_join_field: { - type: 'join', - relations: { - question: 'answer' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2b7687e3d7c06824950e00618c297864.asciidoc b/docs/examples/guide/2b7687e3d7c06824950e00618c297864.asciidoc deleted file mode 100644 index ae52726b49..0000000000 --- a/docs/examples/guide/2b7687e3d7c06824950e00618c297864.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.resolve_cluster( - name: 'my-index*,clust*:my-index*' -) -puts response ----- diff --git a/docs/examples/guide/2ba15c066d55a9b26d49b09471151cb4.asciidoc b/docs/examples/guide/2ba15c066d55a9b26d49b09471151cb4.asciidoc deleted file mode 100644 index 0f28d20663..0000000000 --- a/docs/examples/guide/2ba15c066d55a9b26d49b09471151cb4.asciidoc +++ /dev/null @@ -1,83 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'emails', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - accounts: [ - 'hillary', - 'sidney' - ] - }, - { - index: { - _id: 2 - } - }, - { - accounts: [ - 'hillary', - 'donald' - ] - }, - { - index: { - _id: 3 - } - }, - { - accounts: [ - 'vladimir', - 'donald' - ] - } - ] -) -puts response - -response = client.search( - index: 'emails', - body: { - size: 0, - aggregations: { - interactions: { - adjacency_matrix: { - filters: { - "grpA": { - terms: { - accounts: [ - 'hillary', - 'sidney' - ] - } - }, - "grpB": { - terms: { - accounts: [ - 'donald', - 'mitt' - ] - } - }, - "grpC": { - terms: { - accounts: [ - 'vladimir', - 'nigel' - ] - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2bacdcb278705d944f367cfb984cf4d2.asciidoc b/docs/examples/guide/2bacdcb278705d944f367cfb984cf4d2.asciidoc deleted file mode 100644 index 82b5aad3a6..0000000000 --- a/docs/examples/guide/2bacdcb278705d944f367cfb984cf4d2.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - sort: [ - { - post_date: { - order: 'asc', - format: 'strict_date_optional_time_nanos' - } - }, - 'user', - { - name: 'desc' - }, - { - age: 'desc' - }, - '_score' - ], - query: { - term: { - user: 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc b/docs/examples/guide/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc deleted file mode 100644 index 54e4427c94..0000000000 --- a/docs/examples/guide/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.indices.close.enable' => false, - 'indices.recovery.max_bytes_per_sec' => '50mb' - }, - transient: { - "*": nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/2bc1d52efec2076dc9fc2a3a2d90e8ab.asciidoc b/docs/examples/guide/2bc1d52efec2076dc9fc2a3a2d90e8ab.asciidoc deleted file mode 100644 index 854c43d58b..0000000000 --- a/docs/examples/guide/2bc1d52efec2076dc9fc2a3a2d90e8ab.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_boxplot: { - boxplot: { - field: 'load_time', - execution_hint: 'high_accuracy' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2bc57cd3f32b59b0b44ca63b19cdfcc0.asciidoc b/docs/examples/guide/2bc57cd3f32b59b0b44ca63b19cdfcc0.asciidoc deleted file mode 100644 index 7facd7ed3b..0000000000 --- a/docs/examples/guide/2bc57cd3f32b59b0b44ca63b19cdfcc0.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'image-index', - body: { - knn: { - field: 'image-vector', - query_vector: [ - 1, - 5, - -20 - ], - k: 5, - num_candidates: 50, - similarity: 36, - filter: { - term: { - "file-type": 'png' - } - } - }, - fields: [ - 'title' - ], - _source: false - } -) -puts response ----- diff --git a/docs/examples/guide/2c090fe7ec7b66b3f5c178d71c46323b.asciidoc b/docs/examples/guide/2c090fe7ec7b66b3f5c178d71c46323b.asciidoc deleted file mode 100644 index 085975065b..0000000000 --- a/docs/examples/guide/2c090fe7ec7b66b3f5c178d71c46323b.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.stats( - metric: 'fielddata', - human: true, - fields: 'my_join_field' -) -puts response - -response = client.nodes.stats( - metric: 'indices', - index_metric: 'fielddata', - human: true, - fields: 'my_join_field' -) -puts response ----- diff --git a/docs/examples/guide/2c0dbdcf400cde5d36f7c9e6c1101011.asciidoc b/docs/examples/guide/2c0dbdcf400cde5d36f7c9e6c1101011.asciidoc deleted file mode 100644 index fe962c01e5..0000000000 --- a/docs/examples/guide/2c0dbdcf400cde5d36f7c9e6c1101011.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.health( - v: true, - ts: false -) -puts response ----- diff --git a/docs/examples/guide/2c1e16e9ac24cfea979af2a69900d3c2.asciidoc b/docs/examples/guide/2c1e16e9ac24cfea979af2a69900d3c2.asciidoc deleted file mode 100644 index 574ab9bc24..0000000000 --- a/docs/examples/guide/2c1e16e9ac24cfea979af2a69900d3c2.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.synonyms.put_synonym_rule( - set_id: 'my-synonyms-set', - rule_id: 'test-1', - body: { - synonyms: 'hello, hi, howdy' - } -) -puts response ----- diff --git a/docs/examples/guide/2c27a8eb6528126f37a843d434cd88b6.asciidoc b/docs/examples/guide/2c27a8eb6528126f37a843d434cd88b6.asciidoc deleted file mode 100644 index 8530a26de8..0000000000 --- a/docs/examples/guide/2c27a8eb6528126f37a843d434cd88b6.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - { - type: 'synonym_graph', - synonyms: [ - 'dns, domain name system' - ] - } - ], - text: 'domain name system is fragile' - } -) -puts response ----- diff --git a/docs/examples/guide/2c3207c0c985d253b2ecccc14e69e25a.asciidoc b/docs/examples/guide/2c3207c0c985d253b2ecccc14e69e25a.asciidoc deleted file mode 100644 index fa59cec745..0000000000 --- a/docs/examples/guide/2c3207c0c985d253b2ecccc14e69e25a.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.add_block( - index: '.ds-my-data-stream-2023.07.26-000001', - block: 'write' -) -puts response ----- diff --git a/docs/examples/guide/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc b/docs/examples/guide/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc deleted file mode 100644 index 18e0ef3c06..0000000000 --- a/docs/examples/guide/2c3dff44904d3d73ff47f1afe89c7f86.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'my-index-000001', - body: { - query: { - term: { - 'user.id' => 'kimchy' - } - }, - max_docs: 1 - } -) -puts response ----- diff --git a/docs/examples/guide/2c602b4ee8f22cda2cdf19bad31da0af.asciidoc b/docs/examples/guide/2c602b4ee8f22cda2cdf19bad31da0af.asciidoc deleted file mode 100644 index 11d79a581c..0000000000 --- a/docs/examples/guide/2c602b4ee8f22cda2cdf19bad31da0af.asciidoc +++ /dev/null @@ -1,75 +0,0 @@ -[source, ruby] ----- -response = client.nodes.info -puts response - -response = client.nodes.info( - node_id: '_all' -) -puts response - -response = client.nodes.info( - node_id: '_local' -) -puts response - -response = client.nodes.info( - node_id: '_master' -) -puts response - -response = client.nodes.info( - node_id: 'node_name_goes_here' -) -puts response - -response = client.nodes.info( - node_id: 'node_name_goes_*' -) -puts response - -response = client.nodes.info( - node_id: '10.0.0.3,10.0.0.4' -) -puts response - -response = client.nodes.info( - node_id: '10.0.0.*' -) -puts response - -response = client.nodes.info( - node_id: '_all,master:false' -) -puts response - -response = client.nodes.info( - node_id: 'data:true,ingest:true' -) -puts response - -response = client.nodes.info( - node_id: 'coordinating_only:true' -) -puts response - -response = client.nodes.info( - node_id: 'master:true,voting_only:false' -) -puts response - -response = client.nodes.info( - node_id: 'rack:2' -) -puts response - -response = client.nodes.info( - node_id: 'ra*:2' -) -puts response - -response = client.nodes.info( - node_id: 'ra*:2*' -) -puts response ----- diff --git a/docs/examples/guide/2ceded6ee764adf1aaaac0a1cd25ed5f.asciidoc b/docs/examples/guide/2ceded6ee764adf1aaaac0a1cd25ed5f.asciidoc deleted file mode 100644 index fb5e14fdc4..0000000000 --- a/docs/examples/guide/2ceded6ee764adf1aaaac0a1cd25ed5f.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.indices( - v: true, - health: 'red', - h: 'index,status,health' -) -puts response ----- diff --git a/docs/examples/guide/2d01a9e5550b525496757f1bd7f0e706.asciidoc b/docs/examples/guide/2d01a9e5550b525496757f1bd7f0e706.asciidoc deleted file mode 100644 index a9eef598ea..0000000000 --- a/docs/examples/guide/2d01a9e5550b525496757f1bd7f0e706.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - timeout: '5m', - body: { - "@timestamp": '2099-11-15T13:12:00', - message: 'GET /search HTTP/1.1 200 1070000', - user: { - id: 'kimchy' - } - } -) -puts response ----- diff --git a/docs/examples/guide/2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc b/docs/examples/guide/2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc deleted file mode 100644 index 61989704bd..0000000000 --- a/docs/examples/guide/2d150ff3b6b991b58fea6aa5cc669aa3.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match_phrase: { - message: { - query: 'this is a test', - analyzer: 'my_analyzer' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2d2f5ec97aa34ff7822a6a1ed08ef335.asciidoc b/docs/examples/guide/2d2f5ec97aa34ff7822a6a1ed08ef335.asciidoc deleted file mode 100644 index 0f2d4cc6e8..0000000000 --- a/docs/examples/guide/2d2f5ec97aa34ff7822a6a1ed08ef335.asciidoc +++ /dev/null @@ -1,57 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'test', - refresh: true, - body: [ - { - index: { - _index: 'test1' - } - }, - { - s: 1, - m: 3.1415 - }, - { - index: { - _index: 'test1' - } - }, - { - s: 2, - m: 1 - }, - { - index: { - _index: 'test2' - } - }, - { - s: 3.1, - m: 2.71828 - } - ] -) -puts response - -response = client.search( - index: 'test*', - filter_path: 'aggregations', - body: { - aggregations: { - tm: { - top_metrics: { - metrics: { - field: 'm' - }, - sort: { - s: 'asc' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2d37b02cbf6d30ae11bf239a54ec9423.asciidoc b/docs/examples/guide/2d37b02cbf6d30ae11bf239a54ec9423.asciidoc deleted file mode 100644 index 173c46ddb4..0000000000 --- a/docs/examples/guide/2d37b02cbf6d30ae11bf239a54ec9423.asciidoc +++ /dev/null @@ -1,82 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-index-000001', - refresh: true, - body: [ - { - index: {} - }, - { - "@timestamp": 1_516_729_294_000, - model_number: 'QVKC92Q', - measures: { - voltage: '5.2', - start: '300', - end: '8675309' - } - }, - { - index: {} - }, - { - "@timestamp": 1_516_642_894_000, - model_number: 'QVKC92Q', - measures: { - voltage: '5.8', - start: '300', - end: '8675309' - } - }, - { - index: {} - }, - { - "@timestamp": 1_516_556_494_000, - model_number: 'QVKC92Q', - measures: { - voltage: '5.1', - start: '300', - end: '8675309' - } - }, - { - index: {} - }, - { - "@timestamp": 1_516_470_094_000, - model_number: 'QVKC92Q', - measures: { - voltage: '5.6', - start: '300', - end: '8675309' - } - }, - { - index: {} - }, - { - "@timestamp": 1_516_383_694_000, - model_number: 'HG537PU', - measures: { - voltage: '4.2', - start: '400', - end: '8625309' - } - }, - { - index: {} - }, - { - "@timestamp": 1_516_297_294_000, - model_number: 'HG537PU', - measures: { - voltage: '4.0', - start: '400', - end: '8625309' - } - } - ] -) -puts response ----- diff --git a/docs/examples/guide/2d60e3bdfee7afbddee149f40450b8b5.asciidoc b/docs/examples/guide/2d60e3bdfee7afbddee149f40450b8b5.asciidoc deleted file mode 100644 index c32e3827c4..0000000000 --- a/docs/examples/guide/2d60e3bdfee7afbddee149f40450b8b5.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.validate_query( - index: 'my-index-000001', - body: { - query: { - query_string: { - query: '@timestamp:foo', - lenient: false - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2d8fcb03de417a71e7888bbdd948a692.asciidoc b/docs/examples/guide/2d8fcb03de417a71e7888bbdd948a692.asciidoc deleted file mode 100644 index 84f137960f..0000000000 --- a/docs/examples/guide/2d8fcb03de417a71e7888bbdd948a692.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.transforms( - v: true, - format: 'json' -) -puts response ----- diff --git a/docs/examples/guide/2d9b30acd6b5683f39d53494c0dd779c.asciidoc b/docs/examples/guide/2d9b30acd6b5683f39d53494c0dd779c.asciidoc deleted file mode 100644 index 3a1d0c0b7c..0000000000 --- a/docs/examples/guide/2d9b30acd6b5683f39d53494c0dd779c.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.health -puts response - -response = client.cat.recovery -puts response ----- diff --git a/docs/examples/guide/2dad2b0c8ba503228f4b11cecca0b348.asciidoc b/docs/examples/guide/2dad2b0c8ba503228f4b11cecca0b348.asciidoc deleted file mode 100644 index dcb81b2791..0000000000 --- a/docs/examples/guide/2dad2b0c8ba503228f4b11cecca0b348.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_data_lifecycle( - name: 'dsl-data-stream', - body: { - data_retention: '7d' - } -) -puts response ----- diff --git a/docs/examples/guide/2de6885bacb8769b8f22dce253c96b0c.asciidoc b/docs/examples/guide/2de6885bacb8769b8f22dce253c96b0c.asciidoc deleted file mode 100644 index 8516084b33..0000000000 --- a/docs/examples/guide/2de6885bacb8769b8f22dce253c96b0c.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - intervals: { - my_text: { - match: { - query: 'hot porridge', - filter: { - script: { - source: 'interval.start > 10 && interval.end < 20 && interval.gaps == 0' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2e364833626c9790c042c8f006fcc999.asciidoc b/docs/examples/guide/2e364833626c9790c042c8f006fcc999.asciidoc deleted file mode 100644 index 0e87b0ab60..0000000000 --- a/docs/examples/guide/2e364833626c9790c042c8f006fcc999.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'multiplexer_example', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'standard', - filter: [ - 'my_multiplexer' - ] - } - }, - filter: { - my_multiplexer: { - type: 'multiplexer', - filters: [ - 'lowercase', - 'lowercase, porter_stem' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2e36fe22051a47e052e349854d9948b9.asciidoc b/docs/examples/guide/2e36fe22051a47e052e349854d9948b9.asciidoc deleted file mode 100644 index 6fa57fb349..0000000000 --- a/docs/examples/guide/2e36fe22051a47e052e349854d9948b9.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.explain( - index: 'my-index-000001', - id: 0, - q: 'message:search' -) -puts response ----- diff --git a/docs/examples/guide/2e3d1b293da93f2a9ecfc26786ec28d6.asciidoc b/docs/examples/guide/2e3d1b293da93f2a9ecfc26786ec28d6.asciidoc deleted file mode 100644 index b86c696ba7..0000000000 --- a/docs/examples/guide/2e3d1b293da93f2a9ecfc26786ec28d6.asciidoc +++ /dev/null @@ -1,155 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'my-data-stream-template', - body: { - index_patterns: [ - 'my-data-stream*' - ], - data_stream: {}, - template: { - settings: { - index: { - mode: 'time_series', - routing_path: [ - 'kubernetes.namespace', - 'kubernetes.host', - 'kubernetes.node', - 'kubernetes.pod' - ], - number_of_replicas: 0, - number_of_shards: 2 - } - }, - mappings: { - properties: { - "@timestamp": { - type: 'date' - }, - kubernetes: { - properties: { - container: { - properties: { - cpu: { - properties: { - usage: { - properties: { - core: { - properties: { - ns: { - type: 'long' - } - } - }, - limit: { - properties: { - pct: { - type: 'float' - } - } - }, - nanocores: { - type: 'long', - time_series_metric: 'gauge' - }, - node: { - properties: { - pct: { - type: 'float' - } - } - } - } - } - } - }, - memory: { - properties: { - available: { - properties: { - bytes: { - type: 'long', - time_series_metric: 'gauge' - } - } - }, - majorpagefaults: { - type: 'long' - }, - pagefaults: { - type: 'long', - time_series_metric: 'gauge' - }, - rss: { - properties: { - bytes: { - type: 'long', - time_series_metric: 'gauge' - } - } - }, - usage: { - properties: { - bytes: { - type: 'long', - time_series_metric: 'gauge' - }, - limit: { - properties: { - pct: { - type: 'float' - } - } - }, - node: { - properties: { - pct: { - type: 'float' - } - } - } - } - }, - workingset: { - properties: { - bytes: { - type: 'long', - time_series_metric: 'gauge' - } - } - } - } - }, - name: { - type: 'keyword' - }, - start_time: { - type: 'date' - } - } - }, - host: { - type: 'keyword', - time_series_dimension: true - }, - namespace: { - type: 'keyword', - time_series_dimension: true - }, - node: { - type: 'keyword', - time_series_dimension: true - }, - pod: { - type: 'keyword', - time_series_dimension: true - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2e796e5ca59768d4426abbf9a049db3e.asciidoc b/docs/examples/guide/2e796e5ca59768d4426abbf9a049db3e.asciidoc deleted file mode 100644 index c83ca430f7..0000000000 --- a/docs/examples/guide/2e796e5ca59768d4426abbf9a049db3e.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.split( - index: 'my_source_index', - target: 'my_target_index', - body: { - settings: { - 'index.number_of_shards' => 2 - } - } -) -puts response ----- diff --git a/docs/examples/guide/2e7f4b9be999422a12abb680572b13c8.asciidoc b/docs/examples/guide/2e7f4b9be999422a12abb680572b13c8.asciidoc deleted file mode 100644 index 5152e12f9b..0000000000 --- a/docs/examples/guide/2e7f4b9be999422a12abb680572b13c8.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ilm.get_lifecycle( - policy: 'my_policy' -) -puts response ----- diff --git a/docs/examples/guide/2e847378ba26aa64d40186b6e3e6a1da.asciidoc b/docs/examples/guide/2e847378ba26aa64d40186b6e3e6a1da.asciidoc deleted file mode 100644 index 069b3a65f5..0000000000 --- a/docs/examples/guide/2e847378ba26aa64d40186b6e3e6a1da.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_index', - body: { - query: { - script_score: { - query: { - match_all: {} - }, - script: { - source: "field('my_counter').asBigInteger(BigInteger.ZERO).floatValue()" - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2e93eaaebf75fa4a2451e8a76ffa9f20.asciidoc b/docs/examples/guide/2e93eaaebf75fa4a2451e8a76ffa9f20.asciidoc deleted file mode 100644 index 5588366d70..0000000000 --- a/docs/examples/guide/2e93eaaebf75fa4a2451e8a76ffa9f20.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'my-data-stream-template', - body: { - index_patterns: [ - 'my-data-stream*' - ], - data_stream: {}, - priority: 500, - template: { - mappings: { - properties: { - message: { - type: 'text' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2ebcdd00ccbf26b4c8e6d9c80dfb3d55.asciidoc b/docs/examples/guide/2ebcdd00ccbf26b4c8e6d9c80dfb3d55.asciidoc deleted file mode 100644 index f6b8216d96..0000000000 --- a/docs/examples/guide/2ebcdd00ccbf26b4c8e6d9c80dfb3d55.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'linestring', - coordinates: [ - [ - -377.03653, - 389.897676 - ], - [ - -377.009051, - 389.889939 - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/2ec8d757188349a4630e120ba2c98c3b.asciidoc b/docs/examples/guide/2ec8d757188349a4630e120ba2c98c3b.asciidoc deleted file mode 100644 index ba00e7a40b..0000000000 --- a/docs/examples/guide/2ec8d757188349a4630e120ba2c98c3b.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - { - type: 'pattern_replace', - pattern: '(dog)', - replacement: 'watch$1' - } - ], - text: 'foxes jump lazy dogs' - } -) -puts response ----- diff --git a/docs/examples/guide/2ee002e60bd7a38d466e5f0eb0c38946.asciidoc b/docs/examples/guide/2ee002e60bd7a38d466e5f0eb0c38946.asciidoc deleted file mode 100644 index adde8207c0..0000000000 --- a/docs/examples/guide/2ee002e60bd7a38d466e5f0eb0c38946.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.update_aliases( - body: { - actions: [ - { - add: { - index: 'my-index-2099.05.06-000001', - alias: 'my-alias', - routing: '1' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/2ee239df3243c98418f7d9a5c7be4cfd.asciidoc b/docs/examples/guide/2ee239df3243c98418f7d9a5c7be4cfd.asciidoc deleted file mode 100644 index 08a2d1e6c0..0000000000 --- a/docs/examples/guide/2ee239df3243c98418f7d9a5c7be4cfd.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_custom_index_analyzer: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'my_custom_word_delimiter_graph_filter', - 'flatten_graph' - ] - } - }, - filter: { - my_custom_word_delimiter_graph_filter: { - type: 'word_delimiter_graph', - catenate_all: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2eebaeb3983a04ef7a9201c1f4d40dc1.asciidoc b/docs/examples/guide/2eebaeb3983a04ef7a9201c1f4d40dc1.asciidoc deleted file mode 100644 index 9164bc00cd..0000000000 --- a/docs/examples/guide/2eebaeb3983a04ef7a9201c1f4d40dc1.asciidoc +++ /dev/null @@ -1,59 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-index', - refresh: true, - body: [ - { - index: {} - }, - { - timestamp: '2020-04-30T14:30:17-05:00', - message: '40.135.0.0 - - [30/Apr/2020:14:30:17 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:30:53-05:00', - message: '232.0.0.0 - - [30/Apr/2020:14:30:53 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:12-05:00', - message: '26.1.0.0 - - [30/Apr/2020:14:31:12 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:19-05:00', - message: '247.37.0.0 - - [30/Apr/2020:14:31:19 -0500] "GET /french/splash_inet.html HTTP/1.0" 200 3781' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:22-05:00', - message: '247.37.0.0 - - [30/Apr/2020:14:31:22 -0500] "GET /images/hm_nbg.jpg HTTP/1.0" 304 0' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:27-05:00', - message: '252.0.0.0 - - [30/Apr/2020:14:31:27 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:28-05:00', - message: 'not a valid apache log' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/2f07b81fd47ec3b074242a760f0c4e9e.asciidoc b/docs/examples/guide/2f07b81fd47ec3b074242a760f0c4e9e.asciidoc deleted file mode 100644 index bc4166eea6..0000000000 --- a/docs/examples/guide/2f07b81fd47ec3b074242a760f0c4e9e.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - 'index.indexing.slowlog.include.user' => true - } -) -puts response ----- diff --git a/docs/examples/guide/2f0b2181c434a879a23b4643bdd92575.asciidoc b/docs/examples/guide/2f0b2181c434a879a23b4643bdd92575.asciidoc deleted file mode 100644 index e8579fe1f1..0000000000 --- a/docs/examples/guide/2f0b2181c434a879a23b4643bdd92575.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_settings( - index: 'my-index-000001,my-index-000002' -) -puts response - -response = client.indices.get_settings( - index: '_all' -) -puts response - -response = client.indices.get_settings( - index: 'log_2099_*' -) -puts response ----- diff --git a/docs/examples/guide/2f195eeb93229e40c4d8f1a6ab4a358c.asciidoc b/docs/examples/guide/2f195eeb93229e40c4d8f1a6ab4a358c.asciidoc deleted file mode 100644 index daeb94762d..0000000000 --- a/docs/examples/guide/2f195eeb93229e40c4d8f1a6ab4a358c.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - processors: [ - { - fingerprint: { - fields: [ - 'user' - ] - } - } - ] - }, - docs: [ - { - _source: { - user: { - last_name: 'Smith', - first_name: 'John', - date_of_birth: '1980-01-15', - is_active: true - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/2f2fd35905feef0b561c05d70c7064c1.asciidoc b/docs/examples/guide/2f2fd35905feef0b561c05d70c7064c1.asciidoc deleted file mode 100644 index adee29f2d5..0000000000 --- a/docs/examples/guide/2f2fd35905feef0b561c05d70c7064c1.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_mapping( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/2f4a55dfeba8851b306ef9c1b216ef54.asciidoc b/docs/examples/guide/2f4a55dfeba8851b306ef9c1b216ef54.asciidoc deleted file mode 100644 index a0314d9bd2..0000000000 --- a/docs/examples/guide/2f4a55dfeba8851b306ef9c1b216ef54.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'bug_reports', - body: { - query: { - term: { - 'labels.release' => 'v1.3.0' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2f4e28c81db47547ad39d0926babab12.asciidoc b/docs/examples/guide/2f4e28c81db47547ad39d0926babab12.asciidoc deleted file mode 100644 index 659fcd3553..0000000000 --- a/docs/examples/guide/2f4e28c81db47547ad39d0926babab12.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'estonian_example', - body: { - settings: { - analysis: { - filter: { - estonian_stop: { - type: 'stop', - stopwords: '_estonian_' - }, - estonian_keywords: { - type: 'keyword_marker', - keywords: [ - 'näide' - ] - }, - estonian_stemmer: { - type: 'stemmer', - language: 'estonian' - } - }, - analyzer: { - rebuilt_estonian: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'estonian_stop', - 'estonian_keywords', - 'estonian_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2f67db5e4d6c958258c3d70fb2d0b1c8.asciidoc b/docs/examples/guide/2f67db5e4d6c958258c3d70fb2d0b1c8.asciidoc deleted file mode 100644 index 1e58a61ba4..0000000000 --- a/docs/examples/guide/2f67db5e4d6c958258c3d70fb2d0b1c8.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - 'index.merge.policy.max_merge_at_once_explicit' => nil - } -) -puts response ----- diff --git a/docs/examples/guide/2f9574fee2ebecd6f7d917ee99b26bcc.asciidoc b/docs/examples/guide/2f9574fee2ebecd6f7d917ee99b26bcc.asciidoc deleted file mode 100644 index 391025550d..0000000000 --- a/docs/examples/guide/2f9574fee2ebecd6f7d917ee99b26bcc.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - status_code: { - type: 'keyword' - }, - session_id: { - type: 'keyword', - doc_values: false - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2f98924c3d593ea2b60edb9cef5bee22.asciidoc b/docs/examples/guide/2f98924c3d593ea2b60edb9cef5bee22.asciidoc deleted file mode 100644 index 407f26c63b..0000000000 --- a/docs/examples/guide/2f98924c3d593ea2b60edb9cef5bee22.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.forcemerge( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/2fa45d74ba9933188c4728f8a9e5372c.asciidoc b/docs/examples/guide/2fa45d74ba9933188c4728f8a9e5372c.asciidoc deleted file mode 100644 index d45f7c2a0b..0000000000 --- a/docs/examples/guide/2fa45d74ba9933188c4728f8a9e5372c.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'action.auto_create_index' => 'my-index-000001,index10,-index1*,+ind*' - } - } -) -puts response - -response = client.cluster.put_settings( - body: { - persistent: { - 'action.auto_create_index' => 'false' - } - } -) -puts response - -response = client.cluster.put_settings( - body: { - persistent: { - 'action.auto_create_index' => 'true' - } - } -) -puts response ----- diff --git a/docs/examples/guide/2fa7ded8515b32f26c54394ea598f573.asciidoc b/docs/examples/guide/2fa7ded8515b32f26c54394ea598f573.asciidoc deleted file mode 100644 index eb458437b8..0000000000 --- a/docs/examples/guide/2fa7ded8515b32f26c54394ea598f573.asciidoc +++ /dev/null @@ -1,44 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'template_1', - body: { - index_patterns: [ - 'te*', - 'bar*' - ], - template: { - settings: { - number_of_shards: 1 - }, - mappings: { - _source: { - enabled: true - }, - properties: { - host_name: { - type: 'keyword' - }, - created_at: { - type: 'date', - format: 'EEE MMM dd HH:mm:ss Z yyyy' - } - } - }, - aliases: { - mydata: {} - } - }, - priority: 500, - composed_of: [ - 'component_template1', - 'runtime_component_template' - ], - version: 3, - _meta: { - description: 'my custom' - } - } -) -puts response ----- diff --git a/docs/examples/guide/2fc2c790a85be29bbcba50bdde1493f4.asciidoc b/docs/examples/guide/2fc2c790a85be29bbcba50bdde1493f4.asciidoc deleted file mode 100644 index e60fca0054..0000000000 --- a/docs/examples/guide/2fc2c790a85be29bbcba50bdde1493f4.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get( - repository: 'my_repository', - snapshot: 'my_snapshot_2099.05.06' -) -puts response ----- diff --git a/docs/examples/guide/2fc80a2ad1ca8b2dcb13ed1895b8e861.asciidoc b/docs/examples/guide/2fc80a2ad1ca8b2dcb13ed1895b8e861.asciidoc deleted file mode 100644 index c665782bdd..0000000000 --- a/docs/examples/guide/2fc80a2ad1ca8b2dcb13ed1895b8e861.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - transient: { - "indices.recovery.*": nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/2fd0b3c132b46aa34cc9d92dd2d4bc85.asciidoc b/docs/examples/guide/2fd0b3c132b46aa34cc9d92dd2d4bc85.asciidoc deleted file mode 100644 index 2c4579b667..0000000000 --- a/docs/examples/guide/2fd0b3c132b46aa34cc9d92dd2d4bc85.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - { - type: 'common_grams', - common_words: [ - 'is', - 'the' - ] - } - ], - text: 'the quick fox is brown' - } -) -puts response ----- diff --git a/docs/examples/guide/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc b/docs/examples/guide/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc deleted file mode 100644 index b0d1ed7e89..0000000000 --- a/docs/examples/guide/2fe28d9a91b3081a9ec4601af8fb7b1c.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - mappings: { - dynamic: false, - properties: { - text: { - type: 'text' - } - } - } - } -) -puts response - -response = client.index( - index: 'test', - refresh: true, - body: { - text: 'words words', - flag: 'bar' - } -) -puts response - -response = client.index( - index: 'test', - refresh: true, - body: { - text: 'words words', - flag: 'foo' - } -) -puts response - -response = client.indices.put_mapping( - index: 'test', - body: { - properties: { - text: { - type: 'text' - }, - flag: { - type: 'text', - analyzer: 'keyword' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2fea3e324939cc7e9c396964aeee7111.asciidoc b/docs/examples/guide/2fea3e324939cc7e9c396964aeee7111.asciidoc deleted file mode 100644 index e51b140e2c..0000000000 --- a/docs/examples/guide/2fea3e324939cc7e9c396964aeee7111.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - message: { - query: 'to be or not to be', - operator: 'and', - zero_terms_query: 'all' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/2fee452baff92b409cbfc8d71eb5fc0e.asciidoc b/docs/examples/guide/2fee452baff92b409cbfc8d71eb5fc0e.asciidoc deleted file mode 100644 index 1899f41938..0000000000 --- a/docs/examples/guide/2fee452baff92b409cbfc8d71eb5fc0e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodes( - v: true -) -puts response ----- diff --git a/docs/examples/guide/2ffa953b29ed0156c9e610daf66b8e48.asciidoc b/docs/examples/guide/2ffa953b29ed0156c9e610daf66b8e48.asciidoc deleted file mode 100644 index 4b806e3fa6..0000000000 --- a/docs/examples/guide/2ffa953b29ed0156c9e610daf66b8e48.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ilm.explain_lifecycle( - index: 'timeseries-*' -) -puts response ----- diff --git a/docs/examples/guide/305c4cfb2ad4b58b4c319ffbf32336cc.asciidoc b/docs/examples/guide/305c4cfb2ad4b58b4c319ffbf32336cc.asciidoc deleted file mode 100644 index 0de951d13d..0000000000 --- a/docs/examples/guide/305c4cfb2ad4b58b4c319ffbf32336cc.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - script_fields: { - my_doubled_field: { - script: { - lang: 'painless', - source: "doc['my_field'].value * params.get('multiplier');", - params: { - multiplier: 2 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/30bd3c0785f3df4795684754adeb5ecb.asciidoc b/docs/examples/guide/30bd3c0785f3df4795684754adeb5ecb.asciidoc deleted file mode 100644 index f2910d999d..0000000000 --- a/docs/examples/guide/30bd3c0785f3df4795684754adeb5ecb.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: { - query: { - match: { - message: '{{query_string}}' - } - }, - from: '{{from}}', - size: '{{size}}' - }, - params: { - query_string: 'hello world', - from: 20, - size: 10 - } - } -) -puts response ----- diff --git a/docs/examples/guide/30db2702dd0071c72a090b8311d0db09.asciidoc b/docs/examples/guide/30db2702dd0071c72a090b8311d0db09.asciidoc deleted file mode 100644 index f7958c9309..0000000000 --- a/docs/examples/guide/30db2702dd0071c72a090b8311d0db09.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - query: { - match: { - body: 'elections' - } - }, - aggregations: { - top_sites: { - terms: { - field: 'domain', - order: { - top_hit: 'desc' - } - }, - aggregations: { - top_tags_hits: { - top_hits: {} - }, - top_hit: { - max: { - script: { - source: '_score' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/30f3e3b9df46afd12e68bc71f18483b4.asciidoc b/docs/examples/guide/30f3e3b9df46afd12e68bc71f18483b4.asciidoc deleted file mode 100644 index 2959e4a545..0000000000 --- a/docs/examples/guide/30f3e3b9df46afd12e68bc71f18483b4.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001' -) -puts response - -response = client.indices.create( - index: 'my-index-000002' -) -puts response - -response = client.indices.put_mapping( - index: 'my-index-000001,my-index-000002', - body: { - properties: { - user: { - properties: { - name: { - type: 'keyword' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/316cd43feb3b86396483903af1a048b1.asciidoc b/docs/examples/guide/316cd43feb3b86396483903af1a048b1.asciidoc deleted file mode 100644 index 034a9b2304..0000000000 --- a/docs/examples/guide/316cd43feb3b86396483903af1a048b1.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - sale_date: { - date_histogram: { - field: 'date', - calendar_interval: 'year', - missing: '2000/01/01' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3182f26c61fbe5cf89400804533d5ed2.asciidoc b/docs/examples/guide/3182f26c61fbe5cf89400804533d5ed2.asciidoc deleted file mode 100644 index d2440332ca..0000000000 --- a/docs/examples/guide/3182f26c61fbe5cf89400804533d5ed2.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - id: 'my-search-template', - params: { - query_string: 'My string', - text_fields: [ - { - user_name: 'John' - }, - { - user_name: 'kimchy' - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/318e209cc4d6f306e65cb2f5598a50b1.asciidoc b/docs/examples/guide/318e209cc4d6f306e65cb2f5598a50b1.asciidoc deleted file mode 100644 index 5a85aab9fa..0000000000 --- a/docs/examples/guide/318e209cc4d6f306e65cb2f5598a50b1.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'LineString', - coordinates: [ - [ - -77.03653, - 38.897676 - ], - [ - -77.009051, - 38.889939 - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/31a79a57b242713edec6795599ba0d5d.asciidoc b/docs/examples/guide/31a79a57b242713edec6795599ba0d5d.asciidoc deleted file mode 100644 index 1c42569f31..0000000000 --- a/docs/examples/guide/31a79a57b242713edec6795599ba0d5d.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index', - body: { - mappings: { - properties: { - my_tokens: { - type: 'sparse_vector' - }, - my_text_field: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/31ac1b68dc7c26a1d37350be47ae9381.asciidoc b/docs/examples/guide/31ac1b68dc7c26a1d37350be47ae9381.asciidoc deleted file mode 100644 index a0ccb4e9d1..0000000000 --- a/docs/examples/guide/31ac1b68dc7c26a1d37350be47ae9381.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'music', - body: { - mappings: { - properties: { - suggest: { - type: 'completion' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/31aed390c30bd4f42a5c56253695e53f.asciidoc b/docs/examples/guide/31aed390c30bd4f42a5c56253695e53f.asciidoc deleted file mode 100644 index 9821ce0706..0000000000 --- a/docs/examples/guide/31aed390c30bd4f42a5c56253695e53f.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'whitespace_example', - body: { - settings: { - analysis: { - analyzer: { - rebuilt_whitespace: { - tokenizer: 'whitespace', - filter: [] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/31bc93e429ad0de11dd2dd231e8f2c5e.asciidoc b/docs/examples/guide/31bc93e429ad0de11dd2dd231e8f2c5e.asciidoc deleted file mode 100644 index 77ac84bcf6..0000000000 --- a/docs/examples/guide/31bc93e429ad0de11dd2dd231e8f2c5e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.unfreeze( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/320645d771e952af2a67bb7445c3688d.asciidoc b/docs/examples/guide/320645d771e952af2a67bb7445c3688d.asciidoc deleted file mode 100644 index df6975f5fa..0000000000 --- a/docs/examples/guide/320645d771e952af2a67bb7445c3688d.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'sorani_example', - body: { - settings: { - analysis: { - filter: { - sorani_stop: { - type: 'stop', - stopwords: '_sorani_' - }, - sorani_keywords: { - type: 'keyword_marker', - keywords: [ - 'mînak' - ] - }, - sorani_stemmer: { - type: 'stemmer', - language: 'sorani' - } - }, - analyzer: { - rebuilt_sorani: { - tokenizer: 'standard', - filter: [ - 'sorani_normalization', - 'lowercase', - 'decimal_digit', - 'sorani_stop', - 'sorani_keywords', - 'sorani_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/32123981430e5a8b34fe14314fc48429.asciidoc b/docs/examples/guide/32123981430e5a8b34fe14314fc48429.asciidoc deleted file mode 100644 index c280bf0245..0000000000 --- a/docs/examples/guide/32123981430e5a8b34fe14314fc48429.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001,my-index-000002', - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3218f8ccd59c8c90349816e0428e8fb8.asciidoc b/docs/examples/guide/3218f8ccd59c8c90349816e0428e8fb8.asciidoc deleted file mode 100644 index 480be4739e..0000000000 --- a/docs/examples/guide/3218f8ccd59c8c90349816e0428e8fb8.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.clear_cache( - fielddata: true -) -puts response ----- diff --git a/docs/examples/guide/3250a8d2d2a9619035040e55a03620b9.asciidoc b/docs/examples/guide/3250a8d2d2a9619035040e55a03620b9.asciidoc deleted file mode 100644 index 583e5b2632..0000000000 --- a/docs/examples/guide/3250a8d2d2a9619035040e55a03620b9.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - "logger.org.elasticsearch.http.HttpTracer": 'TRACE', - "logger.org.elasticsearch.http.HttpBodyTracer": 'TRACE' - } - } -) -puts response ----- diff --git a/docs/examples/guide/327466380bcd55361973b4a96c6dccb2.asciidoc b/docs/examples/guide/327466380bcd55361973b4a96c6dccb2.asciidoc deleted file mode 100644 index 69807507ce..0000000000 --- a/docs/examples/guide/327466380bcd55361973b4a96c6dccb2.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'spanish_example', - body: { - settings: { - analysis: { - filter: { - spanish_stop: { - type: 'stop', - stopwords: '_spanish_' - }, - spanish_keywords: { - type: 'keyword_marker', - keywords: [ - 'ejemplo' - ] - }, - spanish_stemmer: { - type: 'stemmer', - language: 'light_spanish' - } - }, - analyzer: { - rebuilt_spanish: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'spanish_stop', - 'spanish_keywords', - 'spanish_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/32a7acdfb7046966b28f394476c99126.asciidoc b/docs/examples/guide/32a7acdfb7046966b28f394476c99126.asciidoc deleted file mode 100644 index a6c171f4ad..0000000000 --- a/docs/examples/guide/32a7acdfb7046966b28f394476c99126.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'POINT (-377.03653 389.897676)' - } -) -puts response ----- diff --git a/docs/examples/guide/32af23a4b0fea6c81c4688ce5fe4ac35.asciidoc b/docs/examples/guide/32af23a4b0fea6c81c4688ce5fe4ac35.asciidoc deleted file mode 100644 index c6150e562c..0000000000 --- a/docs/examples/guide/32af23a4b0fea6c81c4688ce5fe4ac35.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_ranks: { - percentile_ranks: { - field: 'load_time', - values: [ - 500, - 600 - ], - hdr: { - number_of_significant_value_digits: 3 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/32cd57666bc80b8cf793d06fa1086669.asciidoc b/docs/examples/guide/32cd57666bc80b8cf793d06fa1086669.asciidoc deleted file mode 100644 index d31d41c085..0000000000 --- a/docs/examples/guide/32cd57666bc80b8cf793d06fa1086669.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'tsv', - body: { - query: 'SELECT * FROM library ORDER BY page_count DESC', - fetch_size: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/32ce26b8af95f7ccc2a7bd5e77a39d6c.asciidoc b/docs/examples/guide/32ce26b8af95f7ccc2a7bd5e77a39d6c.asciidoc deleted file mode 100644 index 551511d36c..0000000000 --- a/docs/examples/guide/32ce26b8af95f7ccc2a7bd5e77a39d6c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.recovery( - index: 'my-index' -) -puts response ----- diff --git a/docs/examples/guide/32de5dd306bd014d67053d2f175defcd.asciidoc b/docs/examples/guide/32de5dd306bd014d67053d2f175defcd.asciidoc deleted file mode 100644 index 9639af9996..0000000000 --- a/docs/examples/guide/32de5dd306bd014d67053d2f175defcd.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'logger.org.elasticsearch.xpack.security.authc.saml' => 'debug' - } - } -) -puts response ----- diff --git a/docs/examples/guide/331caebf810a923644eb6de26e5a97f4.asciidoc b/docs/examples/guide/331caebf810a923644eb6de26e5a97f4.asciidoc deleted file mode 100644 index 165cf9cd76..0000000000 --- a/docs/examples/guide/331caebf810a923644eb6de26e5a97f4.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - my_join_field: { - type: 'join', - relations: { - question: [ - 'answer', - 'comment' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3337c817ebd438254505a31e91c91724.asciidoc b/docs/examples/guide/3337c817ebd438254505a31e91c91724.asciidoc deleted file mode 100644 index de2df2009a..0000000000 --- a/docs/examples/guide/3337c817ebd438254505a31e91c91724.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_data_stream( - name: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/3341d3bbb53052447a37c92a04c14b70.asciidoc b/docs/examples/guide/3341d3bbb53052447a37c92a04c14b70.asciidoc deleted file mode 100644 index a5f74e3da6..0000000000 --- a/docs/examples/guide/3341d3bbb53052447a37c92a04c14b70.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'my-index-000001', - id: 1, - body: { - script: "ctx._source.new_field = 'value_of_new_field'" - } -) -puts response ----- diff --git a/docs/examples/guide/3343a4cf559060c422d86c786a95e535.asciidoc b/docs/examples/guide/3343a4cf559060c422d86c786a95e535.asciidoc deleted file mode 100644 index 3a17e98f0e..0000000000 --- a/docs/examples/guide/3343a4cf559060c422d86c786a95e535.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'apostrophe' - ], - text: "Istanbul'a veya Istanbul'dan" - } -) -puts response ----- diff --git a/docs/examples/guide/33610800d9de3c3e6d6b3c611ace7330.asciidoc b/docs/examples/guide/33610800d9de3c3e6d6b3c611ace7330.asciidoc deleted file mode 100644 index bd5acb0cc4..0000000000 --- a/docs/examples/guide/33610800d9de3c3e6d6b3c611ace7330.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.tasks.get( - task_id: 'oTUltX4IQMOUUVeiohTt8A:124' -) -puts response ----- diff --git a/docs/examples/guide/336613f48dd95ea993dd3bcce264fd0e.asciidoc b/docs/examples/guide/336613f48dd95ea993dd3bcce264fd0e.asciidoc deleted file mode 100644 index e567fbe7e1..0000000000 --- a/docs/examples/guide/336613f48dd95ea993dd3bcce264fd0e.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - cold: { - actions: { - allocate: { - require: { - box_type: 'cold', - storage: 'high' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/33732208fc6e6fe1e8d278299681932e.asciidoc b/docs/examples/guide/33732208fc6e6fe1e8d278299681932e.asciidoc deleted file mode 100644 index 47d77f24bc..0000000000 --- a/docs/examples/guide/33732208fc6e6fe1e8d278299681932e.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'LINESTRING (-377.03653 389.897676, -377.009051 389.889939)' - } -) -puts response ----- diff --git a/docs/examples/guide/3386fe07e90844dbcdbbe7c07f09e04a.asciidoc b/docs/examples/guide/3386fe07e90844dbcdbbe7c07f09e04a.asciidoc deleted file mode 100644 index 37570408e0..0000000000 --- a/docs/examples/guide/3386fe07e90844dbcdbbe7c07f09e04a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.synonyms.delete_synonym( - id: 'my-synonyms-set' -) -puts response ----- diff --git a/docs/examples/guide/33d480fc6812ada75756cf5337bc9092.asciidoc b/docs/examples/guide/33d480fc6812ada75756cf5337bc9092.asciidoc deleted file mode 100644 index 0c4a9213ef..0000000000 --- a/docs/examples/guide/33d480fc6812ada75756cf5337bc9092.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.connector.sync_job_list( - from: 0, - size: 2 -) -puts response ----- diff --git a/docs/examples/guide/33f148e3d8676de6cc52f58749898a13.asciidoc b/docs/examples/guide/33f148e3d8676de6cc52f58749898a13.asciidoc deleted file mode 100644 index cbef194301..0000000000 --- a/docs/examples/guide/33f148e3d8676de6cc52f58749898a13.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - dis_max: { - queries: [ - { - match_phrase_prefix: { - subject: 'quick brown f' - } - }, - { - match_phrase_prefix: { - message: 'quick brown f' - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/342ddf9121aeddd82fea2464665e25da.asciidoc b/docs/examples/guide/342ddf9121aeddd82fea2464665e25da.asciidoc deleted file mode 100644 index 974b1eb6e5..0000000000 --- a/docs/examples/guide/342ddf9121aeddd82fea2464665e25da.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.connector.put( - connector_id: 'my-connector', - body: { - index_name: 'search-google-drive', - name: 'My Connector', - service_type: 'google_drive' - } -) -puts response ----- diff --git a/docs/examples/guide/343dd09a8c76987e586858be3bdc51eb.asciidoc b/docs/examples/guide/343dd09a8c76987e586858be3bdc51eb.asciidoc deleted file mode 100644 index ee98450755..0000000000 --- a/docs/examples/guide/343dd09a8c76987e586858be3bdc51eb.asciidoc +++ /dev/null @@ -1,56 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my_queries2', - body: { - settings: { - analysis: { - analyzer: { - wildcard_suffix: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'lowercase', - 'reverse', - 'wildcard_edge_ngram' - ] - }, - wildcard_suffix_search_time: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'lowercase', - 'reverse' - ] - } - }, - filter: { - wildcard_edge_ngram: { - type: 'edge_ngram', - min_gram: 1, - max_gram: 32 - } - } - } - }, - mappings: { - properties: { - query: { - type: 'percolator' - }, - my_field: { - type: 'text', - fields: { - suffix: { - type: 'text', - analyzer: 'wildcard_suffix', - search_analyzer: 'wildcard_suffix_search_time' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/344b4144244d57f87c6aa4652b100b25.asciidoc b/docs/examples/guide/344b4144244d57f87c6aa4652b100b25.asciidoc deleted file mode 100644 index ef9ece87e0..0000000000 --- a/docs/examples/guide/344b4144244d57f87c6aa4652b100b25.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - color: 'blue' - } -) -puts response ----- diff --git a/docs/examples/guide/346f28d82acb5427c304aa574fea0008.asciidoc b/docs/examples/guide/346f28d82acb5427c304aa574fea0008.asciidoc deleted file mode 100644 index e7ad9dfe27..0000000000 --- a/docs/examples/guide/346f28d82acb5427c304aa574fea0008.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'thai_example', - body: { - settings: { - analysis: { - filter: { - thai_stop: { - type: 'stop', - stopwords: '_thai_' - } - }, - analyzer: { - rebuilt_thai: { - tokenizer: 'thai', - filter: [ - 'lowercase', - 'decimal_digit', - 'thai_stop' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3487e60e1ae9d4925ce540cd63574385.asciidoc b/docs/examples/guide/3487e60e1ae9d4925ce540cd63574385.asciidoc deleted file mode 100644 index 220cf7a87a..0000000000 --- a/docs/examples/guide/3487e60e1ae9d4925ce540cd63574385.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - boosting: { - positive: { - term: { - text: 'apple' - } - }, - negative: { - term: { - text: 'pie tart fruit crumble tree' - } - }, - negative_boost: 0.5 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/34c5cd33ba371fb79a793baf9f6e9fad.asciidoc b/docs/examples/guide/34c5cd33ba371fb79a793baf9f6e9fad.asciidoc deleted file mode 100644 index b661b1af88..0000000000 --- a/docs/examples/guide/34c5cd33ba371fb79a793baf9f6e9fad.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index', - body: { - query: { - text_expansion: { - my_tokens: { - model_id: '.elser_model_2', - model_text: 'the query string' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/34cdeefb09bbbe5206957a8bc1bd513d.asciidoc b/docs/examples/guide/34cdeefb09bbbe5206957a8bc1bd513d.asciidoc deleted file mode 100644 index fdf9888c07..0000000000 --- a/docs/examples/guide/34cdeefb09bbbe5206957a8bc1bd513d.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - 'index.search.slowlog.include.user' => true - } -) -puts response ----- diff --git a/docs/examples/guide/34d51c54b62e9a160c0ddacc10134bb0.asciidoc b/docs/examples/guide/34d51c54b62e9a160c0ddacc10134bb0.asciidoc deleted file mode 100644 index 235589b2ca..0000000000 --- a/docs/examples/guide/34d51c54b62e9a160c0ddacc10134bb0.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - span_first: { - match: { - span_term: { - 'user.id' => 'kimchy' - } - }, - end: 3 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/34d63740b58209a3d031212909743925.asciidoc b/docs/examples/guide/34d63740b58209a3d031212909743925.asciidoc deleted file mode 100644 index ae713fef54..0000000000 --- a/docs/examples/guide/34d63740b58209a3d031212909743925.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'openai-embeddings', - body: { - knn: { - field: 'content_embedding', - query_vector_builder: { - text_embedding: { - model_id: 'openai_embeddings', - model_text: 'Calculate fuel cost' - } - }, - k: 10, - num_candidates: 100 - }, - _source: [ - 'id', - 'content' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/353020cb30a885ee7f5ce2b141ba574a.asciidoc b/docs/examples/guide/353020cb30a885ee7f5ce2b141ba574a.asciidoc deleted file mode 100644 index dd0813d68f..0000000000 --- a/docs/examples/guide/353020cb30a885ee7f5ce2b141ba574a.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - prefix: { - user: 'ki' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3541d4a85e27b2c3896a7a7ee98b4b37.asciidoc b/docs/examples/guide/3541d4a85e27b2c3896a7a7ee98b4b37.asciidoc deleted file mode 100644 index 5482fa713d..0000000000 --- a/docs/examples/guide/3541d4a85e27b2c3896a7a7ee98b4b37.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.health_report( - verbose: false -) -puts response ----- diff --git a/docs/examples/guide/3544f17cb97b613a2f733707c676f759.asciidoc b/docs/examples/guide/3544f17cb97b613a2f733707c676f759.asciidoc deleted file mode 100644 index 8cd3d60fd1..0000000000 --- a/docs/examples/guide/3544f17cb97b613a2f733707c676f759.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - filter_path: 'aggregations', - body: { - aggregations: { - f: { - filters: { - filters: { - hats: { - term: { - type: 'hat' - } - }, - t_shirts: { - term: { - type: 't-shirt' - } - } - } - }, - aggregations: { - avg_price: { - avg: { - field: 'price' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3545261682af72f4bee57f2bac0a9590.asciidoc b/docs/examples/guide/3545261682af72f4bee57f2bac0a9590.asciidoc deleted file mode 100644 index d6b99a43a9..0000000000 --- a/docs/examples/guide/3545261682af72f4bee57f2bac0a9590.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.shard_stores( - status: 'green' -) -puts response ----- diff --git a/docs/examples/guide/35563ef92dddef9d83906d9c43c60d0f.asciidoc b/docs/examples/guide/35563ef92dddef9d83906d9c43c60d0f.asciidoc deleted file mode 100644 index 38e73c8ad1..0000000000 --- a/docs/examples/guide/35563ef92dddef9d83906d9c43c60d0f.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.mtermvectors( - body: { - docs: [ - { - _index: 'my-index-000001', - _id: '2', - term_statistics: true - }, - { - _index: 'my-index-000001', - _id: '1', - fields: [ - 'message' - ] - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/355d0ee2fcb6c1fc403c6267f710e25a.asciidoc b/docs/examples/guide/355d0ee2fcb6c1fc403c6267f710e25a.asciidoc deleted file mode 100644 index ed6a8cf99d..0000000000 --- a/docs/examples/guide/355d0ee2fcb6c1fc403c6267f710e25a.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: [ - 'my-index-000001', - 'my-index-000002' - ] - }, - dest: { - index: 'my-new-index-000002' - } - } -) -puts response ----- diff --git a/docs/examples/guide/357edc9d10e98ed776401c7a439a1a55.asciidoc b/docs/examples/guide/357edc9d10e98ed776401c7a439a1a55.asciidoc deleted file mode 100644 index 3b7da07c1a..0000000000 --- a/docs/examples/guide/357edc9d10e98ed776401c7a439a1a55.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.resolve_cluster( - name: 'not-present,clust*:my-index*,oldcluster:*', - ignore_unavailable: false -) -puts response ----- diff --git a/docs/examples/guide/35a272df8c919a12d7c3106a18245748.asciidoc b/docs/examples/guide/35a272df8c919a12d7c3106a18245748.asciidoc deleted file mode 100644 index 5651f092fb..0000000000 --- a/docs/examples/guide/35a272df8c919a12d7c3106a18245748.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.ml.infer_trained_model( - model_id: 'lang_ident_model_1', - body: { - docs: [ - { - text: 'The fool doth think he is wise, but the wise man knows himself to be a fool.' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/35be136ba9df7474a5521631e2a385b1.asciidoc b/docs/examples/guide/35be136ba9df7474a5521631e2a385b1.asciidoc deleted file mode 100644 index 058a82cedf..0000000000 --- a/docs/examples/guide/35be136ba9df7474a5521631e2a385b1.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.explain_data_lifecycle( - index: '.ds-metrics-2023.03.22-000001' -) -puts response ----- diff --git a/docs/examples/guide/35c33ef48cf8a4ee368874141622f9d5.asciidoc b/docs/examples/guide/35c33ef48cf8a4ee368874141622f9d5.asciidoc deleted file mode 100644 index d6ad477d81..0000000000 --- a/docs/examples/guide/35c33ef48cf8a4ee368874141622f9d5.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_templates: [ - { - strings_as_text: { - match_mapping_type: 'string', - mapping: { - type: 'text' - } - } - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/35eef1765e9a5991d77592a0c7490fe0.asciidoc b/docs/examples/guide/35eef1765e9a5991d77592a0c7490fe0.asciidoc deleted file mode 100644 index 93e8e7e5f9..0000000000 --- a/docs/examples/guide/35eef1765e9a5991d77592a0c7490fe0.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - aggregations: { - grade_min: { - min: { - field: 'grade', - missing: 10 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/35f892b475a1770f18328158be7039fd.asciidoc b/docs/examples/guide/35f892b475a1770f18328158be7039fd.asciidoc deleted file mode 100644 index c4bdfd9750..0000000000 --- a/docs/examples/guide/35f892b475a1770f18328158be7039fd.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-2', - body: { - mappings: { - properties: { - my_vector: { - type: 'dense_vector', - dims: 3, - similarity: 'dot_product' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/35fc63cbefce7bc131ad467b5ba209ef.asciidoc b/docs/examples/guide/35fc63cbefce7bc131ad467b5ba209ef.asciidoc deleted file mode 100644 index c893c6bdde..0000000000 --- a/docs/examples/guide/35fc63cbefce7bc131ad467b5ba209ef.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.allocation( - v: true, - s: 'disk.avail', - h: 'node,disk.percent,disk.avail,disk.total,disk.used,disk.indices,shards' -) -puts response ----- diff --git a/docs/examples/guide/35fd9549350926f8d57dc1765e2f40d3.asciidoc b/docs/examples/guide/35fd9549350926f8d57dc1765e2f40d3.asciidoc deleted file mode 100644 index 318ca1be35..0000000000 --- a/docs/examples/guide/35fd9549350926f8d57dc1765e2f40d3.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'attachment', - body: { - description: 'Extract attachment information', - processors: [ - { - attachment: { - field: 'data', - remove_binary: false - } - } - ] - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'my_id', - pipeline: 'attachment', - body: { - data: 'e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=' - } -) -puts response - -response = client.get( - index: 'my-index-000001', - id: 'my_id' -) -puts response ----- diff --git a/docs/examples/guide/36063ff9a318dba7bb0be3a230655dc8.asciidoc b/docs/examples/guide/36063ff9a318dba7bb0be3a230655dc8.asciidoc deleted file mode 100644 index 37d5d191cb..0000000000 --- a/docs/examples/guide/36063ff9a318dba7bb0be3a230655dc8.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - long: { - type: 'long' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - long: [ - 0, - 0, - -123_466, - 87_612 - ] - } -) -puts response ----- diff --git a/docs/examples/guide/360b3cef34bbddc5d9579ca95f0cb061.asciidoc b/docs/examples/guide/360b3cef34bbddc5d9579ca95f0cb061.asciidoc deleted file mode 100644 index ea8c543dfd..0000000000 --- a/docs/examples/guide/360b3cef34bbddc5d9579ca95f0cb061.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-data-stream', - write_index_only: true, - body: { - properties: { - message: { - type: 'text' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/360c4f373e72ba861584ee85bd218124.asciidoc b/docs/examples/guide/360c4f373e72ba861584ee85bd218124.asciidoc deleted file mode 100644 index d227b4f842..0000000000 --- a/docs/examples/guide/360c4f373e72ba861584ee85bd218124.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test_index', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'porter_stem' - ] - } - } - } - }, - mappings: { - properties: { - query: { - type: 'percolator' - }, - body: { - type: 'text', - analyzer: 'my_analyzer' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/362dfccdb6f7933b22c909542e0b4e0a.asciidoc b/docs/examples/guide/362dfccdb6f7933b22c909542e0b4e0a.asciidoc deleted file mode 100644 index 6fc6004a03..0000000000 --- a/docs/examples/guide/362dfccdb6f7933b22c909542e0b4e0a.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'my-data-stream', - body: { - query: { - match: { - 'user.id' => 'l7gk7f82' - } - }, - script: { - source: 'ctx._source.user.id = params.new_id', - params: { - new_id: 'XgdX0NoX' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/365256ebdfa47b449780771d9beba8d9.asciidoc b/docs/examples/guide/365256ebdfa47b449780771d9beba8d9.asciidoc deleted file mode 100644 index 4953bdb2e7..0000000000 --- a/docs/examples/guide/365256ebdfa47b449780771d9beba8d9.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.sync_job_check_in( - connector_sync_job_id: 'my-connector-sync-job' -) -puts response ----- diff --git a/docs/examples/guide/36962727b806315b221e8a63e05caddc.asciidoc b/docs/examples/guide/36962727b806315b221e8a63e05caddc.asciidoc deleted file mode 100644 index 9662b11b76..0000000000 --- a/docs/examples/guide/36962727b806315b221e8a63e05caddc.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - properties: { - "employee-id": { - type: 'keyword', - index: false - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/36b26905c5f96d0b785c3267fb63838d.asciidoc b/docs/examples/guide/36b26905c5f96d0b785c3267fb63838d.asciidoc deleted file mode 100644 index 46b362684f..0000000000 --- a/docs/examples/guide/36b26905c5f96d0b785c3267fb63838d.asciidoc +++ /dev/null @@ -1,612 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - ip: { - type: 'ip' - }, - version: { - type: 'version' - }, - missing_keyword: { - type: 'keyword' - }, - "@timestamp": { - type: 'date' - }, - type_test: { - type: 'keyword' - }, - "@timestamp_pretty": { - type: 'date', - format: 'dd-MM-yyyy' - }, - event_type: { - type: 'keyword' - }, - event: { - properties: { - category: { - type: 'alias', - path: 'event_type' - } - } - }, - host: { - type: 'keyword' - }, - os: { - type: 'keyword' - }, - bool: { - type: 'boolean' - }, - uptime: { - type: 'long' - }, - port: { - type: 'long' - } - } - } - } -) -puts response - -response = client.indices.create( - index: 'my-index-000002', - body: { - mappings: { - properties: { - ip: { - type: 'ip' - }, - "@timestamp": { - type: 'date' - }, - "@timestamp_pretty": { - type: 'date', - format: 'yyyy-MM-dd' - }, - type_test: { - type: 'keyword' - }, - event_type: { - type: 'keyword' - }, - event: { - properties: { - category: { - type: 'alias', - path: 'event_type' - } - } - }, - host: { - type: 'keyword' - }, - op_sys: { - type: 'keyword' - }, - bool: { - type: 'boolean' - }, - uptime: { - type: 'long' - }, - port: { - type: 'long' - } - } - } - } -) -puts response - -response = client.indices.create( - index: 'my-index-000003', - body: { - mappings: { - properties: { - host_ip: { - type: 'ip' - }, - "@timestamp": { - type: 'date' - }, - date: { - type: 'date' - }, - event_type: { - type: 'keyword' - }, - event: { - properties: { - category: { - type: 'alias', - path: 'event_type' - } - } - }, - missing_keyword: { - type: 'keyword' - }, - host: { - type: 'keyword' - }, - os: { - type: 'keyword' - }, - bool: { - type: 'boolean' - }, - uptime: { - type: 'long' - }, - port: { - type: 'long' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'my-index-000001', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - "@timestamp": '1234567891', - "@timestamp_pretty": '12-12-2022', - missing_keyword: 'test', - type_test: 'abc', - ip: '10.0.0.1', - event_type: 'alert', - host: 'doom', - uptime: 0, - port: 1234, - os: 'win10', - version: '1.0.0', - id: 11 - }, - { - index: { - _id: 2 - } - }, - { - "@timestamp": '1234567892', - "@timestamp_pretty": '13-12-2022', - event_type: 'alert', - type_test: 'abc', - host: 'CS', - uptime: 5, - port: 1, - os: 'win10', - version: '1.2.0', - id: 12 - }, - { - index: { - _id: 3 - } - }, - { - "@timestamp": '1234567893', - "@timestamp_pretty": '12-12-2022', - event_type: 'alert', - type_test: 'abc', - host: 'farcry', - uptime: 1, - port: 1234, - bool: false, - os: 'win10', - version: '2.0.0', - id: 13 - }, - { - index: { - _id: 4 - } - }, - { - "@timestamp": '1234567894', - "@timestamp_pretty": '13-12-2022', - event_type: 'alert', - type_test: 'abc', - host: 'GTA', - uptime: 3, - port: 12, - os: 'slack', - version: '10.0.0', - id: 14 - }, - { - index: { - _id: 5 - } - }, - { - "@timestamp": '1234567895', - "@timestamp_pretty": '17-12-2022', - event_type: 'alert', - host: 'sniper 3d', - uptime: 6, - port: 1234, - os: 'fedora', - version: '20.1.0', - id: 15 - }, - { - index: { - _id: 6 - } - }, - { - "@timestamp": '1234568896', - "@timestamp_pretty": '17-12-2022', - event_type: 'alert', - host: 'doom', - port: 65_123, - bool: true, - os: 'redhat', - version: '20.10.0', - id: 16 - }, - { - index: { - _id: 7 - } - }, - { - "@timestamp": '1234567897', - "@timestamp_pretty": '17-12-2022', - missing_keyword: 'yyy', - event_type: 'failure', - host: 'doom', - uptime: 15, - port: 1234, - bool: true, - os: 'redhat', - version: '20.2.0', - id: 17 - }, - { - index: { - _id: 8 - } - }, - { - "@timestamp": '1234567898', - "@timestamp_pretty": '12-12-2022', - missing_keyword: 'test', - event_type: 'success', - host: 'doom', - uptime: 16, - port: 512, - os: 'win10', - version: '1.2.3', - id: 18 - }, - { - index: { - _id: 9 - } - }, - { - "@timestamp": '1234567899', - "@timestamp_pretty": '15-12-2022', - missing_keyword: 'test', - event_type: 'success', - host: 'GTA', - port: 12, - bool: true, - os: 'win10', - version: '1.2.3', - id: 19 - }, - { - index: { - _id: 10 - } - }, - { - "@timestamp": '1234567893', - missing_keyword: nil, - ip: '10.0.0.5', - event_type: 'alert', - host: 'farcry', - uptime: 1, - port: 1234, - bool: true, - os: 'win10', - version: '1.2.3', - id: 110 - } - ] -) -puts response - -response = client.bulk( - index: 'my-index-000002', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - "@timestamp": '1234567991', - type_test: 'abc', - ip: '10.0.0.1', - event_type: 'alert', - host: 'doom', - uptime: 0, - port: 1234, - op_sys: 'win10', - id: 21 - }, - { - index: { - _id: 2 - } - }, - { - "@timestamp": '1234567992', - type_test: 'abc', - event_type: 'alert', - host: 'CS', - uptime: 5, - port: 1, - op_sys: 'win10', - id: 22 - }, - { - index: { - _id: 3 - } - }, - { - "@timestamp": '1234567993', - type_test: 'abc', - "@timestamp_pretty": '2022-12-17', - event_type: 'alert', - host: 'farcry', - uptime: 1, - port: 1234, - bool: false, - op_sys: 'win10', - id: 23 - }, - { - index: { - _id: 4 - } - }, - { - "@timestamp": '1234567994', - event_type: 'alert', - host: 'GTA', - uptime: 3, - port: 12, - op_sys: 'slack', - id: 24 - }, - { - index: { - _id: 5 - } - }, - { - "@timestamp": '1234567995', - event_type: 'alert', - host: 'sniper 3d', - uptime: 6, - port: 1234, - op_sys: 'fedora', - id: 25 - }, - { - index: { - _id: 6 - } - }, - { - "@timestamp": '1234568996', - "@timestamp_pretty": '2022-12-17', - ip: '10.0.0.5', - event_type: 'alert', - host: 'doom', - port: 65_123, - bool: true, - op_sys: 'redhat', - id: 26 - }, - { - index: { - _id: 7 - } - }, - { - "@timestamp": '1234567997', - "@timestamp_pretty": '2022-12-17', - event_type: 'failure', - host: 'doom', - uptime: 15, - port: 1234, - bool: true, - op_sys: 'redhat', - id: 27 - }, - { - index: { - _id: 8 - } - }, - { - "@timestamp": '1234567998', - ip: '10.0.0.1', - event_type: 'success', - host: 'doom', - uptime: 16, - port: 512, - op_sys: 'win10', - id: 28 - }, - { - index: { - _id: 9 - } - }, - { - "@timestamp": '1234567999', - ip: '10.0.0.1', - event_type: 'success', - host: 'GTA', - port: 12, - bool: false, - op_sys: 'win10', - id: 29 - } - ] -) -puts response - -response = client.bulk( - index: 'my-index-000003', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - "@timestamp": '1334567891', - host_ip: '10.0.0.1', - event_type: 'alert', - host: 'doom', - uptime: 0, - port: 12, - os: 'win10', - id: 31 - }, - { - index: { - _id: 2 - } - }, - { - "@timestamp": '1334567892', - event_type: 'alert', - host: 'CS', - os: 'win10', - id: 32 - }, - { - index: { - _id: 3 - } - }, - { - "@timestamp": '1334567893', - event_type: 'alert', - host: 'farcry', - bool: true, - os: 'win10', - id: 33 - }, - { - index: { - _id: 4 - } - }, - { - "@timestamp": '1334567894', - event_type: 'alert', - host: 'GTA', - os: 'slack', - bool: true, - id: 34 - }, - { - index: { - _id: 5 - } - }, - { - "@timestamp": '1234567895', - event_type: 'alert', - host: 'sniper 3d', - os: 'fedora', - id: 35 - }, - { - index: { - _id: 6 - } - }, - { - "@timestamp": '1234578896', - host_ip: '10.0.0.1', - event_type: 'alert', - host: 'doom', - bool: true, - os: 'redhat', - id: 36 - }, - { - index: { - _id: 7 - } - }, - { - "@timestamp": '1234567897', - event_type: 'failure', - missing_keyword: 'test', - host: 'doom', - bool: true, - os: 'redhat', - id: 37 - }, - { - index: { - _id: 8 - } - }, - { - "@timestamp": '1234577898', - event_type: 'success', - host: 'doom', - os: 'win10', - id: 38, - date: '1671235200000' - }, - { - index: { - _id: 9 - } - }, - { - "@timestamp": '1234577899', - host_ip: '10.0.0.5', - event_type: 'success', - host: 'GTA', - bool: true, - os: 'win10', - id: 39 - } - ] -) -puts response ----- diff --git a/docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc b/docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc deleted file mode 100644 index 0147fe261d..0000000000 --- a/docs/examples/guide/36b86b97feedcf5632824eefc251d6ed.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'books', - body: { - query: { - match: { - name: 'brave' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/36da9668fef56910370f16bfb772cc40.asciidoc b/docs/examples/guide/36da9668fef56910370f16bfb772cc40.asciidoc deleted file mode 100644 index 8fff99dec8..0000000000 --- a/docs/examples/guide/36da9668fef56910370f16bfb772cc40.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.stats( - metric: 'request_cache', - human: true -) -puts response ----- diff --git a/docs/examples/guide/36fae9dfc0b815546b45745bac054b67.asciidoc b/docs/examples/guide/36fae9dfc0b815546b45745bac054b67.asciidoc deleted file mode 100644 index 974c220525..0000000000 --- a/docs/examples/guide/36fae9dfc0b815546b45745bac054b67.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - model_number: 'HG537PU' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/370b297ed3433577adf53e64f572d89d.asciidoc b/docs/examples/guide/370b297ed3433577adf53e64f572d89d.asciidoc deleted file mode 100644 index fdf6818555..0000000000 --- a/docs/examples/guide/370b297ed3433577adf53e64f572d89d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.sync_job_delete( - connector_sync_job_id: 'my-connector-sync-job-id' -) -puts response ----- diff --git a/docs/examples/guide/37530f35f315b9f35e3e6a13cf2a1ccd.asciidoc b/docs/examples/guide/37530f35f315b9f35e3e6a13cf2a1ccd.asciidoc deleted file mode 100644 index db928aef2c..0000000000 --- a/docs/examples/guide/37530f35f315b9f35e3e6a13cf2a1ccd.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - actors: { - terms: { - field: 'actors', - size: 10, - collect_mode: 'breadth_first' - }, - aggregations: { - costars: { - terms: { - field: 'actors', - size: 5 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3758b8f2ab9f6f28a764ee6c42c85766.asciidoc b/docs/examples/guide/3758b8f2ab9f6f28a764ee6c42c85766.asciidoc deleted file mode 100644 index f848d994e5..0000000000 --- a/docs/examples/guide/3758b8f2ab9f6f28a764ee6c42c85766.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - scroll: '1m', - body: { - slice: { - id: 0, - max: 2 - }, - query: { - match: { - message: 'foo' - } - } - } -) -puts response - -response = client.search( - index: 'my-index-000001', - scroll: '1m', - body: { - slice: { - id: 1, - max: 2 - }, - query: { - match: { - message: 'foo' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3759ca688c4bd3c838780a9aad63258b.asciidoc b/docs/examples/guide/3759ca688c4bd3c838780a9aad63258b.asciidoc deleted file mode 100644 index 70497bcc09..0000000000 --- a/docs/examples/guide/3759ca688c4bd3c838780a9aad63258b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_index_template( - name: 'template_1' -) -puts response ----- diff --git a/docs/examples/guide/376fbc965e1b093f6dbc198a94c83aa9.asciidoc b/docs/examples/guide/376fbc965e1b093f6dbc198a94c83aa9.asciidoc deleted file mode 100644 index 052aea5494..0000000000 --- a/docs/examples/guide/376fbc965e1b093f6dbc198a94c83aa9.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-index', - refresh: true, - body: [ - { - index: {} - }, - { - gc: '[2021-04-27T16:16:34.699+0000][82460][gc,heap,exit] class space used 266K, capacity 384K, committed 384K, reserved 1048576K' - }, - { - index: {} - }, - { - gc: '[2021-03-24T20:27:24.184+0000][90239][gc,heap,exit] class space used 15255K, capacity 16726K, committed 16844K, reserved 1048576K' - }, - { - index: {} - }, - { - gc: '[2021-03-24T20:27:24.184+0000][90239][gc,heap,exit] Metaspace used 115409K, capacity 119541K, committed 120248K, reserved 1153024K' - }, - { - index: {} - }, - { - gc: '[2021-04-19T15:03:21.735+0000][84408][gc,heap,exit] class space used 14503K, capacity 15894K, committed 15948K, reserved 1048576K' - }, - { - index: {} - }, - { - gc: '[2021-04-19T15:03:21.735+0000][84408][gc,heap,exit] Metaspace used 107719K, capacity 111775K, committed 112724K, reserved 1146880K' - }, - { - index: {} - }, - { - gc: '[2021-04-27T16:16:34.699+0000][82460][gc,heap,exit] class space used 266K, capacity 367K, committed 384K, reserved 1048576K' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/376ff4b2b5f657481af78a778aaab57f.asciidoc b/docs/examples/guide/376ff4b2b5f657481af78a778aaab57f.asciidoc deleted file mode 100644 index ebb19baedf..0000000000 --- a/docs/examples/guide/376ff4b2b5f657481af78a778aaab57f.asciidoc +++ /dev/null @@ -1,75 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index', - body: { - mappings: { - properties: { - nr: { - type: 'integer' - }, - state: { - type: 'keyword' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'my-index', - refresh: true, - body: [ - { - index: {} - }, - { - nr: 1, - state: 'started' - }, - { - index: {} - }, - { - nr: 2, - state: 'stopped' - }, - { - index: {} - }, - { - nr: 3, - state: 'N/A' - }, - { - index: {} - }, - { - nr: 4 - } - ] -) -puts response - -response = client.search( - index: 'my-index', - filter_path: 'aggregations', - body: { - aggregations: { - my_top_metrics: { - top_metrics: { - metrics: { - field: 'state', - missing: 'N/A' - }, - sort: { - nr: 'desc' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/377af0ea9b19c113f224d8150890b41b.asciidoc b/docs/examples/guide/377af0ea9b19c113f224d8150890b41b.asciidoc deleted file mode 100644 index cf052c9bc5..0000000000 --- a/docs/examples/guide/377af0ea9b19c113f224d8150890b41b.asciidoc +++ /dev/null @@ -1,73 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - bool: { - filter: [ - { - term: { - 'event.outcome' => 'failure' - } - }, - { - range: { - "@timestamp": { - gte: '2021-02-01', - lt: '2021-02-04' - } - } - }, - { - term: { - 'service.name' => { - value: 'frontend-node' - } - } - } - ] - } - }, - aggregations: { - failure_p_value: { - significant_terms: { - field: 'user_agent.version', - background_filter: { - bool: { - must_not: [ - { - term: { - 'event.outcome' => 'failure' - } - } - ], - filter: [ - { - range: { - "@timestamp": { - gte: '2021-02-01', - lt: '2021-02-04' - } - } - }, - { - term: { - 'service.name' => { - value: 'frontend-node' - } - } - } - ] - } - }, - p_value: { - background_is_superset: false, - normalize_above: 1000 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/378e55f78fa13578a1302bae8d479765.asciidoc b/docs/examples/guide/378e55f78fa13578a1302bae8d479765.asciidoc deleted file mode 100644 index 0db5f83104..0000000000 --- a/docs/examples/guide/378e55f78fa13578a1302bae8d479765.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - color: { - type: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/37983daac3d9c8582583a507b3adb7f2.asciidoc b/docs/examples/guide/37983daac3d9c8582583a507b3adb7f2.asciidoc deleted file mode 100644 index 0209bda40a..0000000000 --- a/docs/examples/guide/37983daac3d9c8582583a507b3adb7f2.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.shutdown.put_node( - node_id: 'USpTGYaBSIKbgSUJR2Z9lg', - body: { - type: 'restart', - reason: 'Demonstrating how the node shutdown API works' - } -) -puts response ----- diff --git a/docs/examples/guide/37ae7c3e4d6d954487ec4185fe7d9ec8.asciidoc b/docs/examples/guide/37ae7c3e4d6d954487ec4185fe7d9ec8.asciidoc deleted file mode 100644 index 944f405414..0000000000 --- a/docs/examples/guide/37ae7c3e4d6d954487ec4185fe7d9ec8.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - forces: { - terms: { - field: 'force' - }, - aggregations: { - significant_crime_types: { - significant_terms: { - field: 'crime_type' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/37b84f2ab7c2f6b4fe0e14cc7e018b1f.asciidoc b/docs/examples/guide/37b84f2ab7c2f6b4fe0e14cc7e018b1f.asciidoc deleted file mode 100644 index 3892a2aee8..0000000000 --- a/docs/examples/guide/37b84f2ab7c2f6b4fe0e14cc7e018b1f.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - cluster: { - remote: { - "clusterB": { - mode: 'proxy', - skip_unavailable: true, - server_name: 'clusterb.es.region-b.gcp.elastic-cloud.com', - proxy_socket_connections: 18, - proxy_address: 'clusterb.es.region-b.gcp.elastic-cloud.com:9400' - } - } - } - } - } -) -puts response - -response = client.cluster.put_settings( - body: { - persistent: { - cluster: { - remote: { - "clusterA": { - mode: 'proxy', - skip_unavailable: true, - server_name: 'clustera.es.region-a.gcp.elastic-cloud.com', - proxy_socket_connections: 18, - proxy_address: 'clustera.es.region-a.gcp.elastic-cloud.com:9400' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/37c73410bf13429279cbc61a413957d8.asciidoc b/docs/examples/guide/37c73410bf13429279cbc61a413957d8.asciidoc deleted file mode 100644 index 22e182c229..0000000000 --- a/docs/examples/guide/37c73410bf13429279cbc61a413957d8.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.stats( - filter_path: 'indices.shards.total' -) -puts response ----- diff --git a/docs/examples/guide/37eaab0630976d3dee90a52011342883.asciidoc b/docs/examples/guide/37eaab0630976d3dee90a52011342883.asciidoc deleted file mode 100644 index 468fae3c2f..0000000000 --- a/docs/examples/guide/37eaab0630976d3dee90a52011342883.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'whitespace', - filter: [ - 'stop' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/37f1f2e75ed95308ae436bbbb8d5645e.asciidoc b/docs/examples/guide/37f1f2e75ed95308ae436bbbb8d5645e.asciidoc deleted file mode 100644 index 08d7a64233..0000000000 --- a/docs/examples/guide/37f1f2e75ed95308ae436bbbb8d5645e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.license.post_start_trial( - acknowledge: true -) -puts response ----- diff --git a/docs/examples/guide/3819d0a5c2eed635c88e9e7bf2e81584.asciidoc b/docs/examples/guide/3819d0a5c2eed635c88e9e7bf2e81584.asciidoc deleted file mode 100644 index 4fe616771d..0000000000 --- a/docs/examples/guide/3819d0a5c2eed635c88e9e7bf2e81584.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.ml.revert_model_snapshot( - job_id: 'low_request_rate', - snapshot_id: 1_637_092_688, - body: { - delete_intervening_results: true - } -) -puts response ----- diff --git a/docs/examples/guide/388d3eda4f792d3fce044777739217e6.asciidoc b/docs/examples/guide/388d3eda4f792d3fce044777739217e6.asciidoc deleted file mode 100644 index 6ef2aae625..0000000000 --- a/docs/examples/guide/388d3eda4f792d3fce044777739217e6.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.ml.evaluate_data_frame( - body: { - index: 'animal_classification', - evaluation: { - classification: { - actual_field: 'animal_class', - predicted_field: 'ml.animal_class_prediction', - metrics: { - multiclass_confusion_matrix: {} - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/388ec2b038d3ad69378f4c2e5bc36dce.asciidoc b/docs/examples/guide/388ec2b038d3ad69378f4c2e5bc36dce.asciidoc deleted file mode 100644 index 3ac6f22168..0000000000 --- a/docs/examples/guide/388ec2b038d3ad69378f4c2e5bc36dce.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - span_near: { - clauses: [ - { - span_term: { - text: 'quick brown' - } - }, - { - span_field_masking: { - query: { - span_term: { - 'text.stems' => 'fox' - } - }, - field: 'text' - } - } - ], - slop: 5, - in_order: false - } - }, - highlight: { - require_field_match: false, - fields: { - "*": {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/38af4a55c1ea0f908dc7b06d680d2789.asciidoc b/docs/examples/guide/38af4a55c1ea0f908dc7b06d680d2789.asciidoc deleted file mode 100644 index 86dfdeef8a..0000000000 --- a/docs/examples/guide/38af4a55c1ea0f908dc7b06d680d2789.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.create_data_stream( - name: 'new-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/38b20fe981605e80a41517e9aa13134a.asciidoc b/docs/examples/guide/38b20fe981605e80a41517e9aa13134a.asciidoc deleted file mode 100644 index 95bee4795b..0000000000 --- a/docs/examples/guide/38b20fe981605e80a41517e9aa13134a.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - total_sales: { - sum: { - field: 'price' - } - }, - sales_bucket_filter: { - bucket_selector: { - buckets_path: { - "totalSales": 'total_sales' - }, - script: 'params.totalSales > 200' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/38eed000de433b540116928681c520d3.asciidoc b/docs/examples/guide/38eed000de433b540116928681c520d3.asciidoc deleted file mode 100644 index df3bc537ec..0000000000 --- a/docs/examples/guide/38eed000de433b540116928681c520d3.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.preview_datafeed( - datafeed_id: 'datafeed-high_sum_total_sales' -) -puts response ----- diff --git a/docs/examples/guide/38f7739f750f1411bccf511a0abaaea3.asciidoc b/docs/examples/guide/38f7739f750f1411bccf511a0abaaea3.asciidoc deleted file mode 100644 index af5b720193..0000000000 --- a/docs/examples/guide/38f7739f750f1411bccf511a0abaaea3.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.field_caps( - fields: 'rating' -) -puts response ----- diff --git a/docs/examples/guide/3951d7fcd7f849fa278daf342872125a.asciidoc b/docs/examples/guide/3951d7fcd7f849fa278daf342872125a.asciidoc deleted file mode 100644 index 80540ce161..0000000000 --- a/docs/examples/guide/3951d7fcd7f849fa278daf342872125a.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - index: 'analyze_sample', - body: { - text: 'this is a test' - } -) -puts response ----- diff --git a/docs/examples/guide/39760996f94ad34aaceaa16a5cc97993.asciidoc b/docs/examples/guide/39760996f94ad34aaceaa16a5cc97993.asciidoc deleted file mode 100644 index 3a84b0f8b7..0000000000 --- a/docs/examples/guide/39760996f94ad34aaceaa16a5cc97993.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.shutdown.get_node( - node_id: 'USpTGYaBSIKbgSUJR2Z9lg' -) -puts response ----- diff --git a/docs/examples/guide/397ab5f9ea0b69ae85038bb0b9915180.asciidoc b/docs/examples/guide/397ab5f9ea0b69ae85038bb0b9915180.asciidoc deleted file mode 100644 index 8c821b8d9e..0000000000 --- a/docs/examples/guide/397ab5f9ea0b69ae85038bb0b9915180.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.data_streams_stats( - name: 'datastream', - human: true -) -puts response ----- diff --git a/docs/examples/guide/397bdb40d0146102f1f4c6a35675e16a.asciidoc b/docs/examples/guide/397bdb40d0146102f1f4c6a35675e16a.asciidoc deleted file mode 100644 index bb187c7665..0000000000 --- a/docs/examples/guide/397bdb40d0146102f1f4c6a35675e16a.asciidoc +++ /dev/null @@ -1,58 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index', - body: { - settings: { - analysis: { - analyzer: { - english_exact: { - tokenizer: 'standard', - filter: [ - 'lowercase' - ] - } - } - } - }, - mappings: { - properties: { - body: { - type: 'text', - analyzer: 'english', - fields: { - exact: { - type: 'text', - analyzer: 'english_exact' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'index', - id: 1, - body: { - body: 'Ski resort' - } -) -puts response - -response = client.index( - index: 'index', - id: 2, - body: { - body: 'A pair of skis' - } -) -puts response - -response = client.indices.refresh( - index: 'index' -) -puts response ----- diff --git a/docs/examples/guide/39963032d423e2f20f53c4621b6ca3c6.asciidoc b/docs/examples/guide/39963032d423e2f20f53c4621b6ca3c6.asciidoc deleted file mode 100644 index 9bd51f4fec..0000000000 --- a/docs/examples/guide/39963032d423e2f20f53c4621b6ca3c6.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'ngram', - text: 'Quick Fox' - } -) -puts response ----- diff --git a/docs/examples/guide/39ce44333d28ed2b833722d3e3cb06f3.asciidoc b/docs/examples/guide/39ce44333d28ed2b833722d3e3cb06f3.asciidoc deleted file mode 100644 index c176e1e0ea..0000000000 --- a/docs/examples/guide/39ce44333d28ed2b833722d3e3cb06f3.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.search( - include_named_queries_score: true, - body: { - query: { - bool: { - should: [ - { - match: { - 'name.first' => { - query: 'shay', - _name: 'first' - } - } - }, - { - match: { - 'name.last' => { - query: 'banon', - _name: 'last' - } - } - } - ], - filter: { - terms: { - 'name.last' => [ - 'banon', - 'kimchy' - ], - _name: 'test' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/39d6f575c9458d9c941364dfd0493fa0.asciidoc b/docs/examples/guide/39d6f575c9458d9c941364dfd0493fa0.asciidoc deleted file mode 100644 index ffe885ae55..0000000000 --- a/docs/examples/guide/39d6f575c9458d9c941364dfd0493fa0.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_calendar_events( - calendar_id: 'planned-outages' -) -puts response ----- diff --git a/docs/examples/guide/3a2953fd81d65118a776c87a81530e15.asciidoc b/docs/examples/guide/3a2953fd81d65118a776c87a81530e15.asciidoc deleted file mode 100644 index 9e22c4ef00..0000000000 --- a/docs/examples/guide/3a2953fd81d65118a776c87a81530e15.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - highlight: { - order: 'score', - fields: { - comment: { - fragment_size: 150, - number_of_fragments: 3 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3a3adae6dbb2c0316a7d98d0a6c1d4f8.asciidoc b/docs/examples/guide/3a3adae6dbb2c0316a7d98d0a6c1d4f8.asciidoc deleted file mode 100644 index 24486d9f05..0000000000 --- a/docs/examples/guide/3a3adae6dbb2c0316a7d98d0a6c1d4f8.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'quantized-image-index', - body: { - knn: { - field: 'image-vector', - query_vector: [ - 0.1, - -2 - ], - k: 15, - num_candidates: 100 - }, - fields: [ - 'title' - ], - rescore: { - window_size: 10, - query: { - rescore_query: { - script_score: { - query: { - match_all: {} - }, - script: { - source: "cosineSimilarity(params.query_vector, 'image-vector') + 1.0", - params: { - query_vector: [ - 0.1, - -2 - ] - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3a6238835c7d9f51e6d91f92885fadeb.asciidoc b/docs/examples/guide/3a6238835c7d9f51e6d91f92885fadeb.asciidoc deleted file mode 100644 index c3440ba33c..0000000000 --- a/docs/examples/guide/3a6238835c7d9f51e6d91f92885fadeb.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - post_date: { - type: 'date' - }, - user: { - type: 'keyword' - }, - name: { - type: 'keyword' - }, - age: { - type: 'integer' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3a64ae799cc03fadbb802794730c23da.asciidoc b/docs/examples/guide/3a64ae799cc03fadbb802794730c23da.asciidoc deleted file mode 100644 index eeb701b7b9..0000000000 --- a/docs/examples/guide/3a64ae799cc03fadbb802794730c23da.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'example_points', - body: { - mappings: { - properties: { - location: { - type: 'geo_point' - } - } - } - } -) -puts response - -response = client.index( - index: 'example_points', - id: 1, - refresh: true, - body: { - name: 'Wind & Wetter, Berlin, Germany', - location: [ - 13.400544, - 52.530286 - ] - } -) -puts response ----- diff --git a/docs/examples/guide/3a7a6ab88a49b484fafb10c8eb09b562.asciidoc b/docs/examples/guide/3a7a6ab88a49b484fafb10c8eb09b562.asciidoc deleted file mode 100644 index 5d641117d6..0000000000 --- a/docs/examples/guide/3a7a6ab88a49b484fafb10c8eb09b562.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'cohere_embeddings', - body: { - processors: [ - { - inference: { - model_id: 'cohere_embeddings', - input_output: { - input_field: 'content', - output_field: 'content_embedding' - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/3aa0e2d25a51bf5f3f0bda7fd8403bf2.asciidoc b/docs/examples/guide/3aa0e2d25a51bf5f3f0bda7fd8403bf2.asciidoc deleted file mode 100644 index 3654b6e769..0000000000 --- a/docs/examples/guide/3aa0e2d25a51bf5f3f0bda7fd8403bf2.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - default: { - tokenizer: 'whitespace', - filter: [ - 'my_custom_stop_words_filter' - ] - } - }, - filter: { - my_custom_stop_words_filter: { - type: 'stop', - ignore_case: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3abedc1d68fe1d20621157406b2b1de0.asciidoc b/docs/examples/guide/3abedc1d68fe1d20621157406b2b1de0.asciidoc deleted file mode 100644 index 22131e8304..0000000000 --- a/docs/examples/guide/3abedc1d68fe1d20621157406b2b1de0.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'keyword', - filter: [ - 'my_custom_word_delimiter_filter' - ] - } - }, - filter: { - my_custom_word_delimiter_filter: { - type: 'word_delimiter', - type_table: [ - '- => ALPHA' - ], - split_on_case_change: false, - split_on_numerics: false, - stem_english_possessive: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3ac075c5b5bbe648d40d06cce3061367.asciidoc b/docs/examples/guide/3ac075c5b5bbe648d40d06cce3061367.asciidoc deleted file mode 100644 index e0e68ed4fe..0000000000 --- a/docs/examples/guide/3ac075c5b5bbe648d40d06cce3061367.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: '{ "query": { "bool": { "filter": [ {{#year_scope}} { "range": { "@timestamp": { "gte": "now-1y/d", "lt": "now/d" } } }, {{/year_scope}} { "term": { "user.id": "{{user_id}}" }}]}}}', - params: { - year_scope: false, - user_id: 'kimchy' - } - } -) -puts response ----- diff --git a/docs/examples/guide/3ac8b5234e9d53859245cf8ab0094ca5.asciidoc b/docs/examples/guide/3ac8b5234e9d53859245cf8ab0094ca5.asciidoc deleted file mode 100644 index e23b13e4d5..0000000000 --- a/docs/examples/guide/3ac8b5234e9d53859245cf8ab0094ca5.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_job( - job_id: 'total-requests' -) -puts response ----- diff --git a/docs/examples/guide/3af10fde8138d9d95df127d39d9a0ed2.asciidoc b/docs/examples/guide/3af10fde8138d9d95df127d39d9a0ed2.asciidoc deleted file mode 100644 index d210a4ddb9..0000000000 --- a/docs/examples/guide/3af10fde8138d9d95df127d39d9a0ed2.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.max_shards_per_node' => nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/3afc6dacf90b42900ab571aad8a61d75.asciidoc b/docs/examples/guide/3afc6dacf90b42900ab571aad8a61d75.asciidoc deleted file mode 100644 index 6d5393c31c..0000000000 --- a/docs/examples/guide/3afc6dacf90b42900ab571aad8a61d75.asciidoc +++ /dev/null @@ -1,41 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'serbian_example', - body: { - settings: { - analysis: { - filter: { - serbian_stop: { - type: 'stop', - stopwords: '_serbian_' - }, - serbian_keywords: { - type: 'keyword_marker', - keywords: [ - 'пример' - ] - }, - serbian_stemmer: { - type: 'stemmer', - language: 'serbian' - } - }, - analyzer: { - rebuilt_serbian: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'serbian_stop', - 'serbian_keywords', - 'serbian_stemmer', - 'serbian_normalization' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3b0475515ee692a2d9850c2bd7cdb895.asciidoc b/docs/examples/guide/3b0475515ee692a2d9850c2bd7cdb895.asciidoc deleted file mode 100644 index e03632019b..0000000000 --- a/docs/examples/guide/3b0475515ee692a2d9850c2bd7cdb895.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_templates: [ - { - unindexed_longs: { - match_mapping_type: 'long', - mapping: { - type: 'long', - index: false - } - } - }, - { - unindexed_doubles: { - match_mapping_type: 'double', - mapping: { - type: 'float', - index: false - } - } - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/3b04cc894e6a47d57983484010feac0c.asciidoc b/docs/examples/guide/3b04cc894e6a47d57983484010feac0c.asciidoc deleted file mode 100644 index 6653ba9a4f..0000000000 --- a/docs/examples/guide/3b04cc894e6a47d57983484010feac0c.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'metricbeat-2016.05.30-1', - id: 1 -) -puts response - -response = client.get( - index: 'metricbeat-2016.05.31-1', - id: 1 -) -puts response ----- diff --git a/docs/examples/guide/3b40db1c5c6b36f087d7a09a4ce285c6.asciidoc b/docs/examples/guide/3b40db1c5c6b36f087d7a09a4ce285c6.asciidoc deleted file mode 100644 index 99a84af7d8..0000000000 --- a/docs/examples/guide/3b40db1c5c6b36f087d7a09a4ce285c6.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_index_template -puts response ----- diff --git a/docs/examples/guide/3b606631284877f9bca15051630995ad.asciidoc b/docs/examples/guide/3b606631284877f9bca15051630995ad.asciidoc deleted file mode 100644 index 48c9fe1666..0000000000 --- a/docs/examples/guide/3b606631284877f9bca15051630995ad.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_test_scores', - body: { - query: { - term: { - grad_year: '2099' - } - }, - sort: [ - { - _script: { - type: 'number', - script: { - source: "doc['math_score'].value + doc['verbal_score'].value" - }, - order: 'desc' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/3b8ab7027e0d616fb432acd8813e086c.asciidoc b/docs/examples/guide/3b8ab7027e0d616fb432acd8813e086c.asciidoc deleted file mode 100644 index 3e873349c5..0000000000 --- a/docs/examples/guide/3b8ab7027e0d616fb432acd8813e086c.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - "@timestamp": '2099-11-15T13:12:00', - message: 'GET /search HTTP/1.1 200 1070000', - user: { - id: 'kimchy' - } - } -) -puts response ----- diff --git a/docs/examples/guide/3b9c54604535d97e8368d47148aecc6f.asciidoc b/docs/examples/guide/3b9c54604535d97e8368d47148aecc6f.asciidoc deleted file mode 100644 index 818f5ee238..0000000000 --- a/docs/examples/guide/3b9c54604535d97e8368d47148aecc6f.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.ml.update_model_snapshot( - job_id: 'it_ops_new_logs', - snapshot_id: 1_491_852_978, - body: { - description: 'Snapshot 1', - retain: true - } -) -puts response ----- diff --git a/docs/examples/guide/3ba2896bcc724c27be8f0decf6f81813.asciidoc b/docs/examples/guide/3ba2896bcc724c27be8f0decf6f81813.asciidoc deleted file mode 100644 index b20d78c282..0000000000 --- a/docs/examples/guide/3ba2896bcc724c27be8f0decf6f81813.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_template( - name: 'custom_monitoring', - body: { - index_patterns: [ - '.monitoring-beats-7-*', - '.monitoring-es-7-*', - '.monitoring-kibana-7-*', - '.monitoring-logstash-7-*' - ], - order: 1, - settings: { - number_of_shards: 5, - number_of_replicas: 2 - } - } -) -puts response ----- diff --git a/docs/examples/guide/3bb491db29deba25e1cc82bcaa1aa1a1.asciidoc b/docs/examples/guide/3bb491db29deba25e1cc82bcaa1aa1a1.asciidoc deleted file mode 100644 index 403feffa3f..0000000000 --- a/docs/examples/guide/3bb491db29deba25e1cc82bcaa1aa1a1.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'my-index-000001' - }, - dest: { - index: 'my-new-index-000001' - }, - script: { - source: 'ctx._source.tag = ctx._source.remove("flag")' - } - } -) -puts response ----- diff --git a/docs/examples/guide/3bb5951a9e1186af5d154f56ffc13502.asciidoc b/docs/examples/guide/3bb5951a9e1186af5d154f56ffc13502.asciidoc deleted file mode 100644 index f7a81f73ab..0000000000 --- a/docs/examples/guide/3bb5951a9e1186af5d154f56ffc13502.asciidoc +++ /dev/null @@ -1,49 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - message: { - type: 'keyword', - ignore_above: 20 - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - message: 'Syntax error' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - message: 'Syntax error with some long stacktrace' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - aggregations: { - messages: { - terms: { - field: 'message' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3bc872dbcdad8ff02cbaea39e7f38352.asciidoc b/docs/examples/guide/3bc872dbcdad8ff02cbaea39e7f38352.asciidoc deleted file mode 100644 index deccbf84f0..0000000000 --- a/docs/examples/guide/3bc872dbcdad8ff02cbaea39e7f38352.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index_double', - body: { - mappings: { - properties: { - field: { - type: 'date' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3bfa2362add163802fc2210cc2f37ba2.asciidoc b/docs/examples/guide/3bfa2362add163802fc2210cc2f37ba2.asciidoc deleted file mode 100644 index 3742b8fb6f..0000000000 --- a/docs/examples/guide/3bfa2362add163802fc2210cc2f37ba2.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.clone( - repository: 'my_repository', - snapshot: 'source_snapshot', - target_snapshot: 'target_snapshot', - body: { - indices: 'index_a,index_b' - } -) -puts response ----- diff --git a/docs/examples/guide/3c04f75bcbb07125d51b21b9b2c9f6f0.asciidoc b/docs/examples/guide/3c04f75bcbb07125d51b21b9b2c9f6f0.asciidoc deleted file mode 100644 index 8c6ece1c4b..0000000000 --- a/docs/examples/guide/3c04f75bcbb07125d51b21b9b2c9f6f0.asciidoc +++ /dev/null @@ -1,59 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'index_1', - id: 1, - body: { - text: 'Document in index 1' - } -) -puts response - -response = client.index( - index: 'index_2', - id: 2, - refresh: true, - body: { - text: 'Document in index 2' - } -) -puts response - -response = client.search( - index: 'index_1,index_2', - body: { - query: { - terms: { - _index: [ - 'index_1', - 'index_2' - ] - } - }, - aggregations: { - indices: { - terms: { - field: '_index', - size: 10 - } - } - }, - sort: [ - { - _index: { - order: 'asc' - } - } - ], - script_fields: { - index_name: { - script: { - lang: 'painless', - source: "doc['_index']" - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3c09ca91057216125ed0e3856a91ff95.asciidoc b/docs/examples/guide/3c09ca91057216125ed0e3856a91ff95.asciidoc deleted file mode 100644 index fccfbc1f18..0000000000 --- a/docs/examples/guide/3c09ca91057216125ed0e3856a91ff95.asciidoc +++ /dev/null @@ -1,150 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'datastream_template', - body: { - index_patterns: [ - 'datastream*' - ], - data_stream: {}, - template: { - settings: { - index: { - mode: 'time_series', - number_of_replicas: 0, - number_of_shards: 2 - }, - 'index.lifecycle.name' => 'datastream_policy' - }, - mappings: { - properties: { - "@timestamp": { - type: 'date' - }, - kubernetes: { - properties: { - container: { - properties: { - cpu: { - properties: { - usage: { - properties: { - core: { - properties: { - ns: { - type: 'long' - } - } - }, - limit: { - properties: { - pct: { - type: 'float' - } - } - }, - nanocores: { - type: 'long', - time_series_metric: 'gauge' - }, - node: { - properties: { - pct: { - type: 'float' - } - } - } - } - } - } - }, - memory: { - properties: { - available: { - properties: { - bytes: { - type: 'long', - time_series_metric: 'gauge' - } - } - }, - majorpagefaults: { - type: 'long' - }, - pagefaults: { - type: 'long', - time_series_metric: 'gauge' - }, - rss: { - properties: { - bytes: { - type: 'long', - time_series_metric: 'gauge' - } - } - }, - usage: { - properties: { - bytes: { - type: 'long', - time_series_metric: 'gauge' - }, - limit: { - properties: { - pct: { - type: 'float' - } - } - }, - node: { - properties: { - pct: { - type: 'float' - } - } - } - } - }, - workingset: { - properties: { - bytes: { - type: 'long', - time_series_metric: 'gauge' - } - } - } - } - }, - name: { - type: 'keyword' - }, - start_time: { - type: 'date' - } - } - }, - host: { - type: 'keyword', - time_series_dimension: true - }, - namespace: { - type: 'keyword', - time_series_dimension: true - }, - node: { - type: 'keyword', - time_series_dimension: true - }, - pod: { - type: 'keyword', - time_series_dimension: true - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3c345feb7c52fd54bcb5d5505fd8bc3b.asciidoc b/docs/examples/guide/3c345feb7c52fd54bcb5d5505fd8bc3b.asciidoc deleted file mode 100644 index 83c7c060cb..0000000000 --- a/docs/examples/guide/3c345feb7c52fd54bcb5d5505fd8bc3b.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.ml.infer_trained_model( - model_id: 'model2', - body: { - docs: [ - { - text_field: '' - } - ], - inference_config: { - question_answering: { - question: '' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3c36dc17359c6b6b6a40d04da9293fa7.asciidoc b/docs/examples/guide/3c36dc17359c6b6b6a40d04da9293fa7.asciidoc deleted file mode 100644 index 622d151fc3..0000000000 --- a/docs/examples/guide/3c36dc17359c6b6b6a40d04da9293fa7.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'date', - calendar_interval: '1M' - }, - aggregations: { - the_sum: { - sum: { - field: 'price' - } - }, - the_movavg: { - moving_fn: { - buckets_path: 'the_sum', - window: 10, - script: 'MovingFunctions.unweightedAvg(values)' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3c4d7ef8422d2db423a8f23effcddaa1.asciidoc b/docs/examples/guide/3c4d7ef8422d2db423a8f23effcddaa1.asciidoc deleted file mode 100644 index 8853b4660c..0000000000 --- a/docs/examples/guide/3c4d7ef8422d2db423a8f23effcddaa1.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.nodes.info( - node_id: 'process' -) -puts response - -response = client.nodes.info( - node_id: '_all', - metric: 'process' -) -puts response - -response = client.nodes.info( - node_id: 'nodeId1,nodeId2', - metric: 'jvm,process' -) -puts response - -response = client.nodes.info( - node_id: 'nodeId1,nodeId2', - metric: '_all' -) -puts response ----- diff --git a/docs/examples/guide/3c5d5a5c34a62724942329658c688f5e.asciidoc b/docs/examples/guide/3c5d5a5c34a62724942329658c688f5e.asciidoc deleted file mode 100644 index ee008e353c..0000000000 --- a/docs/examples/guide/3c5d5a5c34a62724942329658c688f5e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.set_upgrade_mode( - enabled: false -) -puts response ----- diff --git a/docs/examples/guide/3c65cb58e131ef46f4dd081683b970ac.asciidoc b/docs/examples/guide/3c65cb58e131ef46f4dd081683b970ac.asciidoc deleted file mode 100644 index 5245ec03a8..0000000000 --- a/docs/examples/guide/3c65cb58e131ef46f4dd081683b970ac.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations,my_geoshapes', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_distance: { - distance: '200km', - 'pin.location' => { - lat: 40, - lon: -70 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3c6abb9885cb1a997fcdd16f7fa4f673.asciidoc b/docs/examples/guide/3c6abb9885cb1a997fcdd16f7fa4f673.asciidoc deleted file mode 100644 index d05d6ea154..0000000000 --- a/docs/examples/guide/3c6abb9885cb1a997fcdd16f7fa4f673.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.shrink( - index: 'my-index-000001', - target: 'shrunk-my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/3c7621a81fa982b79f040a6d2611530e.asciidoc b/docs/examples/guide/3c7621a81fa982b79f040a6d2611530e.asciidoc deleted file mode 100644 index 957167898f..0000000000 --- a/docs/examples/guide/3c7621a81fa982b79f040a6d2611530e.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'ct1', - body: { - template: { - settings: { - 'index.number_of_shards' => 2 - } - } - } -) -puts response - -response = client.cluster.put_component_template( - name: 'ct2', - body: { - template: { - settings: { - 'index.number_of_replicas' => 0 - }, - mappings: { - properties: { - "@timestamp": { - type: 'date' - } - } - } - } - } -) -puts response - -response = client.indices.put_index_template( - name: 'final-template', - body: { - index_patterns: [ - 'my-index-*' - ], - composed_of: [ - 'ct1', - 'ct2' - ], - priority: 5 - } -) -puts response - -response = client.indices.simulate_template( - name: 'final-template' -) -puts response ----- diff --git a/docs/examples/guide/3cd2f7f9096a8e8180f27b6c30e71840.asciidoc b/docs/examples/guide/3cd2f7f9096a8e8180f27b6c30e71840.asciidoc deleted file mode 100644 index 9cde57c9ae..0000000000 --- a/docs/examples/guide/3cd2f7f9096a8e8180f27b6c30e71840.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'logs', - body: { - size: 0, - aggregations: { - messages: { - filters: { - filters: [ - { - match: { - body: 'error' - } - }, - { - match: { - body: 'warning' - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3cd93a48906069709b76420c66930c01.asciidoc b/docs/examples/guide/3cd93a48906069709b76420c66930c01.asciidoc deleted file mode 100644 index d8eedab960..0000000000 --- a/docs/examples/guide/3cd93a48906069709b76420c66930c01.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'my_stemmer' - ] - } - }, - filter: { - my_stemmer: { - type: 'stemmer', - language: 'light_german' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3d05fa99ba8e1f2c3f3dfe59e4ee60f6.asciidoc b/docs/examples/guide/3d05fa99ba8e1f2c3f3dfe59e4ee60f6.asciidoc deleted file mode 100644 index 9de975461f..0000000000 --- a/docs/examples/guide/3d05fa99ba8e1f2c3f3dfe59e4ee60f6.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - content: 'kimchy' - } - }, - highlight: { - fields: { - content: {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3d1a0e1dc5310544d032108ae0b3f099.asciidoc b/docs/examples/guide/3d1a0e1dc5310544d032108ae0b3f099.asciidoc deleted file mode 100644 index cb41586ec4..0000000000 --- a/docs/examples/guide/3d1a0e1dc5310544d032108ae0b3f099.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match_all: { - boost: 1.2 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3d1ff6097e2359f927c88c2ccdb36252.asciidoc b/docs/examples/guide/3d1ff6097e2359f927c88c2ccdb36252.asciidoc deleted file mode 100644 index e6a88d209d..0000000000 --- a/docs/examples/guide/3d1ff6097e2359f927c88c2ccdb36252.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.info -puts response ----- diff --git a/docs/examples/guide/3d316bddd8503a6cc10566630a4155d3.asciidoc b/docs/examples/guide/3d316bddd8503a6cc10566630a4155d3.asciidoc deleted file mode 100644 index be6a45c5f3..0000000000 --- a/docs/examples/guide/3d316bddd8503a6cc10566630a4155d3.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.watcher.get_settings -puts response ----- diff --git a/docs/examples/guide/3d6935e04de21ab2f103e5b61cfd7a5b.asciidoc b/docs/examples/guide/3d6935e04de21ab2f103e5b61cfd7a5b.asciidoc deleted file mode 100644 index de99d01dc4..0000000000 --- a/docs/examples/guide/3d6935e04de21ab2f103e5b61cfd7a5b.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - processors: [ - { - rename: { - description: "Rename 'provider' to 'cloud.provider'", - field: 'provider', - target_field: 'cloud.provider', - ignore_failure: true - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/3d6a56dd3d93ece0e3da3fb66b4696d3.asciidoc b/docs/examples/guide/3d6a56dd3d93ece0e3da3fb66b4696d3.asciidoc deleted file mode 100644 index 7a6bf65599..0000000000 --- a/docs/examples/guide/3d6a56dd3d93ece0e3da3fb66b4696d3.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.nodes.usage -puts response ----- diff --git a/docs/examples/guide/3d82257167e8a14a7f474848b32da128.asciidoc b/docs/examples/guide/3d82257167e8a14a7f474848b32da128.asciidoc deleted file mode 100644 index 898254772a..0000000000 --- a/docs/examples/guide/3d82257167e8a14a7f474848b32da128.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'set_bar', - body: { - description: 'sets the value of bar from the field foo', - processors: [ - { - set: { - field: 'bar', - copy_from: 'foo' - } - } - ] - } -) -puts response - -response = client.ingest.simulate( - id: 'set_bar', - body: { - docs: [ - { - _source: { - foo: [ - 'foo1', - 'foo2' - ] - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/3da35090e093c2d83c3b7d0d83bcb4ae.asciidoc b/docs/examples/guide/3da35090e093c2d83c3b7d0d83bcb4ae.asciidoc deleted file mode 100644 index f0e63d9178..0000000000 --- a/docs/examples/guide/3da35090e093c2d83c3b7d0d83bcb4ae.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.exclude._name' => 'target-node-name' - } - } -) -puts response ----- diff --git a/docs/examples/guide/3db2b5a6424aa92ecab7a8640c38685a.asciidoc b/docs/examples/guide/3db2b5a6424aa92ecab7a8640c38685a.asciidoc deleted file mode 100644 index 29c26d5552..0000000000 --- a/docs/examples/guide/3db2b5a6424aa92ecab7a8640c38685a.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.delete( - index: 'my-index-000001', - id: 1 -) -puts response ----- diff --git a/docs/examples/guide/3dd45f65e7bfe207e8d796118f25613c.asciidoc b/docs/examples/guide/3dd45f65e7bfe207e8d796118f25613c.asciidoc deleted file mode 100644 index 375ac91382..0000000000 --- a/docs/examples/guide/3dd45f65e7bfe207e8d796118f25613c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_settings( - flat_settings: true -) -puts response ----- diff --git a/docs/examples/guide/3e13c8a81f40a537eddc0b57633b45f8.asciidoc b/docs/examples/guide/3e13c8a81f40a537eddc0b57633b45f8.asciidoc deleted file mode 100644 index 8d8538b306..0000000000 --- a/docs/examples/guide/3e13c8a81f40a537eddc0b57633b45f8.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - index: 'test_index', - body: { - analyzer: 'my_analyzer', - text: 'missing bicycles' - } -) -puts response ----- diff --git a/docs/examples/guide/3e1cb34fd6e510c79c2fff2126ac1c61.asciidoc b/docs/examples/guide/3e1cb34fd6e510c79c2fff2126ac1c61.asciidoc deleted file mode 100644 index 909b13b1ae..0000000000 --- a/docs/examples/guide/3e1cb34fd6e510c79c2fff2126ac1c61.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - _meta: { - class: 'MyApp::User', - version: { - min: '1.0', - max: '1.3' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3e278e6c193b4c17dbdc70670e15d78c.asciidoc b/docs/examples/guide/3e278e6c193b4c17dbdc70670e15d78c.asciidoc deleted file mode 100644 index cf8694d9f2..0000000000 --- a/docs/examples/guide/3e278e6c193b4c17dbdc70670e15d78c.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - highlight: { - fields: { - comment: { - fragment_size: 150, - number_of_fragments: 3, - no_match_size: 150 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3e33c1a4298ea6a0dec65a3ebf9ba973.asciidoc b/docs/examples/guide/3e33c1a4298ea6a0dec65a3ebf9ba973.asciidoc deleted file mode 100644 index 70d097f645..0000000000 --- a/docs/examples/guide/3e33c1a4298ea6a0dec65a3ebf9ba973.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.termvectors( - index: 'my-index-000001', - body: { - doc: { - fullname: 'John Doe', - text: 'test test test' - } - } -) -puts response ----- diff --git a/docs/examples/guide/3e4227250d49e81df48773f8ba803ea7.asciidoc b/docs/examples/guide/3e4227250d49e81df48773f8ba803ea7.asciidoc deleted file mode 100644 index b1a1e477b1..0000000000 --- a/docs/examples/guide/3e4227250d49e81df48773f8ba803ea7.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-data-stream', - body: { - properties: { - message: { - type: 'text' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3e6db3d80439c2c176dbd1bb1296b6cf.asciidoc b/docs/examples/guide/3e6db3d80439c2c176dbd1bb1296b6cf.asciidoc deleted file mode 100644 index f08535c752..0000000000 --- a/docs/examples/guide/3e6db3d80439c2c176dbd1bb1296b6cf.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - id: 'my-search-template', - params: { - query_string: 'hello world' - } - } -) -puts response ----- diff --git a/docs/examples/guide/3e8ed6ae016eb823cb00d9035b8ac459.asciidoc b/docs/examples/guide/3e8ed6ae016eb823cb00d9035b8ac459.asciidoc deleted file mode 100644 index dde5cf5958..0000000000 --- a/docs/examples/guide/3e8ed6ae016eb823cb00d9035b8ac459.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/3eb4cdd4a799a117ac1ff5f02b18a512.asciidoc b/docs/examples/guide/3eb4cdd4a799a117ac1ff5f02b18a512.asciidoc deleted file mode 100644 index c69bbfa8ed..0000000000 --- a/docs/examples/guide/3eb4cdd4a799a117ac1ff5f02b18a512.asciidoc +++ /dev/null @@ -1,47 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index', - body: { - mappings: { - properties: { - query: { - type: 'percolator' - }, - body: { - type: 'text' - } - } - } - } -) -puts response - -response = client.indices.update_aliases( - body: { - actions: [ - { - add: { - index: 'index', - alias: 'queries' - } - } - ] - } -) -puts response - -response = client.index( - index: 'queries', - id: 1, - refresh: true, - body: { - query: { - match: { - body: 'quick brown fox' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3ec95ba697ff97ee2d1a721a393b5926.asciidoc b/docs/examples/guide/3ec95ba697ff97ee2d1a721a393b5926.asciidoc deleted file mode 100644 index 092a9102ab..0000000000 --- a/docs/examples/guide/3ec95ba697ff97ee2d1a721a393b5926.asciidoc +++ /dev/null @@ -1,76 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'lowercase' - ] - }, - my_stop_analyzer: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'lowercase', - 'english_stop' - ] - } - }, - filter: { - english_stop: { - type: 'stop', - stopwords: '_english_' - } - } - } - }, - mappings: { - properties: { - title: { - type: 'text', - analyzer: 'my_analyzer', - search_analyzer: 'my_stop_analyzer', - search_quote_analyzer: 'my_analyzer' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - title: 'The Quick Brown Fox' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - title: 'A Quick Brown Fox' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - query_string: { - query: '"the quick brown fox"' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3eca58ef7592b3a857ea3a9898de5997.asciidoc b/docs/examples/guide/3eca58ef7592b3a857ea3a9898de5997.asciidoc deleted file mode 100644 index 598b2da43d..0000000000 --- a/docs/examples/guide/3eca58ef7592b3a857ea3a9898de5997.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - "zoomed-in": { - filter: { - geo_bounding_box: { - location: { - top_left: 'POINT (4.9 52.4)', - bottom_right: 'POINT (5.0 52.3)' - } - } - }, - aggregations: { - "zoom1": { - geohash_grid: { - field: 'location', - precision: 8 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3ed39eb60fbfafb70f7825b8d103bf17.asciidoc b/docs/examples/guide/3ed39eb60fbfafb70f7825b8d103bf17.asciidoc deleted file mode 100644 index 1676fd538e..0000000000 --- a/docs/examples/guide/3ed39eb60fbfafb70f7825b8d103bf17.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_distance: { - distance: '200km', - 'pin.location' => { - lat: 40, - lon: -70 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3ed79871d956bfb2d6d2721d7272520c.asciidoc b/docs/examples/guide/3ed79871d956bfb2d6d2721d7272520c.asciidoc deleted file mode 100644 index 86da2e1a05..0000000000 --- a/docs/examples/guide/3ed79871d956bfb2d6d2721d7272520c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.watcher.stats( - metric: 'current_watches' -) -puts response ----- diff --git a/docs/examples/guide/3ee232bcb2281a12b33cd9764ee4081a.asciidoc b/docs/examples/guide/3ee232bcb2281a12b33cd9764ee4081a.asciidoc deleted file mode 100644 index d1fb9f715f..0000000000 --- a/docs/examples/guide/3ee232bcb2281a12b33cd9764ee4081a.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'geohex2shape', - body: { - description: 'translate H3 cell to polygon with enriched fields', - processors: [ - { - geo_grid: { - description: "Ingest H3 cells like '811fbffffffffff' and create polygons", - field: 'geocell', - tile_type: 'geohex', - target_format: 'wkt', - target_field: 'shape', - parent_field: 'parent', - children_field: 'children', - non_children_field: 'nonChildren', - precision_field: 'precision' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/3f20459d358611793272f63dc596e889.asciidoc b/docs/examples/guide/3f20459d358611793272f63dc596e889.asciidoc deleted file mode 100644 index bd6cc9e48d..0000000000 --- a/docs/examples/guide/3f20459d358611793272f63dc596e889.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'news', - body: { - query: { - match: { - custom_all: 'elasticsearch' - } - }, - aggregations: { - tags: { - significant_text: { - field: 'custom_all', - source_fields: [ - 'content', - 'title' - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3f30310cc6d0adae6b0f61705624a695.asciidoc b/docs/examples/guide/3f30310cc6d0adae6b0f61705624a695.asciidoc deleted file mode 100644 index d25de974b1..0000000000 --- a/docs/examples/guide/3f30310cc6d0adae6b0f61705624a695.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.create( - repository: 'my_repository', - snapshot: 'snapshot_2', - wait_for_completion: true, - body: { - indices: 'index_1,index_2', - ignore_unavailable: true, - include_global_state: false, - metadata: { - taken_by: 'user123', - taken_because: 'backup before upgrading' - } - } -) -puts response ----- diff --git a/docs/examples/guide/3f5b5bee692e7d4b0992dc0a64e95a60.asciidoc b/docs/examples/guide/3f5b5bee692e7d4b0992dc0a64e95a60.asciidoc deleted file mode 100644 index 16ce3078ae..0000000000 --- a/docs/examples/guide/3f5b5bee692e7d4b0992dc0a64e95a60.asciidoc +++ /dev/null @@ -1,63 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - mappings: { - properties: { - my_join_field: { - type: 'join', - relations: { - my_parent: 'my_child' - } - } - } - } - } -) -puts response - -response = client.index( - index: 'test', - id: 1, - refresh: true, - body: { - number: 1, - my_join_field: 'my_parent' - } -) -puts response - -response = client.index( - index: 'test', - id: 2, - routing: 1, - refresh: true, - body: { - number: 1, - my_join_field: { - name: 'my_child', - parent: '1' - } - } -) -puts response - -response = client.search( - index: 'test', - body: { - query: { - has_child: { - type: 'my_child', - query: { - match: { - number: 1 - } - }, - inner_hits: {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3f60a892bed18151b7baac6cc712576a.asciidoc b/docs/examples/guide/3f60a892bed18151b7baac6cc712576a.asciidoc deleted file mode 100644 index fc2e8d7d45..0000000000 --- a/docs/examples/guide/3f60a892bed18151b7baac6cc712576a.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'whitespace', - filter: [ - 'lowercase', - 'kstem' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3f8dc309b63fa0437898107b0d964217.asciidoc b/docs/examples/guide/3f8dc309b63fa0437898107b0d964217.asciidoc deleted file mode 100644 index bd2b92a06d..0000000000 --- a/docs/examples/guide/3f8dc309b63fa0437898107b0d964217.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.ml_jobs( - h: 'id,s,dpr,mb', - v: true -) -puts response ----- diff --git a/docs/examples/guide/3f94ed945ae6416a0eb372c2db14d7e0.asciidoc b/docs/examples/guide/3f94ed945ae6416a0eb372c2db14d7e0.asciidoc deleted file mode 100644 index 6c50a2a5cc..0000000000 --- a/docs/examples/guide/3f94ed945ae6416a0eb372c2db14d7e0.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'index', - body: { - query: { - simple_query_string: { - fields: [ - 'body.exact' - ], - query: 'ski' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3fab530a2e43807929c0ef3ebf7d268c.asciidoc b/docs/examples/guide/3fab530a2e43807929c0ef3ebf7d268c.asciidoc deleted file mode 100644 index 898d5f1ed9..0000000000 --- a/docs/examples/guide/3fab530a2e43807929c0ef3ebf7d268c.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'geoip', - body: { - description: 'Add geoip info', - processors: [ - { - geoip: { - field: 'ip', - target_field: 'geo', - database_file: 'GeoLite2-Country.mmdb' - } - } - ] - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'my_id', - pipeline: 'geoip', - body: { - ip: '89.160.20.128' - } -) -puts response - -response = client.get( - index: 'my-index-000001', - id: 'my_id' -) -puts response ----- diff --git a/docs/examples/guide/3faf5e2873de340acfe0a617017db784.asciidoc b/docs/examples/guide/3faf5e2873de340acfe0a617017db784.asciidoc deleted file mode 100644 index 6dd9d9fee8..0000000000 --- a/docs/examples/guide/3faf5e2873de340acfe0a617017db784.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - query: '(content:this OR name:this) AND (content:that OR name:that)' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3fb2f41ad229a31ad3ae408cc50cbed5.asciidoc b/docs/examples/guide/3fb2f41ad229a31ad3ae408cc50cbed5.asciidoc deleted file mode 100644 index 6e3527fee3..0000000000 --- a/docs/examples/guide/3fb2f41ad229a31ad3ae408cc50cbed5.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - timeout: '2s', - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3fe0fb38f75d2a34fb1e6ac9bedbcdbc.asciidoc b/docs/examples/guide/3fe0fb38f75d2a34fb1e6ac9bedbcdbc.asciidoc deleted file mode 100644 index a7109f8b90..0000000000 --- a/docs/examples/guide/3fe0fb38f75d2a34fb1e6ac9bedbcdbc.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - exists: { - field: '_ignored' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3fe5e6c0d5ea4586aa04f989ae54b72e.asciidoc b/docs/examples/guide/3fe5e6c0d5ea4586aa04f989ae54b72e.asciidoc deleted file mode 100644 index d5fd0406a2..0000000000 --- a/docs/examples/guide/3fe5e6c0d5ea4586aa04f989ae54b72e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.verify_repository( - repository: 'my_repository' -) -puts response ----- diff --git a/docs/examples/guide/3fe79ed63195c5f8018648a5a6d645f6.asciidoc b/docs/examples/guide/3fe79ed63195c5f8018648a5a6d645f6.asciidoc deleted file mode 100644 index 0fb086755e..0000000000 --- a/docs/examples/guide/3fe79ed63195c5f8018648a5a6d645f6.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000002', - body: { - mappings: { - _routing: { - required: true - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000002', - id: 1, - body: { - text: 'No routing value provided' - } -) -puts response ----- diff --git a/docs/examples/guide/3fe9006f6c7faea162e43fb250f4da38.asciidoc b/docs/examples/guide/3fe9006f6c7faea162e43fb250f4da38.asciidoc deleted file mode 100644 index cece7ff07d..0000000000 --- a/docs/examples/guide/3fe9006f6c7faea162e43fb250f4da38.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - processors: [ - { - set: { - field: '_source.my-long-field', - value: 10 - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/3fecd5c6d0c172566da4a54320e1cff3.asciidoc b/docs/examples/guide/3fecd5c6d0c172566da4a54320e1cff3.asciidoc deleted file mode 100644 index 7721b742e4..0000000000 --- a/docs/examples/guide/3fecd5c6d0c172566da4a54320e1cff3.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - { - type: 'dictionary_decompounder', - word_list: [ - 'Donau', - 'dampf', - 'meer', - 'schiff' - ] - } - ], - text: 'Donaudampfschiff' - } -) -puts response ----- diff --git a/docs/examples/guide/3ff634a50e2e4556bad7ea8553576992.asciidoc b/docs/examples/guide/3ff634a50e2e4556bad7ea8553576992.asciidoc deleted file mode 100644 index 39c1607cff..0000000000 --- a/docs/examples/guide/3ff634a50e2e4556bad7ea8553576992.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'my_snow' - ] - } - }, - filter: { - my_snow: { - type: 'snowball', - language: 'Lovins' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/3ffe9952786ab258bb6ab928b03148a2.asciidoc b/docs/examples/guide/3ffe9952786ab258bb6ab928b03148a2.asciidoc deleted file mode 100644 index 0255da4601..0000000000 --- a/docs/examples/guide/3ffe9952786ab258bb6ab928b03148a2.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - genres: { - rare_terms: { - field: 'genre' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/400e89eb46ead8e9c9e40f123fd5e590.asciidoc b/docs/examples/guide/400e89eb46ead8e9c9e40f123fd5e590.asciidoc deleted file mode 100644 index 4c73fe484c..0000000000 --- a/docs/examples/guide/400e89eb46ead8e9c9e40f123fd5e590.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'source', - size: 100 - }, - dest: { - index: 'dest', - routing: '=cat' - } - } -) -puts response ----- diff --git a/docs/examples/guide/402092585940953420404c2884a47e59.asciidoc b/docs/examples/guide/402092585940953420404c2884a47e59.asciidoc deleted file mode 100644 index ce53d117b4..0000000000 --- a/docs/examples/guide/402092585940953420404c2884a47e59.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - date: { - date_histogram: { - field: 'timestamp', - calendar_interval: '1d', - order: 'desc' - } - } - }, - { - product: { - terms: { - field: 'product' - } - } - } - ] - }, - aggregations: { - the_avg: { - avg: { - field: 'price' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4029af36cb3f8202549017f7378803b4.asciidoc b/docs/examples/guide/4029af36cb3f8202549017f7378803b4.asciidoc deleted file mode 100644 index 215add1282..0000000000 --- a/docs/examples/guide/4029af36cb3f8202549017f7378803b4.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_settings -puts response ----- diff --git a/docs/examples/guide/4053de806dfd9172167999ce098107c4.asciidoc b/docs/examples/guide/4053de806dfd9172167999ce098107c4.asciidoc deleted file mode 100644 index 32fab044ee..0000000000 --- a/docs/examples/guide/4053de806dfd9172167999ce098107c4.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - constant_score: { - filter: { - term: { - 'user.id' => 'kimchy' - } - }, - boost: 1.2 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc b/docs/examples/guide/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc deleted file mode 100644 index a8873e82b4..0000000000 --- a/docs/examples/guide/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.esql.async_query_get( - id: 'FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=' -) -puts response ----- diff --git a/docs/examples/guide/405ac843a9156d3cab374e199cac87fb.asciidoc b/docs/examples/guide/405ac843a9156d3cab374e199cac87fb.asciidoc deleted file mode 100644 index 14e1ae08cf..0000000000 --- a/docs/examples/guide/405ac843a9156d3cab374e199cac87fb.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.connector.sync_job_post( - body: { - id: 'connector-id', - job_type: 'full', - trigger_method: 'on_demand' - } -) -puts response ----- diff --git a/docs/examples/guide/405db6f3a01eceacfaa8b0ed3e4b3ac2.asciidoc b/docs/examples/guide/405db6f3a01eceacfaa8b0ed3e4b3ac2.asciidoc deleted file mode 100644 index d7f8d539b3..0000000000 --- a/docs/examples/guide/405db6f3a01eceacfaa8b0ed3e4b3ac2.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_overall_buckets( - job_id: 'job-*', - body: { - top_n: 2, - overall_score: 50, - start: '1403532000000' - } -) -puts response ----- diff --git a/docs/examples/guide/4061fd5ba7221ca85805ed14d59a6bc5.asciidoc b/docs/examples/guide/4061fd5ba7221ca85805ed14d59a6bc5.asciidoc deleted file mode 100644 index 1ac6418e19..0000000000 --- a/docs/examples/guide/4061fd5ba7221ca85805ed14d59a6bc5.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.delete_script( - id: 'calculate-score' -) -puts response ----- diff --git a/docs/examples/guide/408060f0c52300588a6dee774f4fd6a5.asciidoc b/docs/examples/guide/408060f0c52300588a6dee774f4fd6a5.asciidoc deleted file mode 100644 index 2f2409a667..0000000000 --- a/docs/examples/guide/408060f0c52300588a6dee774f4fd6a5.asciidoc +++ /dev/null @@ -1,530 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'datastream', - refresh: true, - body: [ - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:49:00Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 91_153, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 463_314_616 - }, - usage: { - bytes: 307_007_078, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 585_236 - }, - rss: { - bytes: 102_728 - }, - pagefaults: 120_901, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:45:50Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 124_501, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 982_546_514 - }, - usage: { - bytes: 360_035_574, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 1_339_884 - }, - rss: { - bytes: 381_174 - }, - pagefaults: 178_473, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:44:50Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 38_907, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 862_723_768 - }, - usage: { - bytes: 379_572_388, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 431_227 - }, - rss: { - bytes: 386_580 - }, - pagefaults: 233_166, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:44:40Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 86_706, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 567_160_996 - }, - usage: { - bytes: 103_266_017, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 1_724_908 - }, - rss: { - bytes: 105_431 - }, - pagefaults: 233_166, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:44:00Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 150_069, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 639_054_643 - }, - usage: { - bytes: 265_142_477, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 1_786_511 - }, - rss: { - bytes: 189_235 - }, - pagefaults: 138_172, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:42:40Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 82_260, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 854_735_585 - }, - usage: { - bytes: 309_798_052, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 924_058 - }, - rss: { - bytes: 110_838 - }, - pagefaults: 259_073, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:42:10Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 153_404, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 279_586_406 - }, - usage: { - bytes: 214_904_955, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 1_047_265 - }, - rss: { - bytes: 91_914 - }, - pagefaults: 302_252, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:40:20Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 125_613, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 822_782_853 - }, - usage: { - bytes: 100_475_044, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 2_109_932 - }, - rss: { - bytes: 278_446 - }, - pagefaults: 74_843, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:40:10Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 100_046, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 567_160_996 - }, - usage: { - bytes: 362_826_547, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 1_986_724 - }, - rss: { - bytes: 402_801 - }, - pagefaults: 296_495, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:38:30Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 40_018, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 1_062_428_344 - }, - usage: { - bytes: 265_142_477, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 2_294_743 - }, - rss: { - bytes: 340_623 - }, - pagefaults: 224_530, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - } - ] -) -puts response ----- diff --git a/docs/examples/guide/40bd86e400d27e68b8f0ae580c29d32d.asciidoc b/docs/examples/guide/40bd86e400d27e68b8f0ae580c29d32d.asciidoc deleted file mode 100644 index effcefe316..0000000000 --- a/docs/examples/guide/40bd86e400d27e68b8f0ae580c29d32d.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cluster.stats( - human: true, - filter_path: 'indices.mappings.total_deduplicated_mapping_size*' -) -puts response ----- diff --git a/docs/examples/guide/40d90d9dc6f4942bf92d88bfc5a34672.asciidoc b/docs/examples/guide/40d90d9dc6f4942bf92d88bfc5a34672.asciidoc deleted file mode 100644 index 45f8b72514..0000000000 --- a/docs/examples/guide/40d90d9dc6f4942bf92d88bfc5a34672.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match_bool_prefix: { - message: { - query: 'quick brown f', - analyzer: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/40f97f70e8e743c6a6296c81b920aeb0.asciidoc b/docs/examples/guide/40f97f70e8e743c6a6296c81b920aeb0.asciidoc deleted file mode 100644 index 657963768f..0000000000 --- a/docs/examples/guide/40f97f70e8e743c6a6296c81b920aeb0.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - human: true, - filter_path: 'nodes.*.name,nodes.*.indices.mappings.total_estimated_overhead*,nodes.*.jvm.mem.heap_max*' -) -puts response ----- diff --git a/docs/examples/guide/4113c57384aa37c58d11579e20c00760.asciidoc b/docs/examples/guide/4113c57384aa37c58d11579e20c00760.asciidoc deleted file mode 100644 index 5689401c7e..0000000000 --- a/docs/examples/guide/4113c57384aa37c58d11579e20c00760.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'my-index-000001', - id: 0, - _source: false -) -puts response ----- diff --git a/docs/examples/guide/41175d304e660da2931764f9a4418fd3.asciidoc b/docs/examples/guide/41175d304e660da2931764f9a4418fd3.asciidoc deleted file mode 100644 index 4ea20b6a83..0000000000 --- a/docs/examples/guide/41175d304e660da2931764f9a4418fd3.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_pipeline( - connector_id: 'my-connector', - body: { - pipeline: { - extract_binary_content: true, - name: 'my-connector-pipeline', - reduce_whitespace: true, - run_ml_inference: true - } - } -) -puts response ----- diff --git a/docs/examples/guide/412f8238ab5182678f1d8f6383031b11.asciidoc b/docs/examples/guide/412f8238ab5182678f1d8f6383031b11.asciidoc deleted file mode 100644 index 1205251e4a..0000000000 --- a/docs/examples/guide/412f8238ab5182678f1d8f6383031b11.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_alias( - index: 'my-data-stream', - name: 'my-alias' -) -puts response ----- diff --git a/docs/examples/guide/415b46bc2b7a7b4dcf9a73ac67ea20e9.asciidoc b/docs/examples/guide/415b46bc2b7a7b4dcf9a73ac67ea20e9.asciidoc deleted file mode 100644 index 5aad5ddde3..0000000000 --- a/docs/examples/guide/415b46bc2b7a7b4dcf9a73ac67ea20e9.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'circles', - id: 2, - pipeline: 'polygonize_circles', - body: { - circle: { - type: 'circle', - radius: '40m', - coordinates: [ - 30, - 10 - ] - } - } -) -puts response - -response = client.get( - index: 'circles', - id: 2 -) -puts response ----- diff --git a/docs/examples/guide/416a3ba11232d3c078c1c31340cf356f.asciidoc b/docs/examples/guide/416a3ba11232d3c078c1c31340cf356f.asciidoc deleted file mode 100644 index 3861cb273c..0000000000 --- a/docs/examples/guide/416a3ba11232d3c078c1c31340cf356f.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - highlight: { - tags_schema: 'styled', - fields: { - comment: {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/41ad6077f9c1b8d8fefab6ea1660edcd.asciidoc b/docs/examples/guide/41ad6077f9c1b8d8fefab6ea1660edcd.asciidoc deleted file mode 100644 index 17a6aaac08..0000000000 --- a/docs/examples/guide/41ad6077f9c1b8d8fefab6ea1660edcd.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - date: { - type: 'date', - format: 'yyyy-MM-dd' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/41dbd79f624b998d01c10921e9a35c4b.asciidoc b/docs/examples/guide/41dbd79f624b998d01c10921e9a35c4b.asciidoc deleted file mode 100644 index 87a4c64d28..0000000000 --- a/docs/examples/guide/41dbd79f624b998d01c10921e9a35c4b.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'test', - id: 1, - body: { - doc: { - name: 'new_name' - }, - detect_noop: false - } -) -puts response ----- diff --git a/docs/examples/guide/4207219a892339e8f3abe0df8723dd27.asciidoc b/docs/examples/guide/4207219a892339e8f3abe0df8723dd27.asciidoc deleted file mode 100644 index 0a4f6fda0e..0000000000 --- a/docs/examples/guide/4207219a892339e8f3abe0df8723dd27.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.metadata.administrator' => 'sysadmin@example.com' - } - } -) -puts response ----- diff --git a/docs/examples/guide/421e68e2b9789f0e8c08760d9e685d1c.asciidoc b/docs/examples/guide/421e68e2b9789f0e8c08760d9e685d1c.asciidoc deleted file mode 100644 index 4aed069f41..0000000000 --- a/docs/examples/guide/421e68e2b9789f0e8c08760d9e685d1c.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.ml.update_job( - job_id: 'low_request_rate', - body: { - description: 'An updated job', - detectors: { - detector_index: 0, - description: 'An updated detector description' - }, - groups: [ - 'kibana_sample_data', - 'kibana_sample_web_logs' - ], - model_plot_config: { - enabled: true - }, - renormalization_window_days: 30, - background_persist_interval: '2h', - model_snapshot_retention_days: 7, - results_retention_days: 60 - } -) -puts response ----- diff --git a/docs/examples/guide/424fbf082cd4affb84439abfc916b597.asciidoc b/docs/examples/guide/424fbf082cd4affb84439abfc916b597.asciidoc deleted file mode 100644 index 83c0058482..0000000000 --- a/docs/examples/guide/424fbf082cd4affb84439abfc916b597.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.indices.downsample( - index: 'my-time-series-index', - target_index: 'my-downsampled-time-series-index', - body: { - fixed_interval: '1d' - } -) -puts response ----- diff --git a/docs/examples/guide/425eaaf9c7e3b1e77a3474fbab4183b4.asciidoc b/docs/examples/guide/425eaaf9c7e3b1e77a3474fbab4183b4.asciidoc deleted file mode 100644 index 8ca234d054..0000000000 --- a/docs/examples/guide/425eaaf9c7e3b1e77a3474fbab4183b4.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.thread_pool( - v: true, - s: 't,n', - h: 'type,name,node_name,active,queue,rejected,completed' -) -puts response ----- diff --git a/docs/examples/guide/4275ecbe4aa68d43a8a7139866610a27.asciidoc b/docs/examples/guide/4275ecbe4aa68d43a8a7139866610a27.asciidoc deleted file mode 100644 index 1e7cb4448b..0000000000 --- a/docs/examples/guide/4275ecbe4aa68d43a8a7139866610a27.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'exams', - body: { - size: 0, - aggregations: { - weighted_grade: { - weighted_avg: { - value: { - field: 'grade' - }, - weight: { - field: 'weight' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/42ba7c1d13aee91fe6f0a8a42c30eb74.asciidoc b/docs/examples/guide/42ba7c1d13aee91fe6f0a8a42c30eb74.asciidoc deleted file mode 100644 index 0fa4e9159d..0000000000 --- a/docs/examples/guide/42ba7c1d13aee91fe6f0a8a42c30eb74.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.rollover( - alias: 'my-data-stream', - lazy: true -) -puts response ----- diff --git a/docs/examples/guide/42bc7608bb675dd6238e2fecbb758d06.asciidoc b/docs/examples/guide/42bc7608bb675dd6238e2fecbb758d06.asciidoc deleted file mode 100644 index 7983a3273e..0000000000 --- a/docs/examples/guide/42bc7608bb675dd6238e2fecbb758d06.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'postal_codes', - id: 1, - refresh: 'wait_for', - body: { - location: { - type: 'envelope', - coordinates: [ - [ - 13, - 53 - ], - [ - 14, - 52 - ] - ] - }, - postal_code: '96598' - } -) -puts response ----- diff --git a/docs/examples/guide/42d02087f1c8ab0452ef373079a76843.asciidoc b/docs/examples/guide/42d02087f1c8ab0452ef373079a76843.asciidoc deleted file mode 100644 index dbe6d8e0d9..0000000000 --- a/docs/examples/guide/42d02087f1c8ab0452ef373079a76843.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - analyzer: 'stop', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/42deb4fe32afbe0f94185e256a79c447.asciidoc b/docs/examples/guide/42deb4fe32afbe0f94185e256a79c447.asciidoc deleted file mode 100644 index f9b64980cf..0000000000 --- a/docs/examples/guide/42deb4fe32afbe0f94185e256a79c447.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'stop_example', - body: { - settings: { - analysis: { - filter: { - english_stop: { - type: 'stop', - stopwords: '_english_' - } - }, - analyzer: { - rebuilt_stop: { - tokenizer: 'lowercase', - filter: [ - 'english_stop' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4301cb9d970ec65778f91ce1f438e0d5.asciidoc b/docs/examples/guide/4301cb9d970ec65778f91ce1f438e0d5.asciidoc deleted file mode 100644 index f317fde422..0000000000 --- a/docs/examples/guide/4301cb9d970ec65778f91ce1f438e0d5.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.update_aliases( - body: { - actions: [ - { - add: { - index: 'logs-nginx.access-prod', - alias: 'logs' - } - }, - { - add: { - index: 'logs-my_app-default', - alias: 'logs', - is_write_index: true - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/430705509f8367aef92be413f702520b.asciidoc b/docs/examples/guide/430705509f8367aef92be413f702520b.asciidoc deleted file mode 100644 index 50cefc667e..0000000000 --- a/docs/examples/guide/430705509f8367aef92be413f702520b.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_status( - connector_id: 'my-connector', - body: { - status: 'needs_configuration' - } -) -puts response ----- diff --git a/docs/examples/guide/4323f6d224847eccdce59c23e33fda0a.asciidoc b/docs/examples/guide/4323f6d224847eccdce59c23e33fda0a.asciidoc deleted file mode 100644 index 609c4a9e15..0000000000 --- a/docs/examples/guide/4323f6d224847eccdce59c23e33fda0a.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'cjk_bigram_example', - body: { - settings: { - analysis: { - analyzer: { - standard_cjk_bigram: { - tokenizer: 'standard', - filter: [ - 'cjk_bigram' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/433cf45a23decdf3a096016ffaaf26ba.asciidoc b/docs/examples/guide/433cf45a23decdf3a096016ffaaf26ba.asciidoc deleted file mode 100644 index 6ab9e337d6..0000000000 --- a/docs/examples/guide/433cf45a23decdf3a096016ffaaf26ba.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.update_aliases( - body: { - actions: [ - { - add: { - index: 'my-index-2099.05.06-000001', - alias: 'my-alias', - search_routing: '1', - index_routing: '2' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/4342ccf6cc24fd80bd3cd1f9a4c2ef8e.asciidoc b/docs/examples/guide/4342ccf6cc24fd80bd3cd1f9a4c2ef8e.asciidoc deleted file mode 100644 index 13ae307a12..0000000000 --- a/docs/examples/guide/4342ccf6cc24fd80bd3cd1f9a4c2ef8e.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.clear_scroll( - body: { - scroll_id: [ - 'DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==', - 'DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/435e0d6a7d86e074d572d9671b7b9676.asciidoc b/docs/examples/guide/435e0d6a7d86e074d572d9671b7b9676.asciidoc deleted file mode 100644 index 7599f6105f..0000000000 --- a/docs/examples/guide/435e0d6a7d86e074d572d9671b7b9676.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'Polygon', - coordinates: [ - [ - [ - 100, - 0 - ], - [ - 101, - 0 - ], - [ - 101, - 1 - ], - [ - 100, - 1 - ], - [ - 100, - 0 - ] - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/436d50b85fc8f0977d02059eec00719b.asciidoc b/docs/examples/guide/436d50b85fc8f0977d02059eec00719b.asciidoc deleted file mode 100644 index 02a4919d8e..0000000000 --- a/docs/examples/guide/436d50b85fc8f0977d02059eec00719b.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'test', - id: 1, - body: { - script: { - source: 'ctx._source.counter += params.count', - lang: 'painless', - params: { - count: 4 - } - }, - upsert: { - counter: 1 - } - } -) -puts response ----- diff --git a/docs/examples/guide/43854be6aae61edbea5f9ab988cb4ce5.asciidoc b/docs/examples/guide/43854be6aae61edbea5f9ab988cb4ce5.asciidoc deleted file mode 100644 index d870920056..0000000000 --- a/docs/examples/guide/43854be6aae61edbea5f9ab988cb4ce5.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'xpack.security.transport.filter.allow' => '172.16.0.0/24' - } - } -) -puts response ----- diff --git a/docs/examples/guide/43e86fbaeed068dcc981214338559b5a.asciidoc b/docs/examples/guide/43e86fbaeed068dcc981214338559b5a.asciidoc deleted file mode 100644 index ae3738c9fe..0000000000 --- a/docs/examples/guide/43e86fbaeed068dcc981214338559b5a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.resolve_cluster( - name: 'my-index-*,cluster*:my-index-*' -) -puts response ----- diff --git a/docs/examples/guide/43fe75fa9f3fca846598fdad58fd98cb.asciidoc b/docs/examples/guide/43fe75fa9f3fca846598fdad58fd98cb.asciidoc deleted file mode 100644 index 19a88c0c8d..0000000000 --- a/docs/examples/guide/43fe75fa9f3fca846598fdad58fd98cb.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.xpack.usage -puts response ----- diff --git a/docs/examples/guide/441be98c597698bb2809372abf086c3e.asciidoc b/docs/examples/guide/441be98c597698bb2809372abf086c3e.asciidoc deleted file mode 100644 index 738183d76d..0000000000 --- a/docs/examples/guide/441be98c597698bb2809372abf086c3e.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - histogram_titles: { - terms: { - field: 'my_text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/441f330f6872f995769db1ce2b9627e2.asciidoc b/docs/examples/guide/441f330f6872f995769db1ce2b9627e2.asciidoc deleted file mode 100644 index 6d1aa5f9a3..0000000000 --- a/docs/examples/guide/441f330f6872f995769db1ce2b9627e2.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - stored_fields: [], - query: { - term: { - user: 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/44231f7cdd5c3a21025861cdef31e355.asciidoc b/docs/examples/guide/44231f7cdd5c3a21025861cdef31e355.asciidoc deleted file mode 100644 index 3a3a7feda0..0000000000 --- a/docs/examples/guide/44231f7cdd5c3a21025861cdef31e355.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.shrink( - index: 'my-index', - target: 'my-shrunken-index' -) -puts response ----- diff --git a/docs/examples/guide/4427517dcd8ec9997541150cdc11a0de.asciidoc b/docs/examples/guide/4427517dcd8ec9997541150cdc11a0de.asciidoc deleted file mode 100644 index 7818ddb3b2..0000000000 --- a/docs/examples/guide/4427517dcd8ec9997541150cdc11a0de.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.delete_repository( - repository: 'my-repo' -) -puts response ----- diff --git a/docs/examples/guide/4435b654994b575ba181ea679871c78c.asciidoc b/docs/examples/guide/4435b654994b575ba181ea679871c78c.asciidoc deleted file mode 100644 index b39662fadc..0000000000 --- a/docs/examples/guide/4435b654994b575ba181ea679871c78c.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/443dd902f64b3217505c9595839c3b2d.asciidoc b/docs/examples/guide/443dd902f64b3217505c9595839c3b2d.asciidoc deleted file mode 100644 index 92b02bc1c5..0000000000 --- a/docs/examples/guide/443dd902f64b3217505c9595839c3b2d.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - indices_boost: [ - { - "my-alias": 1.4 - }, - { - "my-index*": 1.3 - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/443e8da9968f1c65f46a2a65a1e1e078.asciidoc b/docs/examples/guide/443e8da9968f1c65f46a2a65a1e1e078.asciidoc deleted file mode 100644 index 8ef1002f6a..0000000000 --- a/docs/examples/guide/443e8da9968f1c65f46a2a65a1e1e078.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'my-weather-sensor-index-template', - body: { - index_patterns: [ - 'metrics-weather_sensors-*' - ], - data_stream: {}, - template: { - settings: { - 'index.mode' => 'time_series', - 'index.lifecycle.name' => 'my-lifecycle-policy' - }, - mappings: { - properties: { - sensor_id: { - type: 'keyword', - time_series_dimension: true - }, - location: { - type: 'keyword', - time_series_dimension: true - }, - temperature: { - type: 'half_float', - time_series_metric: 'gauge' - }, - humidity: { - type: 'half_float', - time_series_metric: 'gauge' - }, - "@timestamp": { - type: 'date' - } - } - } - }, - priority: 500, - _meta: { - description: 'Template for my weather sensor data' - } - } -) -puts response ----- diff --git a/docs/examples/guide/443f0e8fbba83777b2df624879d188d5.asciidoc b/docs/examples/guide/443f0e8fbba83777b2df624879d188d5.asciidoc deleted file mode 100644 index 15426aec49..0000000000 --- a/docs/examples/guide/443f0e8fbba83777b2df624879d188d5.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - wait_for_completion: false, - body: { - source: { - index: 'test-data', - size: 50 - }, - dest: { - index: 'azure-openai-embeddings', - pipeline: 'azure_openai_embeddings' - } - } -) -puts response ----- diff --git a/docs/examples/guide/445f8a6ef75fb43da52990b3a9063c78.asciidoc b/docs/examples/guide/445f8a6ef75fb43da52990b3a9063c78.asciidoc deleted file mode 100644 index 1a881320d7..0000000000 --- a/docs/examples/guide/445f8a6ef75fb43da52990b3a9063c78.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - 'http.responses' => '304' - } - }, - fields: [ - 'http.client_ip', - 'timestamp', - 'http.verb' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/446e8fc8ccfb13bb5ec64e32a5676d18.asciidoc b/docs/examples/guide/446e8fc8ccfb13bb5ec64e32a5676d18.asciidoc deleted file mode 100644 index 13876fc00e..0000000000 --- a/docs/examples/guide/446e8fc8ccfb13bb5ec64e32a5676d18.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'elision' - ], - text: 'j’examine près du wharf' - } -) -puts response ----- diff --git a/docs/examples/guide/4479e8c63a04fa22207a6a8803eadcad.asciidoc b/docs/examples/guide/4479e8c63a04fa22207a6a8803eadcad.asciidoc deleted file mode 100644 index d6abceee23..0000000000 --- a/docs/examples/guide/4479e8c63a04fa22207a6a8803eadcad.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.awareness.attributes' => 'rack_id' - } - } -) -puts response ----- diff --git a/docs/examples/guide/44939997b0f2601f82a93585a879f65a.asciidoc b/docs/examples/guide/44939997b0f2601f82a93585a879f65a.asciidoc deleted file mode 100644 index f4f66c6b7d..0000000000 --- a/docs/examples/guide/44939997b0f2601f82a93585a879f65a.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'my_tokenizer' - } - }, - tokenizer: { - my_tokenizer: { - type: 'simple_pattern_split', - pattern: '_' - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_analyzer', - text: 'an_underscored_phrase' - } -) -puts response ----- diff --git a/docs/examples/guide/4498b9d3b0c77e1b9ef6664ff5963ce2.asciidoc b/docs/examples/guide/4498b9d3b0c77e1b9ef6664ff5963ce2.asciidoc deleted file mode 100644 index d28fe1e8ef..0000000000 --- a/docs/examples/guide/4498b9d3b0c77e1b9ef6664ff5963ce2.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - 'index.requests.cache.enable' => false - } - } -) -puts response ----- diff --git a/docs/examples/guide/44b8a236d7cfb31c43c6d066ae16d8cd.asciidoc b/docs/examples/guide/44b8a236d7cfb31c43c6d066ae16d8cd.asciidoc deleted file mode 100644 index 177ea562b0..0000000000 --- a/docs/examples/guide/44b8a236d7cfb31c43c6d066ae16d8cd.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - profile: true, - query: { - match: { - message: 'GET /search' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/44bca3f17d403517af3616754dc795bb.asciidoc b/docs/examples/guide/44bca3f17d403517af3616754dc795bb.asciidoc deleted file mode 100644 index 1eb1892961..0000000000 --- a/docs/examples/guide/44bca3f17d403517af3616754dc795bb.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.explain( - index: 'my-index-000001', - id: 0, - body: { - query: { - script_score: { - query: { - match: { - message: 'elasticsearch' - } - }, - script: { - source: "\n long count = doc['count'].value;\n double normalizedCount = count / 10;\n if (explanation != nil) {\n explanation.set('normalized count = count / 10 = ' + count + ' / 10 = ' + normalizedCount);\n }\n return normalizedCount;\n " - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/44da736ce0e1587c1e7c45eee606ead7.asciidoc b/docs/examples/guide/44da736ce0e1587c1e7c45eee606ead7.asciidoc deleted file mode 100644 index 275b20b224..0000000000 --- a/docs/examples/guide/44da736ce0e1587c1e7c45eee606ead7.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'my-index-000001', - body: { - script: { - source: 'ctx._source.count++', - lang: 'painless' - }, - query: { - term: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/44db41b8465af951e366da97ade63bc1.asciidoc b/docs/examples/guide/44db41b8465af951e366da97ade63bc1.asciidoc deleted file mode 100644 index 07fa5f7c1f..0000000000 --- a/docs/examples/guide/44db41b8465af951e366da97ade63bc1.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.reload_search_analyzers( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/44dd65d69267017fa2fb2cffadef40bb.asciidoc b/docs/examples/guide/44dd65d69267017fa2fb2cffadef40bb.asciidoc deleted file mode 100644 index 5cc46f2459..0000000000 --- a/docs/examples/guide/44dd65d69267017fa2fb2cffadef40bb.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - runtime_mappings: { - type_and_promoted: { - type: 'keyword', - script: "emit(doc['type'].value + ' ' + doc['promoted'].value)" - } - }, - aggregations: { - type_promoted_count: { - cardinality: { - field: 'type_and_promoted' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/44dfac5bc3131014e2c6bb1ebc76b33d.asciidoc b/docs/examples/guide/44dfac5bc3131014e2c6bb1ebc76b33d.asciidoc deleted file mode 100644 index 654d6e050f..0000000000 --- a/docs/examples/guide/44dfac5bc3131014e2c6bb1ebc76b33d.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index_double', - body: { - mappings: { - properties: { - field: { - type: 'double' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/451b441c3311103d0d2bdbab771b26d2.asciidoc b/docs/examples/guide/451b441c3311103d0d2bdbab771b26d2.asciidoc deleted file mode 100644 index b0001c15d6..0000000000 --- a/docs/examples/guide/451b441c3311103d0d2bdbab771b26d2.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.put_script( - id: 'my-search-template', - body: { - script: { - lang: 'mustache', - source: "\n {\n \"query\": {\n \"match\": {\n {{=( )=}}\n \"message\": \"(query_string)\"\n (={{ }}=)\n }\n }\n }\n " - } - } -) -puts response ----- diff --git a/docs/examples/guide/451e7c29b2cf738cfc822f7c175bef56.asciidoc b/docs/examples/guide/451e7c29b2cf738cfc822f7c175bef56.asciidoc deleted file mode 100644 index 36eb2823df..0000000000 --- a/docs/examples/guide/451e7c29b2cf738cfc822f7c175bef56.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'my-index-template', - body: { - index_patterns: [ - 'my-data-stream*' - ], - data_stream: {}, - priority: 500, - template: { - lifecycle: { - data_retention: '7d' - } - }, - _meta: { - description: 'Template with data stream lifecycle' - } - } -) -puts response ----- diff --git a/docs/examples/guide/452a61fecda86dd5539451dd57ec73a9.asciidoc b/docs/examples/guide/452a61fecda86dd5539451dd57ec73a9.asciidoc deleted file mode 100644 index 764336f6de..0000000000 --- a/docs/examples/guide/452a61fecda86dd5539451dd57ec73a9.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-image-index', - body: { - size: 3, - query: { - bool: { - should: [ - { - match: { - title: { - query: 'mountain lake', - boost: 1 - } - } - }, - { - knn: { - field: 'image-vector', - query_vector: [ - -5, - 9, - -12 - ], - num_candidates: 10, - boost: 2 - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/45499ed1824d1d7cb59972580d2344cb.asciidoc b/docs/examples/guide/45499ed1824d1d7cb59972580d2344cb.asciidoc deleted file mode 100644 index 2b290f3903..0000000000 --- a/docs/examples/guide/45499ed1824d1d7cb59972580d2344cb.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_index', - body: { - query: { - range: { - my_counter: { - gte: '9223372036854775808', - lte: '18446744073709551615' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/455029c3d66306ad5d48f6dbddaf7324.asciidoc b/docs/examples/guide/455029c3d66306ad5d48f6dbddaf7324.asciidoc deleted file mode 100644 index e662f4c869..0000000000 --- a/docs/examples/guide/455029c3d66306ad5d48f6dbddaf7324.asciidoc +++ /dev/null @@ -1,84 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'metrics_index', - body: { - mappings: { - properties: { - latency_histo: { - type: 'histogram' - } - } - } - } -) -puts response - -response = client.index( - index: 'metrics_index', - id: 1, - refresh: true, - body: { - 'network.name' => 'net-1', - latency_histo: { - values: [ - 0.1, - 0.2, - 0.3, - 0.4, - 0.5 - ], - counts: [ - 3, - 7, - 23, - 12, - 6 - ] - } - } -) -puts response - -response = client.index( - index: 'metrics_index', - id: 2, - refresh: true, - body: { - 'network.name' => 'net-2', - latency_histo: { - values: [ - 0.1, - 0.2, - 0.3, - 0.4, - 0.5 - ], - counts: [ - 8, - 17, - 8, - 7, - 6 - ] - } - } -) -puts response - -response = client.search( - index: 'metrics_index', - size: 0, - filter_path: 'aggregations', - body: { - aggregations: { - total_latency: { - sum: { - field: 'latency_histo' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4553e0acb6336687d61eaecc73f517b7.asciidoc b/docs/examples/guide/4553e0acb6336687d61eaecc73f517b7.asciidoc deleted file mode 100644 index 9329306cb1..0000000000 --- a/docs/examples/guide/4553e0acb6336687d61eaecc73f517b7.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'standard', - char_filter: [ - 'my_mappings_char_filter' - ] - } - }, - char_filter: { - my_mappings_char_filter: { - type: 'mapping', - mappings: [ - ':) => _happy_', - ':( => _sad_' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/45813d971bfa890ffa2f51f3f480cce5.asciidoc b/docs/examples/guide/45813d971bfa890ffa2f51f3f480cce5.asciidoc deleted file mode 100644 index efd3caa72d..0000000000 --- a/docs/examples/guide/45813d971bfa890ffa2f51f3f480cce5.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'test_index', - body: { - query: { - percolate: { - field: 'query', - document: { - body: 'Bycicles are missing' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/45b74f1904533fdb37a5a6f3c8f4ec9b.asciidoc b/docs/examples/guide/45b74f1904533fdb37a5a6f3c8f4ec9b.asciidoc deleted file mode 100644 index 8c785ba1e7..0000000000 --- a/docs/examples/guide/45b74f1904533fdb37a5a6f3c8f4ec9b.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'my_tokenizer' - } - }, - tokenizer: { - my_tokenizer: { - type: 'edge_ngram', - min_gram: 2, - max_gram: 10, - token_chars: [ - 'letter', - 'digit' - ] - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_analyzer', - text: '2 Quick Foxes.' - } -) -puts response ----- diff --git a/docs/examples/guide/45c6e54a9c9e08623af96752b4bde346.asciidoc b/docs/examples/guide/45c6e54a9c9e08623af96752b4bde346.asciidoc deleted file mode 100644 index 7305b24a17..0000000000 --- a/docs/examples/guide/45c6e54a9c9e08623af96752b4bde346.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_distance: { - distance: '12km', - 'pin.location' => 'POINT (-70 40)' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/45ef5156dbd2d3fd4fd22b8d99f7aad4.asciidoc b/docs/examples/guide/45ef5156dbd2d3fd4fd22b8d99f7aad4.asciidoc deleted file mode 100644 index 2296b26fd4..0000000000 --- a/docs/examples/guide/45ef5156dbd2d3fd4fd22b8d99f7aad4.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.enable' => nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/46103fee3cd5f53dc75123def82d52ad.asciidoc b/docs/examples/guide/46103fee3cd5f53dc75123def82d52ad.asciidoc deleted file mode 100644 index 29176ceb6c..0000000000 --- a/docs/examples/guide/46103fee3cd5f53dc75123def82d52ad.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'my-data-stream-template', - body: { - index_patterns: [ - 'my-data-stream*' - ], - data_stream: {}, - priority: 500, - template: { - settings: { - 'index.refresh_interval' => '30s' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/464dffb6a6e24a860223d1c32b232f95.asciidoc b/docs/examples/guide/464dffb6a6e24a860223d1c32b232f95.asciidoc deleted file mode 100644 index 69b0198a44..0000000000 --- a/docs/examples/guide/464dffb6a6e24a860223d1c32b232f95.asciidoc +++ /dev/null @@ -1,45 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - filter: { - my_shingle_filter: { - type: 'shingle', - min_shingle_size: 5, - max_shingle_size: 5, - output_unigrams: false - }, - my_minhash_filter: { - type: 'min_hash', - hash_count: 1, - bucket_count: 512, - hash_set_size: 1, - with_rotation: true - } - }, - analyzer: { - my_analyzer: { - tokenizer: 'standard', - filter: [ - 'my_shingle_filter', - 'my_minhash_filter' - ] - } - } - } - }, - mappings: { - properties: { - fingerprint: { - type: 'text', - analyzer: 'my_analyzer' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4655c3dea0c61935b7ecf1e57441df66.asciidoc b/docs/examples/guide/4655c3dea0c61935b7ecf1e57441df66.asciidoc deleted file mode 100644 index dbedd0f49a..0000000000 --- a/docs/examples/guide/4655c3dea0c61935b7ecf1e57441df66.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.thread_pool( - v: true, - h: 'id,name,active,rejected,completed' -) -puts response ----- diff --git a/docs/examples/guide/4659f639d71a54df571260ee5798dbb3.asciidoc b/docs/examples/guide/4659f639d71a54df571260ee5798dbb3.asciidoc deleted file mode 100644 index c454ae8f53..0000000000 --- a/docs/examples/guide/4659f639d71a54df571260ee5798dbb3.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - "zoomed-in": { - filter: { - geo_bounding_box: { - location: { - top_left: 'POINT (4.9 52.4)', - bottom_right: 'POINT (5.0 52.3)' - } - } - }, - aggregations: { - "zoom1": { - geotile_grid: { - field: 'location', - precision: 22 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/46658f00edc4865dfe472a392374cd0f.asciidoc b/docs/examples/guide/46658f00edc4865dfe472a392374cd0f.asciidoc deleted file mode 100644 index c7afb295c5..0000000000 --- a/docs/examples/guide/46658f00edc4865dfe472a392374cd0f.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_template( - name: 'template_1', - filter_path: '*.version' -) -puts response ----- diff --git a/docs/examples/guide/4670dd81a9865e07ae74ae8b0266e384.asciidoc b/docs/examples/guide/4670dd81a9865e07ae74ae8b0266e384.asciidoc deleted file mode 100644 index 002b08a594..0000000000 --- a/docs/examples/guide/4670dd81a9865e07ae74ae8b0266e384.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'node_upgrade', - body: { - size: 0, - runtime_mappings: { - 'startup_time_before.adjusted' => { - type: 'long', - script: { - source: "emit(doc['startup_time_before'].value - params.adjustment)", - params: { - adjustment: 10 - } - } - } - }, - aggregations: { - startup_time_ttest: { - t_test: { - a: { - field: 'startup_time_before.adjusted' - }, - b: { - field: 'startup_time_after' - }, - type: 'paired' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/467833bd44b35a89a7fe0d7df5f253f1.asciidoc b/docs/examples/guide/467833bd44b35a89a7fe0d7df5f253f1.asciidoc deleted file mode 100644 index 3c74831fa9..0000000000 --- a/docs/examples/guide/467833bd44b35a89a7fe0d7df5f253f1.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - analyzer: 'pattern', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/468f7ec42cdd8287cdea3ec1cea4a514.asciidoc b/docs/examples/guide/468f7ec42cdd8287cdea3ec1cea4a514.asciidoc deleted file mode 100644 index 424e28491e..0000000000 --- a/docs/examples/guide/468f7ec42cdd8287cdea3ec1cea4a514.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'my-index-000001', - id: 1, - body: { - script: { - source: "if (ctx._source.tags.contains(params['tag'])) { ctx._source.tags.remove(ctx._source.tags.indexOf(params['tag'])) }", - lang: 'painless', - params: { - tag: 'blue' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/46c5c14f20118dcf519ff6ef21360209.asciidoc b/docs/examples/guide/46c5c14f20118dcf519ff6ef21360209.asciidoc deleted file mode 100644 index d97158b137..0000000000 --- a/docs/examples/guide/46c5c14f20118dcf519ff6ef21360209.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'datastream_policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_docs: 1 - }, - downsample: { - fixed_interval: '1h' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/46ce40227fa60aa6ba435f366b3a1f5f.asciidoc b/docs/examples/guide/46ce40227fa60aa6ba435f366b3a1f5f.asciidoc deleted file mode 100644 index a0b861b246..0000000000 --- a/docs/examples/guide/46ce40227fa60aa6ba435f366b3a1f5f.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.ccr.pause_follow( - index: 'kibana_sample_data_ecommerce2' -) -puts response - -response = client.indices.close( - index: 'kibana_sample_data_ecommerce2' -) -puts response - -response = client.ccr.unfollow( - index: 'kibana_sample_data_ecommerce2' -) -puts response - -response = client.indices.open( - index: 'kibana_sample_data_ecommerce2' -) -puts response ----- diff --git a/docs/examples/guide/46ebd468c3f132a4978088964466c5cd.asciidoc b/docs/examples/guide/46ebd468c3f132a4978088964466c5cd.asciidoc deleted file mode 100644 index 77e40fe406..0000000000 --- a/docs/examples/guide/46ebd468c3f132a4978088964466c5cd.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'apostrophe_example', - body: { - settings: { - analysis: { - analyzer: { - standard_apostrophe: { - tokenizer: 'standard', - filter: [ - 'apostrophe' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/472ec8c57fec8457e31fe6dd7f6e3713.asciidoc b/docs/examples/guide/472ec8c57fec8457e31fe6dd7f6e3713.asciidoc deleted file mode 100644 index be39ef6de5..0000000000 --- a/docs/examples/guide/472ec8c57fec8457e31fe6dd7f6e3713.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - fields: [ - 'title' - ], - query: 'this that thus', - minimum_should_match: 2 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/473c8ddd4e4b7814a64e5fe40d9d6dca.asciidoc b/docs/examples/guide/473c8ddd4e4b7814a64e5fe40d9d6dca.asciidoc deleted file mode 100644 index 2667da9ed5..0000000000 --- a/docs/examples/guide/473c8ddd4e4b7814a64e5fe40d9d6dca.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.tasks.cancel( - task_id: '2j8UKw1bRO283PMwDugNNg:5326' -) -puts response ----- diff --git a/docs/examples/guide/4752f82fec8b46e5a4b3788b76e3041f.asciidoc b/docs/examples/guide/4752f82fec8b46e5a4b3788b76e3041f.asciidoc deleted file mode 100644 index 6c9507b258..0000000000 --- a/docs/examples/guide/4752f82fec8b46e5a4b3788b76e3041f.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - warm: { - actions: { - migrate: { - enabled: false - }, - allocate: { - include: { - rack_id: 'one,two' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/47fde7874e15a37242993fd69c62063b.asciidoc b/docs/examples/guide/47fde7874e15a37242993fd69c62063b.asciidoc deleted file mode 100644 index e4954120db..0000000000 --- a/docs/examples/guide/47fde7874e15a37242993fd69c62063b.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_ranks: { - percentile_ranks: { - field: 'load_time', - values: [ - 500, - 600 - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/480e531db799c4c909afd8e2a73a8d0b.asciidoc b/docs/examples/guide/480e531db799c4c909afd8e2a73a8d0b.asciidoc deleted file mode 100644 index 44d6386253..0000000000 --- a/docs/examples/guide/480e531db799c4c909afd8e2a73a8d0b.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.indices.forcemerge -puts response ----- diff --git a/docs/examples/guide/4818a1288ac24a56d6d6a4130ee70202.asciidoc b/docs/examples/guide/4818a1288ac24a56d6d6a4130ee70202.asciidoc deleted file mode 100644 index 8a90667d13..0000000000 --- a/docs/examples/guide/4818a1288ac24a56d6d6a4130ee70202.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.get_script( - id: 'my-search-template' -) -puts response ----- diff --git a/docs/examples/guide/4824a823a830a2a5d990eacfd783ac22.asciidoc b/docs/examples/guide/4824a823a830a2a5d990eacfd783ac22.asciidoc deleted file mode 100644 index a4ee8c04c5..0000000000 --- a/docs/examples/guide/4824a823a830a2a5d990eacfd783ac22.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -[source, ruby] ----- -response = client.delete_by_query( - index: 'my-index-000001', - body: { - slice: { - id: 0, - max: 2 - }, - query: { - range: { - 'http.response.bytes' => { - lt: 2_000_000 - } - } - } - } -) -puts response - -response = client.delete_by_query( - index: 'my-index-000001', - body: { - slice: { - id: 1, - max: 2 - }, - query: { - range: { - 'http.response.bytes' => { - lt: 2_000_000 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/48313f620c2871b6f4019b66be730109.asciidoc b/docs/examples/guide/48313f620c2871b6f4019b66be730109.asciidoc deleted file mode 100644 index d3dd8fd4a9..0000000000 --- a/docs/examples/guide/48313f620c2871b6f4019b66be730109.asciidoc +++ /dev/null @@ -1,44 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'shirts', - body: { - query: { - bool: { - filter: { - term: { - brand: 'gucci' - } - } - } - }, - aggregations: { - colors: { - terms: { - field: 'color' - } - }, - color_red: { - filter: { - term: { - color: 'red' - } - }, - aggregations: { - models: { - terms: { - field: 'model' - } - } - } - } - }, - post_filter: { - term: { - color: 'red' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/484e24d1ed1a154ba9753e6090d38d78.asciidoc b/docs/examples/guide/484e24d1ed1a154ba9753e6090d38d78.asciidoc deleted file mode 100644 index 9732d8b09b..0000000000 --- a/docs/examples/guide/484e24d1ed1a154ba9753e6090d38d78.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'point', - coordinates: [ - -377.03653, - 389.897676 - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/487f0e07fd83c05f9763e0795c525e2e.asciidoc b/docs/examples/guide/487f0e07fd83c05f9763e0795c525e2e.asciidoc deleted file mode 100644 index c0b6f657f8..0000000000 --- a/docs/examples/guide/487f0e07fd83c05f9763e0795c525e2e.asciidoc +++ /dev/null @@ -1,100 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - mappings: { - properties: { - my_location: { - type: 'geo_point' - }, - group: { - type: 'keyword' - }, - "@timestamp": { - type: 'date' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'test', - refresh: true, - body: [ - { - index: {} - }, - { - my_location: { - lat: 52.373184, - lon: 4.889187 - }, - "@timestamp": '2023-01-02T09:00:00Z' - }, - { - index: {} - }, - { - my_location: { - lat: 52.370159, - lon: 4.885057 - }, - "@timestamp": '2023-01-02T10:00:00Z' - }, - { - index: {} - }, - { - my_location: { - lat: 52.369219, - lon: 4.901618 - }, - "@timestamp": '2023-01-02T13:00:00Z' - }, - { - index: {} - }, - { - my_location: { - lat: 52.374081, - lon: 4.91235 - }, - "@timestamp": '2023-01-02T16:00:00Z' - }, - { - index: {} - }, - { - my_location: { - lat: 52.371667, - lon: 4.914722 - }, - "@timestamp": '2023-01-03T12:00:00Z' - } - ] -) -puts response - -response = client.search( - index: 'test', - filter_path: 'aggregations', - body: { - aggregations: { - line: { - geo_line: { - point: { - field: 'my_location' - }, - sort: { - field: '@timestamp' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/488f6df1df71972392b670ce557f7ff3.asciidoc b/docs/examples/guide/488f6df1df71972392b670ce557f7ff3.asciidoc deleted file mode 100644 index 279c46969a..0000000000 --- a/docs/examples/guide/488f6df1df71972392b670ce557f7ff3.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_template( - name: 'template_1', - body: { - index_patterns: [ - 'my-index-*' - ], - order: 0, - settings: { - number_of_shards: 1 - }, - version: 123 - } -) -puts response ----- diff --git a/docs/examples/guide/48d9697a14dfe131325521f48a7adc84.asciidoc b/docs/examples/guide/48d9697a14dfe131325521f48a7adc84.asciidoc deleted file mode 100644 index a67670c51d..0000000000 --- a/docs/examples/guide/48d9697a14dfe131325521f48a7adc84.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - id: 'my-search-template', - params: { - query_string: 'My string', - text_fields: [ - { - user_name: 'John', - last: false - }, - { - user_name: 'kimchy', - last: true - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/48de51de87a8ad9fd8b8db1ca25b85c1.asciidoc b/docs/examples/guide/48de51de87a8ad9fd8b8db1ca25b85c1.asciidoc deleted file mode 100644 index a6c6fa052b..0000000000 --- a/docs/examples/guide/48de51de87a8ad9fd8b8db1ca25b85c1.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.indices.close( - index: 'index' -) -puts response - -response = client.indices.put_settings( - index: 'index', - body: { - index: { - similarity: { - default: { - type: 'boolean' - } - } - } - } -) -puts response - -response = client.indices.open( - index: 'index' -) -puts response ----- diff --git a/docs/examples/guide/49100a4f53c0ba345fadacdc4f2f86e4.asciidoc b/docs/examples/guide/49100a4f53c0ba345fadacdc4f2f86e4.asciidoc deleted file mode 100644 index 77855fc38b..0000000000 --- a/docs/examples/guide/49100a4f53c0ba345fadacdc4f2f86e4.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.search( - q: 'kimchy', - filter_path: 'took,hits.hits._id,hits.hits._score' -) -puts response ----- diff --git a/docs/examples/guide/4955bae30f265b9e436f82b015de6d7e.asciidoc b/docs/examples/guide/4955bae30f265b9e436f82b015de6d7e.asciidoc deleted file mode 100644 index 76bc51ac1a..0000000000 --- a/docs/examples/guide/4955bae30f265b9e436f82b015de6d7e.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - pretty: true, - body: { - query: { - terms: { - color: { - index: 'my-index-000001', - id: '2', - path: 'color' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/496d35c89dc991a1509f7e8fb93ade45.asciidoc b/docs/examples/guide/496d35c89dc991a1509f7e8fb93ade45.asciidoc deleted file mode 100644 index 2363c1f7d1..0000000000 --- a/docs/examples/guide/496d35c89dc991a1509f7e8fb93ade45.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'bengali_example', - body: { - settings: { - analysis: { - filter: { - bengali_stop: { - type: 'stop', - stopwords: '_bengali_' - }, - bengali_keywords: { - type: 'keyword_marker', - keywords: [ - 'উদাহরণ' - ] - }, - bengali_stemmer: { - type: 'stemmer', - language: 'bengali' - } - }, - analyzer: { - rebuilt_bengali: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'decimal_digit', - 'bengali_keywords', - 'indic_normalization', - 'bengali_normalization', - 'bengali_stop', - 'bengali_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4980d6fcb369692b0b29ddc6767d4324.asciidoc b/docs/examples/guide/4980d6fcb369692b0b29ddc6767d4324.asciidoc deleted file mode 100644 index 506d8fd8d2..0000000000 --- a/docs/examples/guide/4980d6fcb369692b0b29ddc6767d4324.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.allocation_explain( - body: { - index: 'my-index-000001', - shard: 0, - primary: true - } -) -puts response ----- diff --git a/docs/examples/guide/4989cc97ce1c8fff634a10d343031bd0.asciidoc b/docs/examples/guide/4989cc97ce1c8fff634a10d343031bd0.asciidoc deleted file mode 100644 index 8cb146f43f..0000000000 --- a/docs/examples/guide/4989cc97ce1c8fff634a10d343031bd0.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.shards( - v: true, - h: 'state,node', - s: 'state' -) -puts response ----- diff --git a/docs/examples/guide/49c40b51da2469a6e00fea8fa6fbf56e.asciidoc b/docs/examples/guide/49c40b51da2469a6e00fea8fa6fbf56e.asciidoc deleted file mode 100644 index f9af00a733..0000000000 --- a/docs/examples/guide/49c40b51da2469a6e00fea8fa6fbf56e.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.tasks.list( - pretty: true, - detailed: true, - group_by: 'parents', - human: true, - actions: '*data/read/esql' -) -puts response ----- diff --git a/docs/examples/guide/49d87c2eb7314ed34221c5fb4f21dfcc.asciidoc b/docs/examples/guide/49d87c2eb7314ed34221c5fb4f21dfcc.asciidoc deleted file mode 100644 index 028f1e1fec..0000000000 --- a/docs/examples/guide/49d87c2eb7314ed34221c5fb4f21dfcc.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - index: 'analyze_sample', - body: { - normalizer: 'my_normalizer', - text: 'BaR' - } -) -puts response ----- diff --git a/docs/examples/guide/49e8773a34fcbf825de38426cff5509c.asciidoc b/docs/examples/guide/49e8773a34fcbf825de38426cff5509c.asciidoc deleted file mode 100644 index 84f90b742e..0000000000 --- a/docs/examples/guide/49e8773a34fcbf825de38426cff5509c.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-knn-index', - body: { - profile: true, - knn: { - field: 'my-vector', - query_vector: [ - -5, - 9, - -12 - ], - k: 3, - num_candidates: 100 - } - } -) -puts response ----- diff --git a/docs/examples/guide/49f4d2a461536d150e16b1e0a3148678.asciidoc b/docs/examples/guide/49f4d2a461536d150e16b1e0a3148678.asciidoc deleted file mode 100644 index 4c84e2853f..0000000000 --- a/docs/examples/guide/49f4d2a461536d150e16b1e0a3148678.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.clear_cache( - index: 'my-index-000001', - fielddata: true -) -puts response - -response = client.indices.clear_cache( - index: 'my-index-000001', - query: true -) -puts response - -response = client.indices.clear_cache( - index: 'my-index-000001', - request: true -) -puts response ----- diff --git a/docs/examples/guide/4a1951844bd39f26961bfc965f3432b1.asciidoc b/docs/examples/guide/4a1951844bd39f26961bfc965f3432b1.asciidoc deleted file mode 100644 index 24f7e8e1cd..0000000000 --- a/docs/examples/guide/4a1951844bd39f26961bfc965f3432b1.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.mget( - index: 'my-index-000001', - body: { - docs: [ - { - _id: '1' - }, - { - _id: '2' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/4a2080ae55d931eb0643cc3eb91ec524.asciidoc b/docs/examples/guide/4a2080ae55d931eb0643cc3eb91ec524.asciidoc deleted file mode 100644 index 9e6b20fe0d..0000000000 --- a/docs/examples/guide/4a2080ae55d931eb0643cc3eb91ec524.asciidoc +++ /dev/null @@ -1,57 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - text: { - type: 'text', - fields: { - english: { - type: 'text', - analyzer: 'english' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - text: 'quick brown fox' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - text: 'quick brown foxes' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - multi_match: { - query: 'quick brown foxes', - fields: [ - 'text', - 'text.english' - ], - type: 'most_fields' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4a7510a9c0468303658383c00796dad2.asciidoc b/docs/examples/guide/4a7510a9c0468303658383c00796dad2.asciidoc deleted file mode 100644 index e230d141be..0000000000 --- a/docs/examples/guide/4a7510a9c0468303658383c00796dad2.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - 'index.mapping.ignore_malformed' => true - }, - mappings: { - properties: { - number_one: { - type: 'byte' - }, - number_two: { - type: 'integer', - ignore_malformed: false - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4aa81a694266fb634904224d14cd9a87.asciidoc b/docs/examples/guide/4aa81a694266fb634904224d14cd9a87.asciidoc deleted file mode 100644 index 6c4dfccf9d..0000000000 --- a/docs/examples/guide/4aa81a694266fb634904224d14cd9a87.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_queries2', - body: { - query: { - percolate: { - field: 'query', - document: { - my_field: 'wxyz' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4ae494d1e62231e832fc0436b04e2014.asciidoc b/docs/examples/guide/4ae494d1e62231e832fc0436b04e2014.asciidoc deleted file mode 100644 index ebb5e33834..0000000000 --- a/docs/examples/guide/4ae494d1e62231e832fc0436b04e2014.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.validate_query( - index: 'my-index-000001', - body: { - query: { - bool: { - must: { - query_string: { - query: '*:*' - } - }, - filter: { - term: { - 'user.id' => 'kimchy' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4af15c4f26ddefb9c350e7a246a66a15.asciidoc b/docs/examples/guide/4af15c4f26ddefb9c350e7a246a66a15.asciidoc deleted file mode 100644 index 93fe623517..0000000000 --- a/docs/examples/guide/4af15c4f26ddefb9c350e7a246a66a15.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'node', - filter_path: 'aggregations', - body: { - aggregations: { - ip: { - terms: { - field: 'ip', - order: { - 'tm.m' => 'desc' - } - }, - aggregations: { - tm: { - top_metrics: { - metrics: { - field: 'm' - }, - sort: { - date: 'desc' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4b1044259a6d777d87529eae25675005.asciidoc b/docs/examples/guide/4b1044259a6d777d87529eae25675005.asciidoc deleted file mode 100644 index 5c6fc71ebe..0000000000 --- a/docs/examples/guide/4b1044259a6d777d87529eae25675005.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'set-foo', - body: { - description: 'sets foo', - processors: [ - { - set: { - field: 'foo', - value: 'bar' - } - } - ] - } -) -puts response - -response = client.update_by_query( - index: 'my-index-000001', - pipeline: 'set-foo' -) -puts response ----- diff --git a/docs/examples/guide/4b5110a21676cc0e26e050a4b4552235.asciidoc b/docs/examples/guide/4b5110a21676cc0e26e050a4b4552235.asciidoc deleted file mode 100644 index 2c4ab85194..0000000000 --- a/docs/examples/guide/4b5110a21676cc0e26e050a4b4552235.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.synonyms.get_synonym( - id: 'my-synonyms-set' -) -puts response ----- diff --git a/docs/examples/guide/4ba86373e13e106de044f190343be328.asciidoc b/docs/examples/guide/4ba86373e13e106de044f190343be328.asciidoc deleted file mode 100644 index b2e965fec7..0000000000 --- a/docs/examples/guide/4ba86373e13e106de044f190343be328.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - countries: { - terms: { - field: 'artist.country', - order: [ - { - "rock>playback_stats.avg": 'desc' - }, - { - _count: 'desc' - } - ] - }, - aggregations: { - rock: { - filter: { - term: { - genre: 'rock' - } - }, - aggregations: { - playback_stats: { - stats: { - field: 'play_count' - } - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4bb4a64cf04e3feb133b0221d29beaa9.asciidoc b/docs/examples/guide/4bb4a64cf04e3feb133b0221d29beaa9.asciidoc deleted file mode 100644 index f61e48259b..0000000000 --- a/docs/examples/guide/4bb4a64cf04e3feb133b0221d29beaa9.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.restore( - repository: 'my_repository', - snapshot: 'my_snapshot_2099.05.06', - body: { - indices: 'my-index,logs-my_app-default' - } -) -puts response ----- diff --git a/docs/examples/guide/4bb7bcfebca682fb9c9e3e47bfd5ef6f.asciidoc b/docs/examples/guide/4bb7bcfebca682fb9c9e3e47bfd5ef6f.asciidoc deleted file mode 100644 index 301781833b..0000000000 --- a/docs/examples/guide/4bb7bcfebca682fb9c9e3e47bfd5ef6f.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - track_total_hits: false, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - user_name: { - terms: { - field: 'user_name' - } - } - }, - { - date: { - date_histogram: { - field: 'timestamp', - calendar_interval: '1d', - order: 'desc' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4bba59cf745ac7b996bf90308bc26957.asciidoc b/docs/examples/guide/4bba59cf745ac7b996bf90308bc26957.asciidoc deleted file mode 100644 index 96d1027978..0000000000 --- a/docs/examples/guide/4bba59cf745ac7b996bf90308bc26957.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'file-path-test', - body: { - query: { - bool: { - must: { - match: { - file_path: '16' - } - }, - filter: { - term: { - 'file_path.tree' => '/User/alice' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4bc744b0f33b322741a8caf6d8d7d765.asciidoc b/docs/examples/guide/4bc744b0f33b322741a8caf6d8d7d765.asciidoc deleted file mode 100644 index 35f5d7c05b..0000000000 --- a/docs/examples/guide/4bc744b0f33b322741a8caf6d8d7d765.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - op_type: 'create', - body: { - "@timestamp": '2099-11-15T13:12:00', - message: 'GET /search HTTP/1.1 200 1070000', - user: { - id: 'kimchy' - } - } -) -puts response ----- diff --git a/docs/examples/guide/4bd42e31ac4a5cf237777f1a0e97aba8.asciidoc b/docs/examples/guide/4bd42e31ac4a5cf237777f1a0e97aba8.asciidoc deleted file mode 100644 index 8f1d21f09b..0000000000 --- a/docs/examples/guide/4bd42e31ac4a5cf237777f1a0e97aba8.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.transform.start_transform( - transform_id: 'suspicious_client_ips' -) -puts response ----- diff --git a/docs/examples/guide/4be07b34db282044c88d5021c7ea08ee.asciidoc b/docs/examples/guide/4be07b34db282044c88d5021c7ea08ee.asciidoc deleted file mode 100644 index 94812c0561..0000000000 --- a/docs/examples/guide/4be07b34db282044c88d5021c7ea08ee.asciidoc +++ /dev/null @@ -1,48 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index', - body: { - mappings: { - properties: { - my_vector: { - type: 'dense_vector', - dims: 3 - }, - my_text: { - type: 'keyword' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index', - id: 1, - body: { - my_text: 'text1', - my_vector: [ - 0.5, - 10, - 6 - ] - } -) -puts response - -response = client.index( - index: 'my-index', - id: 2, - body: { - my_text: 'text2', - my_vector: [ - -0.5, - 10, - 10 - ] - } -) -puts response ----- diff --git a/docs/examples/guide/4be20da16d2b58216e8b307218c7bf3a.asciidoc b/docs/examples/guide/4be20da16d2b58216e8b307218c7bf3a.asciidoc deleted file mode 100644 index 8410d14978..0000000000 --- a/docs/examples/guide/4be20da16d2b58216e8b307218c7bf3a.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'my-data-stream-template', - body: { - index_patterns: [ - 'my-data-stream*' - ], - data_stream: {}, - priority: 500, - template: { - mappings: { - properties: { - host: { - properties: { - ip: { - type: 'ip', - ignore_malformed: true - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4bf6bb703a52267379ae2b1e1308cf8b.asciidoc b/docs/examples/guide/4bf6bb703a52267379ae2b1e1308cf8b.asciidoc deleted file mode 100644 index fa3763f9be..0000000000 --- a/docs/examples/guide/4bf6bb703a52267379ae2b1e1308cf8b.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - bool: { - filter: { - script: { - script: { - source: "doc['num1'].value > params.param1", - lang: 'painless', - params: { - "param1": 5 - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4bfcb2861f1d572bd0d66acd66deab0b.asciidoc b/docs/examples/guide/4bfcb2861f1d572bd0d66acd66deab0b.asciidoc deleted file mode 100644 index 7a13e0c476..0000000000 --- a/docs/examples/guide/4bfcb2861f1d572bd0d66acd66deab0b.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.ml.update_datafeed( - datafeed_id: 'datafeed-test-job', - body: { - query: { - term: { - 'geo.src' => 'US' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4c174e228b6b74497b73ef2be80de7ad.asciidoc b/docs/examples/guide/4c174e228b6b74497b73ef2be80de7ad.asciidoc deleted file mode 100644 index c967f3b91f..0000000000 --- a/docs/examples/guide/4c174e228b6b74497b73ef2be80de7ad.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_trained_models -puts response ----- diff --git a/docs/examples/guide/4c3db8987d7b2d3d3df78ff1e71e7ede.asciidoc b/docs/examples/guide/4c3db8987d7b2d3d3df78ff1e71e7ede.asciidoc deleted file mode 100644 index eb2ab7a790..0000000000 --- a/docs/examples/guide/4c3db8987d7b2d3d3df78ff1e71e7ede.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - message: { - query: 'this is a test' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4c5f0d7af287618062bb627b44ccb23e.asciidoc b/docs/examples/guide/4c5f0d7af287618062bb627b44ccb23e.asciidoc deleted file mode 100644 index 768f90cb5c..0000000000 --- a/docs/examples/guide/4c5f0d7af287618062bb627b44ccb23e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.forcemerge( - index: 'my-index' -) -puts response ----- diff --git a/docs/examples/guide/4c712bd5637892a11f16b8975a0a98ed.asciidoc b/docs/examples/guide/4c712bd5637892a11f16b8975a0a98ed.asciidoc deleted file mode 100644 index d1700568b7..0000000000 --- a/docs/examples/guide/4c712bd5637892a11f16b8975a0a98ed.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.ml_data_frame_analytics( - v: true -) -puts response ----- diff --git a/docs/examples/guide/4c777b8360ef6c7671ae2e3803c0b0f6.asciidoc b/docs/examples/guide/4c777b8360ef6c7671ae2e3803c0b0f6.asciidoc deleted file mode 100644 index d9b847edbf..0000000000 --- a/docs/examples/guide/4c777b8360ef6c7671ae2e3803c0b0f6.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - top_tags: { - terms: { - field: 'type', - size: 3 - }, - aggregations: { - top_sales_hits: { - top_hits: { - sort: [ - { - date: { - order: 'desc' - } - } - ], - _source: { - includes: [ - 'date', - 'price' - ] - }, - size: 1 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4c803b088c1915a7b0634d5cafabe606.asciidoc b/docs/examples/guide/4c803b088c1915a7b0634d5cafabe606.asciidoc deleted file mode 100644 index 498f25d64d..0000000000 --- a/docs/examples/guide/4c803b088c1915a7b0634d5cafabe606.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'network-traffic', - body: { - size: 0, - aggregations: { - "ipv4-subnets": { - ip_prefix: { - field: 'ipv4', - prefix_length: 24, - keyed: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4c95d54b32df4dc49e9762b6c1ae2c05.asciidoc b/docs/examples/guide/4c95d54b32df4dc49e9762b6c1ae2c05.asciidoc deleted file mode 100644 index 4ce521aea1..0000000000 --- a/docs/examples/guide/4c95d54b32df4dc49e9762b6c1ae2c05.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - tag: { - type: 'text', - fielddata: true, - fielddata_frequency_filter: { - min: 0.001, - max: 0.1, - min_segment_size: 500 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4ca15672fc5ab1d80a127d086b6d2837.asciidoc b/docs/examples/guide/4ca15672fc5ab1d80a127d086b6d2837.asciidoc deleted file mode 100644 index 697d6eeba6..0000000000 --- a/docs/examples/guide/4ca15672fc5ab1d80a127d086b6d2837.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.cluster.allocation_explain -puts response ----- diff --git a/docs/examples/guide/4ca5bc2c2b2f64d15b9c16370ae97a39.asciidoc b/docs/examples/guide/4ca5bc2c2b2f64d15b9c16370ae97a39.asciidoc deleted file mode 100644 index b850134d77..0000000000 --- a/docs/examples/guide/4ca5bc2c2b2f64d15b9c16370ae97a39.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - "tiles-in-bounds": { - geohash_grid: { - field: 'location', - precision: 8, - bounds: { - top_left: 'POINT (4.21875 53.4375)', - bottom_right: 'POINT (5.625 52.03125)' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4cb44556b8c699f43489b17b42ddd475.asciidoc b/docs/examples/guide/4cb44556b8c699f43489b17b42ddd475.asciidoc deleted file mode 100644 index 999934de28..0000000000 --- a/docs/examples/guide/4cb44556b8c699f43489b17b42ddd475.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.mget( - body: { - docs: [ - { - _index: 'test', - _id: '1', - stored_fields: [ - 'field1', - 'field2' - ] - }, - { - _index: 'test', - _id: '2', - stored_fields: [ - 'field3', - 'field4' - ] - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/4cd40113e0fc90c37976f28d7e4a2327.asciidoc b/docs/examples/guide/4cd40113e0fc90c37976f28d7e4a2327.asciidoc deleted file mode 100644 index ccf8d1156e..0000000000 --- a/docs/examples/guide/4cd40113e0fc90c37976f28d7e4a2327.asciidoc +++ /dev/null @@ -1,87 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index', - body: { - settings: { - analysis: { - normalizer: { - my_normalizer: { - type: 'custom', - char_filter: [], - filter: [ - 'lowercase', - 'asciifolding' - ] - } - } - } - }, - mappings: { - properties: { - foo: { - type: 'keyword', - normalizer: 'my_normalizer' - } - } - } - } -) -puts response - -response = client.index( - index: 'index', - id: 1, - body: { - foo: 'BÀR' - } -) -puts response - -response = client.index( - index: 'index', - id: 2, - body: { - foo: 'bar' - } -) -puts response - -response = client.index( - index: 'index', - id: 3, - body: { - foo: 'baz' - } -) -puts response - -response = client.indices.refresh( - index: 'index' -) -puts response - -response = client.search( - index: 'index', - body: { - query: { - term: { - foo: 'BAR' - } - } - } -) -puts response - -response = client.search( - index: 'index', - body: { - query: { - match: { - foo: 'BAR' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4cdbd53f08df4bf66e2a47c0f1fcb3f8.asciidoc b/docs/examples/guide/4cdbd53f08df4bf66e2a47c0f1fcb3f8.asciidoc deleted file mode 100644 index 91650f9a53..0000000000 --- a/docs/examples/guide/4cdbd53f08df4bf66e2a47c0f1fcb3f8.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.clear_cache( - index: 'my-index-000001', - fields: 'foo,bar' -) -puts response ----- diff --git a/docs/examples/guide/4cdcc3fde5cea165a3a7567962b9bd61.asciidoc b/docs/examples/guide/4cdcc3fde5cea165a3a7567962b9bd61.asciidoc deleted file mode 100644 index 9866a59676..0000000000 --- a/docs/examples/guide/4cdcc3fde5cea165a3a7567962b9bd61.asciidoc +++ /dev/null @@ -1,72 +0,0 @@ -[source, ruby] ----- -response = client.synonyms.put_synonym( - id: 'my-synonyms-set', - body: { - synonyms_set: [ - { - id: 'test-1', - synonyms: 'hello, hi' - } - ] - } -) -puts response - -response = client.indices.create( - index: 'test-index', - body: { - settings: { - analysis: { - filter: { - synonyms_filter: { - type: 'synonym_graph', - synonyms_set: 'my-synonyms-set', - updateable: true - } - }, - analyzer: { - my_index_analyzer: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'lowercase' - ] - }, - my_search_analyzer: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'lowercase', - 'synonyms_filter' - ] - } - } - } - }, - mappings: { - properties: { - title: { - type: 'text', - analyzer: 'my_index_analyzer', - search_analyzer: 'my_search_analyzer' - } - } - } - } -) -puts response - -response = client.synonyms.put_synonym( - id: 'my-synonyms-set', - body: { - synonyms_set: [ - { - id: 'test-1', - synonyms: 'hello, hi, howdy' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/4ce4563e207233c48ffe849728052dca.asciidoc b/docs/examples/guide/4ce4563e207233c48ffe849728052dca.asciidoc deleted file mode 100644 index 4d5c475717..0000000000 --- a/docs/examples/guide/4ce4563e207233c48ffe849728052dca.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.rollover( - alias: 'logs-my_app-default' -) -puts response ----- diff --git a/docs/examples/guide/4d21725453955582ff12b4a1104aa7b6.asciidoc b/docs/examples/guide/4d21725453955582ff12b4a1104aa7b6.asciidoc deleted file mode 100644 index 0fbcade223..0000000000 --- a/docs/examples/guide/4d21725453955582ff12b4a1104aa7b6.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.ml.update_filter( - filter_id: 'safe_domains', - body: { - description: 'Updated list of domains', - add_items: [ - '*.myorg.com' - ], - remove_items: [ - 'wikipedia.org' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/4d46e2160784bdf7cce948e9f0d31fc8.asciidoc b/docs/examples/guide/4d46e2160784bdf7cce948e9f0d31fc8.asciidoc deleted file mode 100644 index 37472a1245..0000000000 --- a/docs/examples/guide/4d46e2160784bdf7cce948e9f0d31fc8.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'keyword', - filter: [ - 'my_custom_word_delimiter_graph_filter' - ] - } - }, - filter: { - my_custom_word_delimiter_graph_filter: { - type: 'word_delimiter_graph', - type_table: [ - '- => ALPHA' - ], - split_on_case_change: false, - split_on_numerics: false, - stem_english_possessive: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4d7c0b52d3c0a084157428624c543c90.asciidoc b/docs/examples/guide/4d7c0b52d3c0a084157428624c543c90.asciidoc deleted file mode 100644 index 094480a925..0000000000 --- a/docs/examples/guide/4d7c0b52d3c0a084157428624c543c90.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ml.info -puts response ----- diff --git a/docs/examples/guide/4dab4c5168047ba596af1beb0e55b845.asciidoc b/docs/examples/guide/4dab4c5168047ba596af1beb0e55b845.asciidoc deleted file mode 100644 index 375ac91382..0000000000 --- a/docs/examples/guide/4dab4c5168047ba596af1beb0e55b845.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_settings( - flat_settings: true -) -puts response ----- diff --git a/docs/examples/guide/4ded8ad815ac0e83b1c21a6c18fd0763.asciidoc b/docs/examples/guide/4ded8ad815ac0e83b1c21a6c18fd0763.asciidoc deleted file mode 100644 index 87022d1ec7..0000000000 --- a/docs/examples/guide/4ded8ad815ac0e83b1c21a6c18fd0763.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.transform.start_transform( - transform_id: 'ecommerce-customer-transform' -) -puts response ----- diff --git a/docs/examples/guide/4e2317aa45e87922d07c8ddc67a82d32.asciidoc b/docs/examples/guide/4e2317aa45e87922d07c8ddc67a82d32.asciidoc deleted file mode 100644 index 78fbd45fd8..0000000000 --- a/docs/examples/guide/4e2317aa45e87922d07c8ddc67a82d32.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'my_tokenizer' - } - }, - tokenizer: { - my_tokenizer: { - type: 'path_hierarchy', - delimiter: '-', - replacement: '/', - skip: 2 - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_analyzer', - text: 'one-two-three-four-five' - } -) -puts response ----- diff --git a/docs/examples/guide/4e3414fc712b16311f9e433dd366f49d.asciidoc b/docs/examples/guide/4e3414fc712b16311f9e433dd366f49d.asciidoc deleted file mode 100644 index 93ead6685d..0000000000 --- a/docs/examples/guide/4e3414fc712b16311f9e433dd366f49d.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.inference.delete_model( - task_type: 'sparse_embedding', - inference_id: 'my-elser-model' -) -puts response ----- diff --git a/docs/examples/guide/4e5f7a97efdbf517f7a2ed6ef7ff469c.asciidoc b/docs/examples/guide/4e5f7a97efdbf517f7a2ed6ef7ff469c.asciidoc deleted file mode 100644 index f965f74421..0000000000 --- a/docs/examples/guide/4e5f7a97efdbf517f7a2ed6ef7ff469c.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: '{ "query": { "terms": { "tags": {{#toJson}}tags{{/toJson}} }}}', - params: { - tags: [ - 'prod', - 'es01' - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/4e6b78ac991ed2d5f9a2e7c89f4fc471.asciidoc b/docs/examples/guide/4e6b78ac991ed2d5f9a2e7c89f4fc471.asciidoc deleted file mode 100644 index 6d0908d269..0000000000 --- a/docs/examples/guide/4e6b78ac991ed2d5f9a2e7c89f4fc471.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'music', - pretty: true, - body: { - suggest: { - "song-suggest": { - prefix: 'nir', - completion: { - field: 'suggest' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4e6bee73d8e3d82d1f4220416134da00.asciidoc b/docs/examples/guide/4e6bee73d8e3d82d1f4220416134da00.asciidoc deleted file mode 100644 index b4dac8db09..0000000000 --- a/docs/examples/guide/4e6bee73d8e3d82d1f4220416134da00.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.put_script( - id: 'my-search-template', - body: { - script: { - lang: 'mustache', - source: { - query: { - match: { - message: '{{query_string}}' - } - }, - from: '{{from}}', - size: '{{size}}' - }, - params: { - query_string: 'My query string' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4e926063a9494b563387617b08c4f232.asciidoc b/docs/examples/guide/4e926063a9494b563387617b08c4f232.asciidoc deleted file mode 100644 index ed10920a54..0000000000 --- a/docs/examples/guide/4e926063a9494b563387617b08c4f232.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get( - repository: 'my_repository', - snapshot: '*', - verbose: false -) -puts response ----- diff --git a/docs/examples/guide/4e931cfac74e46e221cf4a9ab88a182d.asciidoc b/docs/examples/guide/4e931cfac74e46e221cf4a9ab88a182d.asciidoc deleted file mode 100644 index ff7dc7d808..0000000000 --- a/docs/examples/guide/4e931cfac74e46e221cf4a9ab88a182d.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.field_caps( - fields: 'rating,title', - include_unmapped: true -) -puts response ----- diff --git a/docs/examples/guide/4ed946065faa92f9950f04e402676a97.asciidoc b/docs/examples/guide/4ed946065faa92f9950f04e402676a97.asciidoc deleted file mode 100644 index 2ff19a7152..0000000000 --- a/docs/examples/guide/4ed946065faa92f9950f04e402676a97.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.xpack.info( - human: false -) -puts response ----- diff --git a/docs/examples/guide/4f140d8922efdf3420e41b1cb669a289.asciidoc b/docs/examples/guide/4f140d8922efdf3420e41b1cb669a289.asciidoc deleted file mode 100644 index 7e528f56fb..0000000000 --- a/docs/examples/guide/4f140d8922efdf3420e41b1cb669a289.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.delete_component_template( - name: 'template_1' -) -puts response ----- diff --git a/docs/examples/guide/4f1e1205154d280db21fbd2754ed5398.asciidoc b/docs/examples/guide/4f1e1205154d280db21fbd2754ed5398.asciidoc deleted file mode 100644 index 118de96236..0000000000 --- a/docs/examples/guide/4f1e1205154d280db21fbd2754ed5398.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'stats-index', - body: { - mappings: { - properties: { - agg_metric: { - type: 'aggregate_metric_double', - metrics: [ - 'min', - 'max', - 'sum', - 'value_count' - ], - default_metric: 'max' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4f3366fc26e7ea4de446dfa5cdec9683.asciidoc b/docs/examples/guide/4f3366fc26e7ea4de446dfa5cdec9683.asciidoc deleted file mode 100644 index feb9a8450a..0000000000 --- a/docs/examples/guide/4f3366fc26e7ea4de446dfa5cdec9683.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - function_score: { - gauss: { - "@timestamp": { - origin: '2013-09-17', - scale: '10d', - offset: '5d', - decay: 0.5 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc b/docs/examples/guide/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc deleted file mode 100644 index 1db79c8d16..0000000000 --- a/docs/examples/guide/4f621ab694f62ddb89e0684a9e76c4d1.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - highlight: { - fields: { - comment: { - fragment_size: 150, - number_of_fragments: 3 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4f67b5f5c040f611bd2560a5d38ea6f5.asciidoc b/docs/examples/guide/4f67b5f5c040f611bd2560a5d38ea6f5.asciidoc deleted file mode 100644 index 198e51ad24..0000000000 --- a/docs/examples/guide/4f67b5f5c040f611bd2560a5d38ea6f5.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - genres: { - rare_terms: { - field: 'genre', - missing: 'N/A' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4f792d86ff79dcfe4643cd95505f8d5f.asciidoc b/docs/examples/guide/4f792d86ff79dcfe4643cd95505f8d5f.asciidoc deleted file mode 100644 index 9c32c127f3..0000000000 --- a/docs/examples/guide/4f792d86ff79dcfe4643cd95505f8d5f.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic: 'runtime', - runtime: { - day_of_week: { - type: 'keyword', - script: { - source: "emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT))" - } - } - }, - properties: { - "@timestamp": { - type: 'date' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4f8a4ad49e2bca6784c88ede18a1a709.asciidoc b/docs/examples/guide/4f8a4ad49e2bca6784c88ede18a1a709.asciidoc deleted file mode 100644 index 291031f609..0000000000 --- a/docs/examples/guide/4f8a4ad49e2bca6784c88ede18a1a709.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.license.delete -puts response ----- diff --git a/docs/examples/guide/4fa9ee04188cbf0b38cfc28f6a56527d.asciidoc b/docs/examples/guide/4fa9ee04188cbf0b38cfc28f6a56527d.asciidoc deleted file mode 100644 index c839f01651..0000000000 --- a/docs/examples/guide/4fa9ee04188cbf0b38cfc28f6a56527d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_datafeeds( - datafeed_id: 'datafeed-high_sum_total_sales' -) -puts response ----- diff --git a/docs/examples/guide/4fcca1687d7b2cf08de526539fea5a76.asciidoc b/docs/examples/guide/4fcca1687d7b2cf08de526539fea5a76.asciidoc deleted file mode 100644 index 43ce1972c3..0000000000 --- a/docs/examples/guide/4fcca1687d7b2cf08de526539fea5a76.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index', - body: { - query: { - bool: { - should: [ - { - text_expansion: { - 'ml.inference.title_expanded.predicted_value' => { - model_id: '.elser_model_2', - model_text: 'How is the weather in Jamaica?', - boost: 1 - } - } - }, - { - text_expansion: { - 'ml.inference.description_expanded.predicted_value' => { - model_id: '.elser_model_2', - model_text: 'How is the weather in Jamaica?', - boost: 1 - } - } - }, - { - multi_match: { - query: 'How is the weather in Jamaica?', - fields: [ - 'title', - 'description' - ], - boost: 4 - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4fe78a4dfb747fd5dc34145ec6b76183.asciidoc b/docs/examples/guide/4fe78a4dfb747fd5dc34145ec6b76183.asciidoc deleted file mode 100644 index 3d4053ed78..0000000000 --- a/docs/examples/guide/4fe78a4dfb747fd5dc34145ec6b76183.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - runtime: { - day_of_week: { - type: 'keyword', - script: { - source: "emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT))" - } - } - }, - properties: { - "@timestamp": { - type: 'date' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/4ff2dcec03fe097075cf1d174a019a1f.asciidoc b/docs/examples/guide/4ff2dcec03fe097075cf1d174a019a1f.asciidoc deleted file mode 100644 index aa63af0d94..0000000000 --- a/docs/examples/guide/4ff2dcec03fe097075cf1d174a019a1f.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - match_phrase: { - message: 'number 1' - } - }, - highlight: { - fields: { - message: { - type: 'plain', - fragment_size: 15, - number_of_fragments: 3, - fragmenter: 'simple' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/50096ee0ca53fe8a88450ebb2a50f285.asciidoc b/docs/examples/guide/50096ee0ca53fe8a88450ebb2a50f285.asciidoc deleted file mode 100644 index 7525fedbf5..0000000000 --- a/docs/examples/guide/50096ee0ca53fe8a88450ebb2a50f285.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'csv', - delimiter: ';', - body: { - query: 'SELECT * FROM library ORDER BY page_count DESC', - fetch_size: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/5024c524a7db0d6bb44c1820007cc5f4.asciidoc b/docs/examples/guide/5024c524a7db0d6bb44c1820007cc5f4.asciidoc deleted file mode 100644 index ea415e3af3..0000000000 --- a/docs/examples/guide/5024c524a7db0d6bb44c1820007cc5f4.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - description: '...', - processors: [ - { - grok: { - field: 'message', - patterns: [ - '%{IP:client} %{WORD:method} %{URIPATHPARAM:request} %{NUMBER:bytes:int} %{NUMBER:duration:double}' - ] - } - } - ] - }, - docs: [ - { - _source: { - message: '55.3.244.1 GET /index.html 15824 0.043' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/50522d3d5b3d055f712ad737e3d1707a.asciidoc b/docs/examples/guide/50522d3d5b3d055f712ad737e3d1707a.asciidoc deleted file mode 100644 index be4556d408..0000000000 --- a/docs/examples/guide/50522d3d5b3d055f712ad737e3d1707a.asciidoc +++ /dev/null @@ -1,52 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - name: { - type: 'text', - fields: { - length: { - type: 'token_count', - analyzer: 'standard' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - name: 'John Smith' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - name: 'Rachel Alice Williams' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - term: { - 'name.length' => 3 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/505a6c21a4cb608d3662fab1a35eb6df.asciidoc b/docs/examples/guide/505a6c21a4cb608d3662fab1a35eb6df.asciidoc deleted file mode 100644 index bc9aed6a48..0000000000 --- a/docs/examples/guide/505a6c21a4cb608d3662fab1a35eb6df.asciidoc +++ /dev/null @@ -1,56 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my_index', - id: 1, - body: { - my_text: 'histogram_1', - my_histogram: { - values: [ - 0.1, - 0.2, - 0.3, - 0.4, - 0.5 - ], - counts: [ - 3, - 7, - 23, - 12, - 6 - ] - }, - _doc_count: 45 - } -) -puts response - -response = client.index( - index: 'my_index', - id: 2, - body: { - my_text: 'histogram_2', - my_histogram: { - values: [ - 0.1, - 0.25, - 0.35, - 0.4, - 0.45, - 0.5 - ], - counts: [ - 8, - 17, - 8, - 7, - 6, - 2 - ] - }, - _doc_count: 62 - } -) -puts response ----- diff --git a/docs/examples/guide/50764f4ea88079156b0aff2835bcdc45.asciidoc b/docs/examples/guide/50764f4ea88079156b0aff2835bcdc45.asciidoc deleted file mode 100644 index d97de9d0a3..0000000000 --- a/docs/examples/guide/50764f4ea88079156b0aff2835bcdc45.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cluster.state( - metric: 'metadata', - pretty: true, - filter_path: 'metadata.stored_scripts' -) -puts response ----- diff --git a/docs/examples/guide/507b456eb768c4aa42b5b84a80e8fe01.asciidoc b/docs/examples/guide/507b456eb768c4aa42b5b84a80e8fe01.asciidoc deleted file mode 100644 index 48d15d6a54..0000000000 --- a/docs/examples/guide/507b456eb768c4aa42b5b84a80e8fe01.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - query: 'running scissors', - fields: [ - 'comment', - 'comment.plain^10' - ] - } - }, - highlight: { - order: 'score', - fields: { - comment: { - matched_fields: [ - 'comment.plain' - ], - type: 'fvh' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5093bfd281dbe41bd0dba8ff979e6e47.asciidoc b/docs/examples/guide/5093bfd281dbe41bd0dba8ff979e6e47.asciidoc deleted file mode 100644 index 91d030011f..0000000000 --- a/docs/examples/guide/5093bfd281dbe41bd0dba8ff979e6e47.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.get_script( - id: 'my-stored-script' -) -puts response ----- diff --git a/docs/examples/guide/50b5c0332949d2154c72b629b5fa6222.asciidoc b/docs/examples/guide/50b5c0332949d2154c72b629b5fa6222.asciidoc deleted file mode 100644 index 57aae20a17..0000000000 --- a/docs/examples/guide/50b5c0332949d2154c72b629b5fa6222.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - refresh: 'wait_for', - body: { - user_id: 12_345 - } -) -puts response - -response = client.index( - index: 'my-index-000001', - refresh: 'wait_for', - body: { - user_id: 12_346 - } -) -puts response ----- diff --git a/docs/examples/guide/50c2cea2adbe9523458c2686ab11df54.asciidoc b/docs/examples/guide/50c2cea2adbe9523458c2686ab11df54.asciidoc deleted file mode 100644 index 00c712908e..0000000000 --- a/docs/examples/guide/50c2cea2adbe9523458c2686ab11df54.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'text_payloads', - body: { - mappings: { - properties: { - text: { - type: 'text', - term_vector: 'with_positions_payloads', - analyzer: 'payload_delimiter' - } - } - }, - settings: { - analysis: { - analyzer: { - payload_delimiter: { - tokenizer: 'whitespace', - filter: [ - 'delimited_payload' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/50d5c5b7e8ed9a95b8d9a25a32a77425.asciidoc b/docs/examples/guide/50d5c5b7e8ed9a95b8d9a25a32a77425.asciidoc deleted file mode 100644 index 6c677cff6d..0000000000 --- a/docs/examples/guide/50d5c5b7e8ed9a95b8d9a25a32a77425.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'unique' - ], - text: 'the quick fox jumps the lazy fox' - } -) -puts response ----- diff --git a/docs/examples/guide/50ddf374cfa8128538ea092ee98b723d.asciidoc b/docs/examples/guide/50ddf374cfa8128538ea092ee98b723d.asciidoc deleted file mode 100644 index da79233448..0000000000 --- a/docs/examples/guide/50ddf374cfa8128538ea092ee98b723d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.tasks.list( - filter_path: 'nodes.*.tasks' -) -puts response ----- diff --git a/docs/examples/guide/50f922e9f002d8ac570953be59414b7b.asciidoc b/docs/examples/guide/50f922e9f002d8ac570953be59414b7b.asciidoc deleted file mode 100644 index 06b4acf989..0000000000 --- a/docs/examples/guide/50f922e9f002d8ac570953be59414b7b.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - combined_fields: { - query: 'database systems', - fields: [ - 'title', - 'abstract' - ], - operator: 'and' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/511e5bb8ab881171b7e8629095e30b85.asciidoc b/docs/examples/guide/511e5bb8ab881171b7e8629095e30b85.asciidoc deleted file mode 100644 index 50a7fbd4f4..0000000000 --- a/docs/examples/guide/511e5bb8ab881171b7e8629095e30b85.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'datastream' -) -puts response ----- diff --git a/docs/examples/guide/51390ca10aa22d7104e8970f09ea4512.asciidoc b/docs/examples/guide/51390ca10aa22d7104e8970f09ea4512.asciidoc deleted file mode 100644 index ca759417ef..0000000000 --- a/docs/examples/guide/51390ca10aa22d7104e8970f09ea4512.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - binary: { - type: 'binary', - doc_values: true - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - binary: [ - 'IAA=', - 'EAA=' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/515e1104d136082e826d1b32af011759.asciidoc b/docs/examples/guide/515e1104d136082e826d1b32af011759.asciidoc deleted file mode 100644 index 8315b4829b..0000000000 --- a/docs/examples/guide/515e1104d136082e826d1b32af011759.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'products', - id: 0, - refresh: true, - body: { - name: 'LED TV', - resellers: [ - { - reseller: 'companyA', - price: 350 - }, - { - reseller: 'companyB', - price: 500 - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/518fcf1dc1edd7dba0864accf71b49f4.asciidoc b/docs/examples/guide/518fcf1dc1edd7dba0864accf71b49f4.asciidoc deleted file mode 100644 index e6c12a28bf..0000000000 --- a/docs/examples/guide/518fcf1dc1edd7dba0864accf71b49f4.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - preference: '_local', - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5195a88194f7a139c635a84398d76205.asciidoc b/docs/examples/guide/5195a88194f7a139c635a84398d76205.asciidoc deleted file mode 100644 index 988584a92f..0000000000 --- a/docs/examples/guide/5195a88194f7a139c635a84398d76205.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.restore( - repository: 'my_repository', - snapshot: 'my_snapshot' -) -puts response ----- diff --git a/docs/examples/guide/51b40610ae05730b4c6afd25647d7ae0.asciidoc b/docs/examples/guide/51b40610ae05730b4c6afd25647d7ae0.asciidoc deleted file mode 100644 index 0df492831a..0000000000 --- a/docs/examples/guide/51b40610ae05730b4c6afd25647d7ae0.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - date: '2015-10-01T05:30:00Z' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - refresh: true, - body: { - date: '2015-10-01T06:30:00Z' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - size: 0, - body: { - aggregations: { - by_day: { - date_histogram: { - field: 'date', - calendar_interval: 'day', - offset: '+6h' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/51f6cb682424e110f289af79c106f4c7.asciidoc b/docs/examples/guide/51f6cb682424e110f289af79c106f4c7.asciidoc deleted file mode 100644 index 447372ca01..0000000000 --- a/docs/examples/guide/51f6cb682424e110f289af79c106f4c7.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.max_shards_per_node.frozen' => 3200 - } - } -) -puts response ----- diff --git a/docs/examples/guide/5275842787967b6db876025f4a1c6942.asciidoc b/docs/examples/guide/5275842787967b6db876025f4a1c6942.asciidoc deleted file mode 100644 index b38820ef89..0000000000 --- a/docs/examples/guide/5275842787967b6db876025f4a1c6942.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - suggest: { - text: 'tring out Elasticsearch', - "my-suggest-1": { - term: { - field: 'message' - } - }, - "my-suggest-2": { - term: { - field: 'user' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5276a831513623e43ed567eb52b6dba9.asciidoc b/docs/examples/guide/5276a831513623e43ed567eb52b6dba9.asciidoc deleted file mode 100644 index a903a37bc9..0000000000 --- a/docs/examples/guide/5276a831513623e43ed567eb52b6dba9.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - routing: 'my-routing-value', - body: { - "@timestamp": '2099-11-15T13:12:00', - message: 'GET /search HTTP/1.1 200 1070000', - user: { - id: 'kimchy' - } - } -) -puts response ----- diff --git a/docs/examples/guide/528e5f1c345c3769248cc6889e8cf552.asciidoc b/docs/examples/guide/528e5f1c345c3769248cc6889e8cf552.asciidoc deleted file mode 100644 index 5f5e9229e8..0000000000 --- a/docs/examples/guide/528e5f1c345c3769248cc6889e8cf552.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'index', - body: { - properties: { - title: { - type: 'text', - similarity: 'my_similarity' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/529b975b7cedaac58dce9821956adc37.asciidoc b/docs/examples/guide/529b975b7cedaac58dce9821956adc37.asciidoc deleted file mode 100644 index 5afbbc21d5..0000000000 --- a/docs/examples/guide/529b975b7cedaac58dce9821956adc37.asciidoc +++ /dev/null @@ -1,84 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'MultiPolygon', - coordinates: [ - [ - [ - [ - 102, - 2 - ], - [ - 103, - 2 - ], - [ - 103, - 3 - ], - [ - 102, - 3 - ], - [ - 102, - 2 - ] - ] - ], - [ - [ - [ - 100, - 0 - ], - [ - 101, - 0 - ], - [ - 101, - 1 - ], - [ - 100, - 1 - ], - [ - 100, - 0 - ] - ], - [ - [ - 100.2, - 0.2 - ], - [ - 100.8, - 0.2 - ], - [ - 100.8, - 0.8 - ], - [ - 100.2, - 0.8 - ], - [ - 100.2, - 0.2 - ] - ] - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/52a2d119addb15366a935115518335fd.asciidoc b/docs/examples/guide/52a2d119addb15366a935115518335fd.asciidoc deleted file mode 100644 index 26c940ad2d..0000000000 --- a/docs/examples/guide/52a2d119addb15366a935115518335fd.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my_source_index', - body: { - settings: { - 'index.number_of_replicas' => 0, - 'index.routing.allocation.require._name' => 'shrink_node_name' - } - } -) -puts response ----- diff --git a/docs/examples/guide/52b71aa4ae6563abae78cd20ff06d1e9.asciidoc b/docs/examples/guide/52b71aa4ae6563abae78cd20ff06d1e9.asciidoc deleted file mode 100644 index 4e8bb8ee98..0000000000 --- a/docs/examples/guide/52b71aa4ae6563abae78cd20ff06d1e9.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - human: true, - filter_path: 'nodes.*.name,nodes.*.indices.indexing' -) -puts response ----- diff --git a/docs/examples/guide/52bc577a0d0cd42b46f33e0ef5124df8.asciidoc b/docs/examples/guide/52bc577a0d0cd42b46f33e0ef5124df8.asciidoc deleted file mode 100644 index ca06e55db9..0000000000 --- a/docs/examples/guide/52bc577a0d0cd42b46f33e0ef5124df8.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.put_script( - id: 'my-search-template', - body: { - script: { - lang: 'mustache', - source: { - query: { - match: { - message: '{{query_string}}' - } - }, - from: '{{from}}', - size: '{{size}}' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/52be795b68e6ef3f396f35fea52d0481.asciidoc b/docs/examples/guide/52be795b68e6ef3f396f35fea52d0481.asciidoc deleted file mode 100644 index 3c215c3b6e..0000000000 --- a/docs/examples/guide/52be795b68e6ef3f396f35fea52d0481.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'my-data-stream-template', - body: { - index_patterns: [ - 'my-data-stream*' - ], - data_stream: {}, - priority: 500 - } -) -puts response ----- diff --git a/docs/examples/guide/52c7e4172a446c394210a07c464c57d2.asciidoc b/docs/examples/guide/52c7e4172a446c394210a07c464c57d2.asciidoc deleted file mode 100644 index b9d2f09241..0000000000 --- a/docs/examples/guide/52c7e4172a446c394210a07c464c57d2.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.delete_by_query_rethrottle( - task_id: 'r1A2WoRbTwKZ516z6NEs5A:36619', - requests_per_second: -1 -) -puts response ----- diff --git a/docs/examples/guide/52cdb5526ce69d0223d1dd198308bfea.asciidoc b/docs/examples/guide/52cdb5526ce69d0223d1dd198308bfea.asciidoc deleted file mode 100644 index a4ed74f621..0000000000 --- a/docs/examples/guide/52cdb5526ce69d0223d1dd198308bfea.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic: false, - properties: { - user: { - properties: { - name: { - type: 'text' - }, - social_networks: { - dynamic: true, - properties: {} - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/52fd112e970882c4d7cc4b0cca8e2c6f.asciidoc b/docs/examples/guide/52fd112e970882c4d7cc4b0cca8e2c6f.asciidoc deleted file mode 100644 index ee7cc2f565..0000000000 --- a/docs/examples/guide/52fd112e970882c4d7cc4b0cca8e2c6f.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - number_of_bytes: { - type: 'integer' - }, - time_in_seconds: { - type: 'float' - }, - price: { - type: 'scaled_float', - scaling_factor: 100 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5302f4f2bcc0f400ff71c791e6f68d7b.asciidoc b/docs/examples/guide/5302f4f2bcc0f400ff71c791e6f68d7b.asciidoc deleted file mode 100644 index 34e3cca612..0000000000 --- a/docs/examples/guide/5302f4f2bcc0f400ff71c791e6f68d7b.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - { - type: 'keyword_marker', - keywords: [ - 'jumping' - ] - }, - 'stemmer' - ], - text: 'fox running and jumping' - } -) -puts response ----- diff --git a/docs/examples/guide/5305bc07c1bf90bab3e8db1de3e31b26.asciidoc b/docs/examples/guide/5305bc07c1bf90bab3e8db1de3e31b26.asciidoc deleted file mode 100644 index a441207d47..0000000000 --- a/docs/examples/guide/5305bc07c1bf90bab3e8db1de3e31b26.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.shutdown.put_node( - node_id: 'USpTGYaBSIKbgSUJR2Z9lg', - body: { - type: 'restart', - reason: 'Demonstrating how the node shutdown API works', - allocation_delay: '20m' - } -) -puts response ----- diff --git a/docs/examples/guide/532ddf9afdcd0b1c9c0bb331e74d8df3.asciidoc b/docs/examples/guide/532ddf9afdcd0b1c9c0bb331e74d8df3.asciidoc deleted file mode 100644 index ef2f78bf0e..0000000000 --- a/docs/examples/guide/532ddf9afdcd0b1c9c0bb331e74d8df3.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index_long', - body: { - mappings: { - properties: { - field: { - type: 'long' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/532f371934b61fb4992d37bedcc085de.asciidoc b/docs/examples/guide/532f371934b61fb4992d37bedcc085de.asciidoc deleted file mode 100644 index 231cddb9cf..0000000000 --- a/docs/examples/guide/532f371934b61fb4992d37bedcc085de.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.shutdown.put_node( - node_id: 'USpTGYaBSIKbgSUJR2Z9lg', - body: { - type: 'restart', - reason: 'Demonstrating how the node shutdown API works', - allocation_delay: '10m' - } -) -puts response ----- diff --git a/docs/examples/guide/5330191ec9f11281ebf6867bf11c58ae.asciidoc b/docs/examples/guide/5330191ec9f11281ebf6867bf11c58ae.asciidoc deleted file mode 100644 index 7671d4f573..0000000000 --- a/docs/examples/guide/5330191ec9f11281ebf6867bf11c58ae.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.delete_by_query( - index: 'my-index-000001', - routing: 1, - body: { - query: { - range: { - age: { - gte: 10 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5332c4cca5fbb45cc700dcd34f37bc38.asciidoc b/docs/examples/guide/5332c4cca5fbb45cc700dcd34f37bc38.asciidoc deleted file mode 100644 index b78306d887..0000000000 --- a/docs/examples/guide/5332c4cca5fbb45cc700dcd34f37bc38.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - english: 'Some English text', - count: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/53aa8b21e2b1c4d48960343711296704.asciidoc b/docs/examples/guide/53aa8b21e2b1c4d48960343711296704.asciidoc deleted file mode 100644 index 553658d9ff..0000000000 --- a/docs/examples/guide/53aa8b21e2b1c4d48960343711296704.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - regexp: { - 'my_field.keyword' => 'a\\\\.*' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/53b908c3432118c5a6e460f74d32006b.asciidoc b/docs/examples/guide/53b908c3432118c5a6e460f74d32006b.asciidoc deleted file mode 100644 index 8cf2b0412b..0000000000 --- a/docs/examples/guide/53b908c3432118c5a6e460f74d32006b.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - multi_match: { - query: 'this is a test', - fields: [ - 'subject', - 'message' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/53bb7f0e3429861aadb8dd3d588085cd.asciidoc b/docs/examples/guide/53bb7f0e3429861aadb8dd3d588085cd.asciidoc deleted file mode 100644 index f7ac8c0224..0000000000 --- a/docs/examples/guide/53bb7f0e3429861aadb8dd3d588085cd.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-data-stream', - body: { - seq_no_primary_term: true, - query: { - match: { - 'user.id' => 'yWIumJd7' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/53c6256295111524d5ff2885bdcb99a9.asciidoc b/docs/examples/guide/53c6256295111524d5ff2885bdcb99a9.asciidoc deleted file mode 100644 index 9023a1e760..0000000000 --- a/docs/examples/guide/53c6256295111524d5ff2885bdcb99a9.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.transform.get_transform( - transform_id: '_stats', - from: 5, - size: 10 -) -puts response ----- diff --git a/docs/examples/guide/54059961f05904368ced52c894a50e23.asciidoc b/docs/examples/guide/54059961f05904368ced52c894a50e23.asciidoc deleted file mode 100644 index 43168f09e1..0000000000 --- a/docs/examples/guide/54059961f05904368ced52c894a50e23.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'date', - calendar_interval: '1M' - }, - aggregations: { - the_sum: { - sum: { - field: 'price' - } - }, - the_moving_max: { - moving_fn: { - buckets_path: 'the_sum', - window: 10, - script: 'MovingFunctions.max(values)' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/540aefc39303c925a4efff71ebe2f002.asciidoc b/docs/examples/guide/540aefc39303c925a4efff71ebe2f002.asciidoc deleted file mode 100644 index b539c183e9..0000000000 --- a/docs/examples/guide/540aefc39303c925a4efff71ebe2f002.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - tags: { - significant_terms: { - field: 'tag', - min_doc_count: 10 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5433bb83628cc91d81fbe53c533b2a09.asciidoc b/docs/examples/guide/5433bb83628cc91d81fbe53c533b2a09.asciidoc deleted file mode 100644 index 7c677da55a..0000000000 --- a/docs/examples/guide/5433bb83628cc91d81fbe53c533b2a09.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'asciifold_example', - body: { - settings: { - analysis: { - analyzer: { - standard_asciifolding: { - tokenizer: 'standard', - filter: [ - 'asciifolding' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/543c3a77880adf281099df1a41f6b96a.asciidoc b/docs/examples/guide/543c3a77880adf281099df1a41f6b96a.asciidoc deleted file mode 100644 index d38d8a9c06..0000000000 --- a/docs/examples/guide/543c3a77880adf281099df1a41f6b96a.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.esql.query( - body: { - locale: 'fr-FR', - query: "\n ROW birth_date_string = \"2023-01-15T00:00:00.000Z\"\n | EVAL birth_date = date_parse(birth_date_string)\n | EVAL month_of_birth = DATE_FORMAT(\"MMMM\",birth_date)\n | LIMIT 5\n ", - version: '2024.04.01' - } -) -puts response ----- diff --git a/docs/examples/guide/5457c94f0039c6b95c7f9f305d0c6b58.asciidoc b/docs/examples/guide/5457c94f0039c6b95c7f9f305d0c6b58.asciidoc deleted file mode 100644 index ccee72595e..0000000000 --- a/docs/examples/guide/5457c94f0039c6b95c7f9f305d0c6b58.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - metric: 'indices' -) -puts response - -response = client.nodes.stats( - metric: 'os,process' -) -puts response - -response = client.nodes.stats( - node_id: '10.0.0.1', - metric: 'process' -) -puts response ----- diff --git a/docs/examples/guide/548b85bd9e6e7d33e36133953869449b.asciidoc b/docs/examples/guide/548b85bd9e6e7d33e36133953869449b.asciidoc deleted file mode 100644 index 72e7f48701..0000000000 --- a/docs/examples/guide/548b85bd9e6e7d33e36133953869449b.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'xpack.monitoring.collection.enabled' => false - } - } -) -puts response ----- diff --git a/docs/examples/guide/54a215d242ab65123b09e9dfb71bcbbf.asciidoc b/docs/examples/guide/54a215d242ab65123b09e9dfb71bcbbf.asciidoc deleted file mode 100644 index 74fe5a77dd..0000000000 --- a/docs/examples/guide/54a215d242ab65123b09e9dfb71bcbbf.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - genres: { - terms: { - field: 'genre', - order: { - _key: 'asc' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/55096381f811388fafd8e244dd2402c8.asciidoc b/docs/examples/guide/55096381f811388fafd8e244dd2402c8.asciidoc deleted file mode 100644 index 24cdefa4b9..0000000000 --- a/docs/examples/guide/55096381f811388fafd8e244dd2402c8.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.rollover( - alias: 'my-alias', - body: { - settings: { - 'index.number_of_shards' => 2 - } - } -) -puts response ----- diff --git a/docs/examples/guide/553d79817bb1333970e99507c37a159a.asciidoc b/docs/examples/guide/553d79817bb1333970e99507c37a159a.asciidoc deleted file mode 100644 index c20580090f..0000000000 --- a/docs/examples/guide/553d79817bb1333970e99507c37a159a.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index', - body: { - settings: { - index: { - similarity: { - default: { - type: 'boolean' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5553cf7a02c22f616cd994747f2dd5a5.asciidoc b/docs/examples/guide/5553cf7a02c22f616cd994747f2dd5a5.asciidoc deleted file mode 100644 index 33b7049e45..0000000000 --- a/docs/examples/guide/5553cf7a02c22f616cd994747f2dd5a5.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - bool: { - must: [ - { - match: { - 'user.first' => 'Alice' - } - }, - { - match: { - 'user.last' => 'Smith' - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5566cff431570f522e1fc5475b2ed875.asciidoc b/docs/examples/guide/5566cff431570f522e1fc5475b2ed875.asciidoc deleted file mode 100644 index 1199ed0ba3..0000000000 --- a/docs/examples/guide/5566cff431570f522e1fc5475b2ed875.asciidoc +++ /dev/null @@ -1,76 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - settings: { - index: { - number_of_shards: 1, - analysis: { - analyzer: { - trigram: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'lowercase', - 'shingle' - ] - }, - reverse: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'lowercase', - 'reverse' - ] - } - }, - filter: { - shingle: { - type: 'shingle', - min_shingle_size: 2, - max_shingle_size: 3 - } - } - } - } - }, - mappings: { - properties: { - title: { - type: 'text', - fields: { - trigram: { - type: 'text', - analyzer: 'trigram' - }, - reverse: { - type: 'text', - analyzer: 'reverse' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'test', - refresh: true, - body: { - title: 'noble warriors' - } -) -puts response - -response = client.index( - index: 'test', - refresh: true, - body: { - title: 'nobel prize' - } -) -puts response ----- diff --git a/docs/examples/guide/55838e0b21c4f4da2dc8aaec045a6d5f.asciidoc b/docs/examples/guide/55838e0b21c4f4da2dc8aaec045a6d5f.asciidoc deleted file mode 100644 index 207a8224ef..0000000000 --- a/docs/examples/guide/55838e0b21c4f4da2dc8aaec045a6d5f.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - runtime_mappings: { - 'load_time.seconds' => { - type: 'long', - script: { - source: "emit(doc['load_time'].value / params.timeUnit)", - params: { - "timeUnit": 1000 - } - } - } - }, - aggregations: { - load_time_outlier: { - percentiles: { - field: 'load_time.seconds' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/558b3f9b987771e9f9f35e51a0d7e062.asciidoc b/docs/examples/guide/558b3f9b987771e9f9f35e51a0d7e062.asciidoc deleted file mode 100644 index 8e3c274750..0000000000 --- a/docs/examples/guide/558b3f9b987771e9f9f35e51a0d7e062.asciidoc +++ /dev/null @@ -1,44 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-dfs-index', - body: { - settings: { - number_of_shards: 2, - number_of_replicas: 1 - }, - mappings: { - properties: { - "my-keyword": { - type: 'keyword' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'my-dfs-index', - refresh: true, - body: [ - { - index: { - _id: '1' - } - }, - { - "my-keyword": 'a' - }, - { - index: { - _id: '2' - } - }, - { - "my-keyword": 'b' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/55e8ddf643726dec51531ada0bec7143.asciidoc b/docs/examples/guide/55e8ddf643726dec51531ada0bec7143.asciidoc deleted file mode 100644 index 34bb4d0e40..0000000000 --- a/docs/examples/guide/55e8ddf643726dec51531ada0bec7143.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.slm.get_stats -puts response ----- diff --git a/docs/examples/guide/55f0fec6342f677af74de2124b801aa2.asciidoc b/docs/examples/guide/55f0fec6342f677af74de2124b801aa2.asciidoc deleted file mode 100644 index 4285dcecbb..0000000000 --- a/docs/examples/guide/55f0fec6342f677af74de2124b801aa2.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'byte-image-index', - body: { - knn: { - field: 'byte-image-vector', - query_vector: [ - -5, - 9 - ], - k: 10, - num_candidates: 100 - }, - fields: [ - 'title' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/5619103306878d58a058bce87c5bd82b.asciidoc b/docs/examples/guide/5619103306878d58a058bce87c5bd82b.asciidoc deleted file mode 100644 index 9adda0546b..0000000000 --- a/docs/examples/guide/5619103306878d58a058bce87c5bd82b.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.recovery( - human: true, - detailed: true -) -puts response ----- diff --git a/docs/examples/guide/565908b03edff1d6e6e7cdfb92177faf.asciidoc b/docs/examples/guide/565908b03edff1d6e6e7cdfb92177faf.asciidoc deleted file mode 100644 index 8ec58ed61f..0000000000 --- a/docs/examples/guide/565908b03edff1d6e6e7cdfb92177faf.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'exams', - body: { - size: 0, - runtime_mappings: { - 'grade.weighted' => { - type: 'double', - script: "\n emit(doc['grade'].value * doc['weight'].value)\n " - } - }, - aggregations: { - grades_stats: { - stats: { - field: 'grade.weighted' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/569f10fee671632017c722fd983009d4.asciidoc b/docs/examples/guide/569f10fee671632017c722fd983009d4.asciidoc deleted file mode 100644 index 255293396c..0000000000 --- a/docs/examples/guide/569f10fee671632017c722fd983009d4.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - shop: { - terms: { - field: 'shop' - } - } - }, - { - product: { - terms: { - field: 'product' - } - } - }, - { - date: { - date_histogram: { - field: 'timestamp', - calendar_interval: '1d' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/56a1aa4f7fa62f2289e20607e3039bf3.asciidoc b/docs/examples/guide/56a1aa4f7fa62f2289e20607e3039bf3.asciidoc deleted file mode 100644 index a04f52d396..0000000000 --- a/docs/examples/guide/56a1aa4f7fa62f2289e20607e3039bf3.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - properties: { - email: { - type: 'keyword' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/56a903530990313b753b1be33578997a.asciidoc b/docs/examples/guide/56a903530990313b753b1be33578997a.asciidoc deleted file mode 100644 index 7d2af758d2..0000000000 --- a/docs/examples/guide/56a903530990313b753b1be33578997a.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - dis_max: { - queries: [ - { - multi_match: { - query: 'Will Smith', - type: 'cross_fields', - fields: [ - 'first', - 'last' - ], - minimum_should_match: '50%' - } - }, - { - multi_match: { - query: 'Will Smith', - type: 'cross_fields', - fields: [ - '*.edge' - ] - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/56b6b50b174a935d368301ebd717231d.asciidoc b/docs/examples/guide/56b6b50b174a935d368301ebd717231d.asciidoc deleted file mode 100644 index 86da2e1a05..0000000000 --- a/docs/examples/guide/56b6b50b174a935d368301ebd717231d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.watcher.stats( - metric: 'current_watches' -) -puts response ----- diff --git a/docs/examples/guide/56da9c55774f4c2e8eadde0579bdc60c.asciidoc b/docs/examples/guide/56da9c55774f4c2e8eadde0579bdc60c.asciidoc deleted file mode 100644 index 97773131a2..0000000000 --- a/docs/examples/guide/56da9c55774f4c2e8eadde0579bdc60c.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'test*', - filter_path: 'aggregations', - body: { - aggregations: { - tm: { - top_metrics: { - metrics: { - field: 'm' - }, - sort: { - s: { - order: 'asc', - numeric_type: 'double' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/56e90a63f94eeb882fe8acbcd74229c2.asciidoc b/docs/examples/guide/56e90a63f94eeb882fe8acbcd74229c2.asciidoc deleted file mode 100644 index 6b44374fcf..0000000000 --- a/docs/examples/guide/56e90a63f94eeb882fe8acbcd74229c2.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'date', - calendar_interval: '1M' - }, - aggregations: { - the_sum: { - sum: { - field: 'price' - } - }, - the_moving_min: { - moving_fn: { - buckets_path: 'the_sum', - window: 10, - script: 'MovingFunctions.min(values)' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/56f3a6bec7be5a90fb43144c331a5b5a.asciidoc b/docs/examples/guide/56f3a6bec7be5a90fb43144c331a5b5a.asciidoc deleted file mode 100644 index 8f4bd10c38..0000000000 --- a/docs/examples/guide/56f3a6bec7be5a90fb43144c331a5b5a.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_settings( - index: 'my-index-000001', - flat_settings: false -) -puts response ----- diff --git a/docs/examples/guide/56fa6c9e08258157d445e2f92274962b.asciidoc b/docs/examples/guide/56fa6c9e08258157d445e2f92274962b.asciidoc deleted file mode 100644 index 3cd26794cf..0000000000 --- a/docs/examples/guide/56fa6c9e08258157d445e2f92274962b.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - { - type: 'shingle', - min_shingle_size: 2, - max_shingle_size: 3, - output_unigrams: false - } - ], - text: 'quick brown fox jumps' - } -) -puts response ----- diff --git a/docs/examples/guide/571314a948e49f1f9614d36fcf79392a.asciidoc b/docs/examples/guide/571314a948e49f1f9614d36fcf79392a.asciidoc deleted file mode 100644 index bf14021769..0000000000 --- a/docs/examples/guide/571314a948e49f1f9614d36fcf79392a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.async_search.get( - id: 'FjktRGJ1Y2w1U0phLTRhZnVyeUZ2MVEbWEJyeVBPQldTV3FGZGdIeUVabXBldzo5NzA4' -) -puts response ----- diff --git a/docs/examples/guide/578808065fee8691355b8f25c35782cd.asciidoc b/docs/examples/guide/578808065fee8691355b8f25c35782cd.asciidoc deleted file mode 100644 index e21912fc6c..0000000000 --- a/docs/examples/guide/578808065fee8691355b8f25c35782cd.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - filter_path: 'profile.shards.fetch', - body: { - profile: true, - query: { - term: { - 'user.id' => { - value: 'elkbee' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5797df4b8e71d821a1488cbb63481104.asciidoc b/docs/examples/guide/5797df4b8e71d821a1488cbb63481104.asciidoc deleted file mode 100644 index 8f85ef3d96..0000000000 --- a/docs/examples/guide/5797df4b8e71d821a1488cbb63481104.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.health_report( - feature: 'shards_capacity' -) -puts response ----- diff --git a/docs/examples/guide/57a3e8d2ca64e37e90d658c4cd935399.asciidoc b/docs/examples/guide/57a3e8d2ca64e37e90d658c4cd935399.asciidoc deleted file mode 100644 index 9c87314187..0000000000 --- a/docs/examples/guide/57a3e8d2ca64e37e90d658c4cd935399.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'items', - body: { - query: { - bool: { - must: { - match: { - name: 'chocolate' - } - }, - should: { - distance_feature: { - field: 'location', - pivot: '1000m', - origin: [ - -71.3, - 41.15 - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/582c4b05401dbc190b19411282d85310.asciidoc b/docs/examples/guide/582c4b05401dbc190b19411282d85310.asciidoc deleted file mode 100644 index 7cc6fa5c09..0000000000 --- a/docs/examples/guide/582c4b05401dbc190b19411282d85310.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'my-index-000001', - id: 1, - body: { - script: { - source: "if (ctx._source.tags.contains(params['tag'])) { ctx.op = 'delete' } else { ctx.op = 'none' }", - lang: 'painless', - params: { - tag: 'green' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/584f502cf840134f2db5f39e2483ced1.asciidoc b/docs/examples/guide/584f502cf840134f2db5f39e2483ced1.asciidoc deleted file mode 100644 index 3bb0117886..0000000000 --- a/docs/examples/guide/584f502cf840134f2db5f39e2483ced1.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'portuguese_example', - body: { - settings: { - analysis: { - filter: { - portuguese_stop: { - type: 'stop', - stopwords: '_portuguese_' - }, - portuguese_keywords: { - type: 'keyword_marker', - keywords: [ - 'exemplo' - ] - }, - portuguese_stemmer: { - type: 'stemmer', - language: 'light_portuguese' - } - }, - analyzer: { - rebuilt_portuguese: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'portuguese_stop', - 'portuguese_keywords', - 'portuguese_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/585a34ad79aee16678b37da785933ac8.asciidoc b/docs/examples/guide/585a34ad79aee16678b37da785933ac8.asciidoc deleted file mode 100644 index 9d81ac3a80..0000000000 --- a/docs/examples/guide/585a34ad79aee16678b37da785933ac8.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ilm.stop -puts response ----- diff --git a/docs/examples/guide/585b19369cb9b9763a7e8d405f009a47.asciidoc b/docs/examples/guide/585b19369cb9b9763a7e8d405f009a47.asciidoc deleted file mode 100644 index 496e87533b..0000000000 --- a/docs/examples/guide/585b19369cb9b9763a7e8d405f009a47.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - runtime: { - day_of_week: nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/5865ca8d2bcd087ed5dbee33fafee57f.asciidoc b/docs/examples/guide/5865ca8d2bcd087ed5dbee33fafee57f.asciidoc deleted file mode 100644 index ba4759cad5..0000000000 --- a/docs/examples/guide/5865ca8d2bcd087ed5dbee33fafee57f.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.explain_data_lifecycle( - index: '.ds-my-data-stream-*' -) -puts response ----- diff --git a/docs/examples/guide/586cfa0e5fd695b7d451e854f9fb4a9c.asciidoc b/docs/examples/guide/586cfa0e5fd695b7d451e854f9fb4a9c.asciidoc deleted file mode 100644 index 9a2582c168..0000000000 --- a/docs/examples/guide/586cfa0e5fd695b7d451e854f9fb4a9c.asciidoc +++ /dev/null @@ -1,52 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my_locations', - body: { - mappings: { - properties: { - location: { - type: 'geo_point' - } - } - } - } -) -puts response - -response = client.index( - index: 'my_locations', - id: 1, - refresh: true, - body: { - location: 'POINT(4.912350 52.374081)', - city: 'Amsterdam', - name: 'NEMO Science Museum' - } -) -puts response - -response = client.index( - index: 'my_locations', - id: 2, - refresh: true, - body: { - location: 'POINT(4.405200 51.222900)', - city: 'Antwerp', - name: 'Letterenhuis' - } -) -puts response - -response = client.index( - index: 'my_locations', - id: 3, - refresh: true, - body: { - location: 'POINT(2.336389 48.861111)', - city: 'Paris', - name: 'Musée du Louvre' - } -) -puts response ----- diff --git a/docs/examples/guide/58e684e0b771b4646662fe12d3060c05.asciidoc b/docs/examples/guide/58e684e0b771b4646662fe12d3060c05.asciidoc deleted file mode 100644 index 0dc415bc83..0000000000 --- a/docs/examples/guide/58e684e0b771b4646662fe12d3060c05.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'cjk_width_example', - body: { - settings: { - analysis: { - analyzer: { - standard_cjk_width: { - tokenizer: 'standard', - filter: [ - 'cjk_width' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/58f72be60c25752d7899a35fc60fe6eb.asciidoc b/docs/examples/guide/58f72be60c25752d7899a35fc60fe6eb.asciidoc deleted file mode 100644 index 51ecd22796..0000000000 --- a/docs/examples/guide/58f72be60c25752d7899a35fc60fe6eb.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'logger.org.elasticsearch.indices.recovery' => 'DEBUG' - } - } -) -puts response ----- diff --git a/docs/examples/guide/5969c446688c8b326acc80276573e9d2.asciidoc b/docs/examples/guide/5969c446688c8b326acc80276573e9d2.asciidoc deleted file mode 100644 index d67f8fc3d7..0000000000 --- a/docs/examples/guide/5969c446688c8b326acc80276573e9d2.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - highlight: { - number_of_fragments: 3, - fragment_size: 150, - fields: { - body: { - pre_tags: [ - '' - ], - post_tags: [ - '' - ] - }, - 'blog.title' => { - number_of_fragments: 0 - }, - 'blog.author' => { - number_of_fragments: 0 - }, - 'blog.comment' => { - number_of_fragments: 5, - order: 'score' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/59726e3c90e1218487a781508788c243.asciidoc b/docs/examples/guide/59726e3c90e1218487a781508788c243.asciidoc deleted file mode 100644 index 0916f0fb42..0000000000 --- a/docs/examples/guide/59726e3c90e1218487a781508788c243.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - sale_date: { - auto_date_histogram: { - field: 'date', - buckets: 10, - missing: '2000/01/01' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/597d456edfcb3d410954a3e9b5babf9a.asciidoc b/docs/examples/guide/597d456edfcb3d410954a3e9b5babf9a.asciidoc deleted file mode 100644 index 08461d6cdc..0000000000 --- a/docs/examples/guide/597d456edfcb3d410954a3e9b5babf9a.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index', - body: { - mappings: { - dynamic_templates: [ - { - strings: { - match_mapping_type: 'string', - mapping: { - type: 'keyword' - } - } - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/5987afb2c17c73fe3d860937565ef115.asciidoc b/docs/examples/guide/5987afb2c17c73fe3d860937565ef115.asciidoc deleted file mode 100644 index dda75d53f5..0000000000 --- a/docs/examples/guide/5987afb2c17c73fe3d860937565ef115.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.open_point_in_time( - index: 'my-index-000001', - keep_alive: '1m' -) -puts response ----- diff --git a/docs/examples/guide/599454613ac699d447537e79e65ae35a.asciidoc b/docs/examples/guide/599454613ac699d447537e79e65ae35a.asciidoc deleted file mode 100644 index 832b58a52c..0000000000 --- a/docs/examples/guide/599454613ac699d447537e79e65ae35a.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - script_fields: { - my_doubled_field: { - script: { - source: "doc['my_field'].value * params['multiplier']", - params: { - multiplier: 2 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/599f693cc7d30b1153f5eeecec8eb23a.asciidoc b/docs/examples/guide/599f693cc7d30b1153f5eeecec8eb23a.asciidoc deleted file mode 100644 index f27f4fe99c..0000000000 --- a/docs/examples/guide/599f693cc7d30b1153f5eeecec8eb23a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete_template( - name: 'my-legacy-index-template' -) -puts response ----- diff --git a/docs/examples/guide/59b8b9555f4aa30bc4613f819e9fc8f0.asciidoc b/docs/examples/guide/59b8b9555f4aa30bc4613f819e9fc8f0.asciidoc deleted file mode 100644 index 59da0b6b10..0000000000 --- a/docs/examples/guide/59b8b9555f4aa30bc4613f819e9fc8f0.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.close( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/59f0ad2a6f97200e98e8eb079cdd8334.asciidoc b/docs/examples/guide/59f0ad2a6f97200e98e8eb079cdd8334.asciidoc deleted file mode 100644 index 56a495e5da..0000000000 --- a/docs/examples/guide/59f0ad2a6f97200e98e8eb079cdd8334.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.mget( - index: 'my-index-000001', - body: { - ids: [ - '1', - '2' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/5a006feed86309b547bbaa1baca1c496.asciidoc b/docs/examples/guide/5a006feed86309b547bbaa1baca1c496.asciidoc deleted file mode 100644 index d502847953..0000000000 --- a/docs/examples/guide/5a006feed86309b547bbaa1baca1c496.asciidoc +++ /dev/null @@ -1,71 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_templates: [ - { - numeric_counts: { - match_mapping_type: [ - 'long', - 'double' - ], - match: 'count', - mapping: { - type: '{dynamic_type}', - index: false - } - } - }, - { - integers: { - match_mapping_type: 'long', - mapping: { - type: 'integer' - } - } - }, - { - strings: { - match_mapping_type: 'string', - mapping: { - type: 'text', - fields: { - raw: { - type: 'keyword', - ignore_above: 256 - } - } - } - } - }, - { - non_objects_keyword: { - match_mapping_type: '*', - unmatch_mapping_type: 'object', - mapping: { - type: 'keyword' - } - } - } - ] - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - my_integer: 5, - my_string: 'Some string', - my_boolean: 'false', - field: { - count: 4 - } - } -) -puts response ----- diff --git a/docs/examples/guide/5a3855f1b3e37d89ab7cbcc4f7ae1dd3.asciidoc b/docs/examples/guide/5a3855f1b3e37d89ab7cbcc4f7ae1dd3.asciidoc deleted file mode 100644 index 324bc19401..0000000000 --- a/docs/examples/guide/5a3855f1b3e37d89ab7cbcc4f7ae1dd3.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - { - type: 'limit', - max_token_count: 2 - } - ], - text: 'quick fox jumps over lazy dog' - } -) -puts response ----- diff --git a/docs/examples/guide/5a3fe9584d203d1fd6c96981ba34e0de.asciidoc b/docs/examples/guide/5a3fe9584d203d1fd6c96981ba34e0de.asciidoc deleted file mode 100644 index 6d787b950e..0000000000 --- a/docs/examples/guide/5a3fe9584d203d1fd6c96981ba34e0de.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'postal_codes', - body: { - mappings: { - properties: { - location: { - type: 'geo_shape' - }, - postal_code: { - type: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5a754dcc854b9154296550a0b581cb9d.asciidoc b/docs/examples/guide/5a754dcc854b9154296550a0b581cb9d.asciidoc deleted file mode 100644 index d621277c89..0000000000 --- a/docs/examples/guide/5a754dcc854b9154296550a0b581cb9d.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'network-traffic', - body: { - size: 0, - aggregations: { - "ipv4-subnets": { - ip_prefix: { - field: 'ipv4', - prefix_length: 24 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5a7f05ab1d05b4eef5ff327168517165.asciidoc b/docs/examples/guide/5a7f05ab1d05b4eef5ff327168517165.asciidoc deleted file mode 100644 index 9f8c918a2c..0000000000 --- a/docs/examples/guide/5a7f05ab1d05b4eef5ff327168517165.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - routing: 'my-routing-value,my-routing-value-2', - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5ab9b44939fb30f5b4adbdcc4bcc0733.asciidoc b/docs/examples/guide/5ab9b44939fb30f5b4adbdcc4bcc0733.asciidoc deleted file mode 100644 index 5bd84dff83..0000000000 --- a/docs/examples/guide/5ab9b44939fb30f5b4adbdcc4bcc0733.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'datastream_policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_age: '5m' - }, - downsample: { - fixed_interval: '1h' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5afbd9caed88c32f8a2968c07054f096.asciidoc b/docs/examples/guide/5afbd9caed88c32f8a2968c07054f096.asciidoc deleted file mode 100644 index 9f6a5bf929..0000000000 --- a/docs/examples/guide/5afbd9caed88c32f8a2968c07054f096.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.logstash.delete_pipeline( - id: 'my_pipeline' -) -puts response ----- diff --git a/docs/examples/guide/5b266deba5396c7810af1b8315c23596.asciidoc b/docs/examples/guide/5b266deba5396c7810af1b8315c23596.asciidoc deleted file mode 100644 index 02e28c7c69..0000000000 --- a/docs/examples/guide/5b266deba5396c7810af1b8315c23596.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - size: 0, - aggregations: { - grouped: { - geohash_grid: { - field: 'location', - precision: 2 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5b281956e35a26e734c482b42b356c0d.asciidoc b/docs/examples/guide/5b281956e35a26e734c482b42b356c0d.asciidoc deleted file mode 100644 index 74ca002aa1..0000000000 --- a/docs/examples/guide/5b281956e35a26e734c482b42b356c0d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.exists_alias( - name: 'my-alias' -) -puts response ----- diff --git a/docs/examples/guide/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc b/docs/examples/guide/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc deleted file mode 100644 index ec7658f95d..0000000000 --- a/docs/examples/guide/5b2a13366bd4e1ab4b25d04d360570dc.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'template_1', - body: { - template: { - settings: { - number_of_shards: 1 - } - }, - _meta: { - description: 'set number of shards to one', - serialization: { - class: 'MyComponentTemplate', - id: 10 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5b3384992c398ea8a3064d2e08725e2b.asciidoc b/docs/examples/guide/5b3384992c398ea8a3064d2e08725e2b.asciidoc deleted file mode 100644 index 3795f7e01d..0000000000 --- a/docs/examples/guide/5b3384992c398ea8a3064d2e08725e2b.asciidoc +++ /dev/null @@ -1,78 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'node', - body: { - mappings: { - properties: { - ip: { - type: 'ip' - }, - date: { - type: 'date' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'node', - refresh: true, - body: [ - { - index: {} - }, - { - ip: '192.168.0.1', - date: '2020-01-01T01:01:01', - m: 1 - }, - { - index: {} - }, - { - ip: '192.168.0.1', - date: '2020-01-01T02:01:01', - m: 2 - }, - { - index: {} - }, - { - ip: '192.168.0.2', - date: '2020-01-01T02:01:01', - m: 3 - } - ] -) -puts response - -response = client.search( - index: 'node', - filter_path: 'aggregations', - body: { - aggregations: { - ip: { - terms: { - field: 'ip' - }, - aggregations: { - tm: { - top_metrics: { - metrics: { - field: 'm' - }, - sort: { - date: 'desc' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5b58007f10700ec7934580f034404652.asciidoc b/docs/examples/guide/5b58007f10700ec7934580f034404652.asciidoc deleted file mode 100644 index 52638ff19f..0000000000 --- a/docs/examples/guide/5b58007f10700ec7934580f034404652.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.create( - index: 'my-index-000001', - id: 1, - body: { - "@timestamp": '2099-11-15T13:12:00', - message: 'GET /search HTTP/1.1 200 1070000', - user: { - id: 'kimchy' - } - } -) -puts response ----- diff --git a/docs/examples/guide/5b6bc085943e9189236d98b3c05ed62c.asciidoc b/docs/examples/guide/5b6bc085943e9189236d98b3c05ed62c.asciidoc deleted file mode 100644 index 3160f4f96d..0000000000 --- a/docs/examples/guide/5b6bc085943e9189236d98b3c05ed62c.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_primary_shard_size: '25GB' - } - } - }, - delete: { - min_age: '30d', - actions: { - delete: {} - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc b/docs/examples/guide/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc deleted file mode 100644 index 3e843f3255..0000000000 --- a/docs/examples/guide/5b7d6f1db88ca6f42c48fa3dbb4341e8.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_mapping( - index: '*' -) -puts response - -response = client.indices.get_mapping( - index: '_all' -) -puts response - -response = client.indices.get_mapping -puts response ----- diff --git a/docs/examples/guide/5b8119b4d9a09f4643be5a5b40875c8f.asciidoc b/docs/examples/guide/5b8119b4d9a09f4643be5a5b40875c8f.asciidoc deleted file mode 100644 index 47fa35d5e1..0000000000 --- a/docs/examples/guide/5b8119b4d9a09f4643be5a5b40875c8f.asciidoc +++ /dev/null @@ -1,50 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - is_published: true - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - refresh: true, - body: { - is_published: false - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - aggregations: { - publish_state: { - terms: { - field: 'is_published' - } - } - }, - sort: [ - 'is_published' - ], - fields: [ - { - field: 'weight' - } - ], - runtime_mappings: { - weight: { - type: 'long', - script: "emit(doc['is_published'].value ? 10 : 0)" - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5b86d54900e2c4c043a54ca7ae2df0f0.asciidoc b/docs/examples/guide/5b86d54900e2c4c043a54ca7ae2df0f0.asciidoc deleted file mode 100644 index b2a3908192..0000000000 --- a/docs/examples/guide/5b86d54900e2c4c043a54ca7ae2df0f0.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - flattened: { - type: 'flattened' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - flattened: { - field: [ - 'foo' - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/5ba32ebaa7ee28a339c7693696d305ca.asciidoc b/docs/examples/guide/5ba32ebaa7ee28a339c7693696d305ca.asciidoc deleted file mode 100644 index 5a6332688a..0000000000 --- a/docs/examples/guide/5ba32ebaa7ee28a339c7693696d305ca.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'attachment', - body: { - description: 'Extract attachment information', - processors: [ - { - attachment: { - field: 'data', - properties: [ - 'content', - 'title' - ], - remove_binary: false - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/5bbccf103107e505c17ae59863753efd.asciidoc b/docs/examples/guide/5bbccf103107e505c17ae59863753efd.asciidoc deleted file mode 100644 index 8be58c01f6..0000000000 --- a/docs/examples/guide/5bbccf103107e505c17ae59863753efd.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_influencers( - job_id: 'high_sum_total_sales', - body: { - sort: 'influencer_score', - desc: true - } -) -puts response ----- diff --git a/docs/examples/guide/5c187ba92dd1678fda86b5eec8cc7421.asciidoc b/docs/examples/guide/5c187ba92dd1678fda86b5eec8cc7421.asciidoc deleted file mode 100644 index e487b05b58..0000000000 --- a/docs/examples/guide/5c187ba92dd1678fda86b5eec8cc7421.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - bool: { - filter: { - script: { - script: "\n double amount = doc['amount'].value;\n if (doc['type'].value == 'expense') {\n amount *= -1;\n }\n return amount < 10;\n " - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5c22172a944864a7d138decdc08558b4.asciidoc b/docs/examples/guide/5c22172a944864a7d138decdc08558b4.asciidoc deleted file mode 100644 index 4eecde300c..0000000000 --- a/docs/examples/guide/5c22172a944864a7d138decdc08558b4.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.indices( - index: 'my-data-stream', - v: true, - h: 'health,status,index,docs.count' -) -puts response ----- diff --git a/docs/examples/guide/5c249eaeb99e6aee07162128288ac1b1.asciidoc b/docs/examples/guide/5c249eaeb99e6aee07162128288ac1b1.asciidoc deleted file mode 100644 index 746b0b0ef1..0000000000 --- a/docs/examples/guide/5c249eaeb99e6aee07162128288ac1b1.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'date', - calendar_interval: '1M' - }, - aggregations: { - the_percentile: { - percentiles: { - field: 'price', - percents: [ - 1, - 99 - ] - } - }, - the_movperc: { - moving_percentiles: { - buckets_path: 'the_percentile', - window: 10 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5c24a9a0ddbfa50628dacdb9d25f7ab0.asciidoc b/docs/examples/guide/5c24a9a0ddbfa50628dacdb9d25f7ab0.asciidoc deleted file mode 100644 index 3188f5357c..0000000000 --- a/docs/examples/guide/5c24a9a0ddbfa50628dacdb9d25f7ab0.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'exams', - body: { - size: 0, - aggregations: { - grades_stats: { - extended_stats: { - field: 'grade', - missing: 0 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5c2f486c27bd5346e512265f93375d16.asciidoc b/docs/examples/guide/5c2f486c27bd5346e512265f93375d16.asciidoc deleted file mode 100644 index 46b19d4647..0000000000 --- a/docs/examples/guide/5c2f486c27bd5346e512265f93375d16.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - range: { - timestamp: { - time_zone: '+01:00', - gte: '2020-01-01T00:00:00', - lte: 'now' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5c6fbeac20dc23b613847f35d431ecab.asciidoc b/docs/examples/guide/5c6fbeac20dc23b613847f35d431ecab.asciidoc deleted file mode 100644 index e9c25562c7..0000000000 --- a/docs/examples/guide/5c6fbeac20dc23b613847f35d431ecab.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - function_score: { - functions: [ - { - gauss: { - price: { - origin: '0', - scale: '20' - } - } - }, - { - gauss: { - location: { - origin: '11, 12', - scale: '2km' - } - } - } - ], - query: { - match: { - properties: 'balcony' - } - }, - score_mode: 'multiply' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5c7ece1f30267adabdb832424871900a.asciidoc b/docs/examples/guide/5c7ece1f30267adabdb832424871900a.asciidoc deleted file mode 100644 index ae6b0b230b..0000000000 --- a/docs/examples/guide/5c7ece1f30267adabdb832424871900a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.allocation( - v: true -) -puts response ----- diff --git a/docs/examples/guide/5c8ac24dd56e85d8f3f6705ec3c6dc32.asciidoc b/docs/examples/guide/5c8ac24dd56e85d8f3f6705ec3c6dc32.asciidoc deleted file mode 100644 index 4102d4aaa7..0000000000 --- a/docs/examples/guide/5c8ac24dd56e85d8f3f6705ec3c6dc32.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'circles', - body: { - mappings: { - properties: { - circle: { - type: 'geo_shape' - } - } - } - } -) -puts response - -response = client.ingest.put_pipeline( - id: 'polygonize_circles', - body: { - description: 'translate circle to polygon', - processors: [ - { - circle: { - field: 'circle', - error_distance: 28, - shape_type: 'geo_shape' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/5ccfd9f4698dcd7cdfbc6bad60081aab.asciidoc b/docs/examples/guide/5ccfd9f4698dcd7cdfbc6bad60081aab.asciidoc deleted file mode 100644 index a599e4a042..0000000000 --- a/docs/examples/guide/5ccfd9f4698dcd7cdfbc6bad60081aab.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_data_frame_analytics( - id: 'loganalytics' -) -puts response ----- diff --git a/docs/examples/guide/5cd792dff7d5891c33bef098d9338ce1.asciidoc b/docs/examples/guide/5cd792dff7d5891c33bef098d9338ce1.asciidoc deleted file mode 100644 index 2b0a35c356..0000000000 --- a/docs/examples/guide/5cd792dff7d5891c33bef098d9338ce1.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - title: { - type: 'text', - store: true - }, - date: { - type: 'date', - store: true - }, - content: { - type: 'text' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - title: 'Some short title', - date: '2015-01-01', - content: 'A very long content field...' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - stored_fields: [ - 'title', - 'date' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/5cfab507e50d8c5182939412a9dbcdc8.asciidoc b/docs/examples/guide/5cfab507e50d8c5182939412a9dbcdc8.asciidoc deleted file mode 100644 index 73c95b6ea9..0000000000 --- a/docs/examples/guide/5cfab507e50d8c5182939412a9dbcdc8.asciidoc +++ /dev/null @@ -1,83 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'places', - body: { - mappings: { - properties: { - geometry: { - type: 'geo_shape' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'places', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - name: 'NEMO Science Museum', - geometry: 'POINT(4.912350 52.374081)' - }, - { - index: { - _id: 2 - } - }, - { - name: 'Sportpark De Weeren', - geometry: { - type: 'Polygon', - coordinates: [ - [ - [ - 4.965305328369141, - 52.39347642069457 - ], - [ - 4.966979026794433, - 52.391721758934835 - ], - [ - 4.969425201416015, - 52.39238958618537 - ], - [ - 4.967944622039794, - 52.39420969150824 - ], - [ - 4.965305328369141, - 52.39347642069457 - ] - ] - ] - } - } - ] -) -puts response - -response = client.search( - index: 'places', - size: 0, - body: { - aggregations: { - centroid: { - geo_centroid: { - field: 'geometry' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5d03bb385904d20c5323885706738459.asciidoc b/docs/examples/guide/5d03bb385904d20c5323885706738459.asciidoc deleted file mode 100644 index fd104efffe..0000000000 --- a/docs/examples/guide/5d03bb385904d20c5323885706738459.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.update_aliases( - body: { - actions: [ - { - add: { - index: 'my-data-stream', - alias: 'my-alias' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/5d428ea66252fd252b6a8d6f47605c86.asciidoc b/docs/examples/guide/5d428ea66252fd252b6a8d6f47605c86.asciidoc deleted file mode 100644 index 6735933ac7..0000000000 --- a/docs/examples/guide/5d428ea66252fd252b6a8d6f47605c86.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'cjk_bigram_example', - body: { - settings: { - analysis: { - analyzer: { - han_bigrams: { - tokenizer: 'standard', - filter: [ - 'han_bigrams_filter' - ] - } - }, - filter: { - han_bigrams_filter: { - type: 'cjk_bigram', - ignored_scripts: [ - 'hangul', - 'hiragana', - 'katakana' - ], - output_unigrams: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5d689d74062cddd01a0711a2fa7f23fd.asciidoc b/docs/examples/guide/5d689d74062cddd01a0711a2fa7f23fd.asciidoc deleted file mode 100644 index 7c556e95d2..0000000000 --- a/docs/examples/guide/5d689d74062cddd01a0711a2fa7f23fd.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - "logger.org.elasticsearch.transport.TransportService.tracer": 'TRACE' - } - } -) -puts response ----- diff --git a/docs/examples/guide/5d7980d8c745abf7ea0fa573e818bd5b.asciidoc b/docs/examples/guide/5d7980d8c745abf7ea0fa573e818bd5b.asciidoc deleted file mode 100644 index 2729b471f1..0000000000 --- a/docs/examples/guide/5d7980d8c745abf7ea0fa573e818bd5b.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - en: { - tokenizer: 'standard', - filter: [ - 'my_shingle_filter' - ] - } - }, - filter: { - my_shingle_filter: { - type: 'shingle', - min_shingle_size: 2, - max_shingle_size: 5, - output_unigrams: false - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc b/docs/examples/guide/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc deleted file mode 100644 index 79f6b24da8..0000000000 --- a/docs/examples/guide/5d9d7b84e2fec7ecd832145cbb951cf1.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - expired_sessions: { - terms: { - field: 'account_id', - include: { - partition: 0, - num_partitions: 20 - }, - size: 10_000, - order: { - last_access: 'asc' - } - }, - aggregations: { - last_access: { - max: { - field: 'access_date' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5da6efd5b038ada64c9e853c88c1ec47.asciidoc b/docs/examples/guide/5da6efd5b038ada64c9e853c88c1ec47.asciidoc deleted file mode 100644 index a7e1d5a6b6..0000000000 --- a/docs/examples/guide/5da6efd5b038ada64c9e853c88c1ec47.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - multi_match: { - query: 'brown fox', - type: 'best_fields', - fields: [ - 'subject', - 'message' - ], - tie_breaker: 0.3 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5db5349162a4fbe74bffb646926a2495.asciidoc b/docs/examples/guide/5db5349162a4fbe74bffb646926a2495.asciidoc deleted file mode 100644 index 7a7e45ae07..0000000000 --- a/docs/examples/guide/5db5349162a4fbe74bffb646926a2495.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - my_range: { - type: 'long_range' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - my_range: { - gt: 200, - lt: 300 - } - } -) -puts response ----- diff --git a/docs/examples/guide/5dbf06ca9058843f572676fcaf587f75.asciidoc b/docs/examples/guide/5dbf06ca9058843f572676fcaf587f75.asciidoc deleted file mode 100644 index 8406e46e43..0000000000 --- a/docs/examples/guide/5dbf06ca9058843f572676fcaf587f75.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - prices: { - variable_width_histogram: { - field: 'price', - buckets: 2 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5df3226fdc8f1f66ae92ba2f527af8c0.asciidoc b/docs/examples/guide/5df3226fdc8f1f66ae92ba2f527af8c0.asciidoc deleted file mode 100644 index ca8615cb2c..0000000000 --- a/docs/examples/guide/5df3226fdc8f1f66ae92ba2f527af8c0.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - my_field: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/5dfb23f6e36ef484f1d3271bae76a8d1.asciidoc b/docs/examples/guide/5dfb23f6e36ef484f1d3271bae76a8d1.asciidoc deleted file mode 100644 index 8f9ee8bacc..0000000000 --- a/docs/examples/guide/5dfb23f6e36ef484f1d3271bae76a8d1.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.recovery( - human: true -) -puts response ----- diff --git a/docs/examples/guide/5dfe24287bb930ad33345caf092a004b.asciidoc b/docs/examples/guide/5dfe24287bb930ad33345caf092a004b.asciidoc deleted file mode 100644 index 7bea66cd70..0000000000 --- a/docs/examples/guide/5dfe24287bb930ad33345caf092a004b.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - bool: { - must_not: { - exists: { - field: 'user.id' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5e099493f135ff7bd614e935c4f2bf5a.asciidoc b/docs/examples/guide/5e099493f135ff7bd614e935c4f2bf5a.asciidoc deleted file mode 100644 index 0395116c80..0000000000 --- a/docs/examples/guide/5e099493f135ff7bd614e935c4f2bf5a.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - request_cache: true, - body: { - size: 0, - aggregations: { - popular_colors: { - terms: { - field: 'colors' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5e124875d97c27362ae858160ae1c6d5.asciidoc b/docs/examples/guide/5e124875d97c27362ae858160ae1c6d5.asciidoc deleted file mode 100644 index 2438a1f225..0000000000 --- a/docs/examples/guide/5e124875d97c27362ae858160ae1c6d5.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ccr.get_auto_follow_pattern -puts response ----- diff --git a/docs/examples/guide/5e2f7097eb299de553d0fa0087d70a59.asciidoc b/docs/examples/guide/5e2f7097eb299de553d0fa0087d70a59.asciidoc deleted file mode 100644 index becbee211e..0000000000 --- a/docs/examples/guide/5e2f7097eb299de553d0fa0087d70a59.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - index: { - 'sort.field' => [ - 'username', - 'timestamp' - ], - 'sort.order' => [ - 'asc', - 'desc' - ] - } - }, - mappings: { - properties: { - username: { - type: 'keyword', - doc_values: true - }, - timestamp: { - type: 'date' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5e3673bcbef5731746e400c4f3fe134d.asciidoc b/docs/examples/guide/5e3673bcbef5731746e400c4f3fe134d.asciidoc deleted file mode 100644 index 7262e9607c..0000000000 --- a/docs/examples/guide/5e3673bcbef5731746e400c4f3fe134d.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'test', - id: 1, - body: { - location: [ - { - coordinates: [ - 46.25, - 20.14 - ], - type: 'point' - }, - { - coordinates: [ - 47.49, - 19.04 - ], - type: 'point' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/5e415c490a46358643ee2aab554b4876.asciidoc b/docs/examples/guide/5e415c490a46358643ee2aab554b4876.asciidoc deleted file mode 100644 index 4b992d5fe4..0000000000 --- a/docs/examples/guide/5e415c490a46358643ee2aab554b4876.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.cluster.allocation_explain( - filter_path: 'index,node_allocation_decisions.node_name,node_allocation_decisions.deciders.*', - body: { - index: 'my-index', - shard: 0, - primary: false - } -) -puts response ----- diff --git a/docs/examples/guide/5e6419bc3e2db0d0f05bce58d8cc9215.asciidoc b/docs/examples/guide/5e6419bc3e2db0d0f05bce58d8cc9215.asciidoc deleted file mode 100644 index ea34554ed1..0000000000 --- a/docs/examples/guide/5e6419bc3e2db0d0f05bce58d8cc9215.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - processors: [ - { - rename: { - description: "Rename 'provider' to 'cloud.provider'", - field: 'provider', - target_field: 'cloud.provider', - on_failure: [ - { - set: { - description: "Set 'error.message'", - field: 'error.message', - value: "Field 'provider' does not exist. Cannot rename to 'cloud.provider'", - override: false - } - } - ] - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/5e87dd38ac3a0fd59ad794005b16d13e.asciidoc b/docs/examples/guide/5e87dd38ac3a0fd59ad794005b16d13e.asciidoc deleted file mode 100644 index 2a62d5eed6..0000000000 --- a/docs/examples/guide/5e87dd38ac3a0fd59ad794005b16d13e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.slm.get_lifecycle( - policy_id: 'nightly-snapshots' -) -puts response ----- diff --git a/docs/examples/guide/5e9a7845e60b79685aab59877c5fbd1a.asciidoc b/docs/examples/guide/5e9a7845e60b79685aab59877c5fbd1a.asciidoc deleted file mode 100644 index 227b9ffa09..0000000000 --- a/docs/examples/guide/5e9a7845e60b79685aab59877c5fbd1a.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - ignored_fields: { - terms: { - field: '_ignored' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5ea9da129ca70a5fe534f27a82d80b29.asciidoc b/docs/examples/guide/5ea9da129ca70a5fe534f27a82d80b29.asciidoc deleted file mode 100644 index bcadf00203..0000000000 --- a/docs/examples/guide/5ea9da129ca70a5fe534f27a82d80b29.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'example', - body: { - mappings: { - properties: { - comment: { - type: 'text', - index_options: 'offsets' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5f031b7bd2b7d98d2d10df7420d269ff.asciidoc b/docs/examples/guide/5f031b7bd2b7d98d2d10df7420d269ff.asciidoc deleted file mode 100644 index b45f637b8e..0000000000 --- a/docs/examples/guide/5f031b7bd2b7d98d2d10df7420d269ff.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.resolve_index( - name: 'new-data-stream*' -) -puts response ----- diff --git a/docs/examples/guide/5f1ed9cfdc149763b444acfbe10b0e16.asciidoc b/docs/examples/guide/5f1ed9cfdc149763b444acfbe10b0e16.asciidoc deleted file mode 100644 index 6efa01bc57..0000000000 --- a/docs/examples/guide/5f1ed9cfdc149763b444acfbe10b0e16.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - user_id: { - type: 'keyword', - ignore_above: 20 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5f3373887e8d3dc31239b687a5151449.asciidoc b/docs/examples/guide/5f3373887e8d3dc31239b687a5151449.asciidoc deleted file mode 100644 index 3e3c1c4011..0000000000 --- a/docs/examples/guide/5f3373887e8d3dc31239b687a5151449.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - number_one: { - type: 'integer' - }, - number_two: { - type: 'integer', - coerce: false - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - number_one: '10' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - number_two: '10' - } -) -puts response ----- diff --git a/docs/examples/guide/5f72ab800c3db9d118df95e2a378d411.asciidoc b/docs/examples/guide/5f72ab800c3db9d118df95e2a378d411.asciidoc deleted file mode 100644 index ff2748001f..0000000000 --- a/docs/examples/guide/5f72ab800c3db9d118df95e2a378d411.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: '.ds-my-data-stream-2099.03.09-000003', - id: 2 -) -puts response ----- diff --git a/docs/examples/guide/5f79c42b0f74fdf71359cef82843fad3.asciidoc b/docs/examples/guide/5f79c42b0f74fdf71359cef82843fad3.asciidoc deleted file mode 100644 index f8babd9f7b..0000000000 --- a/docs/examples/guide/5f79c42b0f74fdf71359cef82843fad3.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - intervals: { - my_text: { - all_of: { - intervals: [ - { - match: { - query: 'the' - } - }, - { - any_of: { - intervals: [ - { - match: { - query: 'big' - } - }, - { - match: { - query: 'big bad' - } - } - ] - } - }, - { - match: { - query: 'wolf' - } - } - ], - max_gaps: 0, - ordered: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5f8fb5513d4f725434db2f517ad4298f.asciidoc b/docs/examples/guide/5f8fb5513d4f725434db2f517ad4298f.asciidoc deleted file mode 100644 index 76ed0e1e0a..0000000000 --- a/docs/examples/guide/5f8fb5513d4f725434db2f517ad4298f.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index', - body: { - settings: { - number_of_shards: 1, - similarity: { - scripted_tfidf: { - type: 'scripted', - weight_script: { - source: 'double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; return query.boost * idf;' - }, - script: { - source: 'double tf = Math.sqrt(doc.freq); double norm = 1/Math.sqrt(doc.length); return weight * tf * norm;' - } - } - } - }, - mappings: { - properties: { - field: { - type: 'text', - similarity: 'scripted_tfidf' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/5faa121e00a0582160b2adb2b72fed67.asciidoc b/docs/examples/guide/5faa121e00a0582160b2adb2b72fed67.asciidoc deleted file mode 100644 index aa24161bc7..0000000000 --- a/docs/examples/guide/5faa121e00a0582160b2adb2b72fed67.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_settings( - index: 'log_2099_-*', - name: 'index.number_*' -) -puts response ----- diff --git a/docs/examples/guide/5fca6671bc8eaddc44ac488d1c3c6909.asciidoc b/docs/examples/guide/5fca6671bc8eaddc44ac488d1c3c6909.asciidoc deleted file mode 100644 index a13d32e7a9..0000000000 --- a/docs/examples/guide/5fca6671bc8eaddc44ac488d1c3c6909.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_calendars( - calendar_id: 'planned-outages' -) -puts response ----- diff --git a/docs/examples/guide/5ffe6fd303400e8678fa1ead291e237f.asciidoc b/docs/examples/guide/5ffe6fd303400e8678fa1ead291e237f.asciidoc deleted file mode 100644 index c5d230474b..0000000000 --- a/docs/examples/guide/5ffe6fd303400e8678fa1ead291e237f.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_outlier: { - percentiles: { - field: 'load_time' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6013ed65d2058da5ce704b47a504b60a.asciidoc b/docs/examples/guide/6013ed65d2058da5ce704b47a504b60a.asciidoc deleted file mode 100644 index 3a6f3e003c..0000000000 --- a/docs/examples/guide/6013ed65d2058da5ce704b47a504b60a.asciidoc +++ /dev/null @@ -1,52 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'test', - refresh: true, - body: [ - { - index: {} - }, - { - s: 1, - m: 3.1415 - }, - { - index: {} - }, - { - s: 2, - m: 1 - }, - { - index: {} - }, - { - s: 3, - m: 2.71828 - } - ] -) -puts response - -response = client.search( - index: 'test', - filter_path: 'aggregations', - body: { - aggregations: { - tm: { - top_metrics: { - metrics: { - field: 'm' - }, - sort: { - s: 'desc' - }, - size: 3 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/60299454aa19fec15a604a0dd06fe522.asciidoc b/docs/examples/guide/60299454aa19fec15a604a0dd06fe522.asciidoc deleted file mode 100644 index 3a135e7753..0000000000 --- a/docs/examples/guide/60299454aa19fec15a604a0dd06fe522.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_settings( - include_defaults: true, - filter_path: '*.cluster.routing.allocation.disk.watermark.high*' -) -puts response ----- diff --git a/docs/examples/guide/602e04051c092cf77de2f75a563661b8.asciidoc b/docs/examples/guide/602e04051c092cf77de2f75a563661b8.asciidoc deleted file mode 100644 index fd3eab849d..0000000000 --- a/docs/examples/guide/602e04051c092cf77de2f75a563661b8.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.master( - help: true -) -puts response ----- diff --git a/docs/examples/guide/604da59fe41160efa10a846a9dacc07a.asciidoc b/docs/examples/guide/604da59fe41160efa10a846a9dacc07a.asciidoc deleted file mode 100644 index c3f8a4a49b..0000000000 --- a/docs/examples/guide/604da59fe41160efa10a846a9dacc07a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.eql.get_status( - id: 'FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=' -) -puts response ----- diff --git a/docs/examples/guide/6061aadb3b870791278212d1e8f52b39.asciidoc b/docs/examples/guide/6061aadb3b870791278212d1e8f52b39.asciidoc deleted file mode 100644 index 0d8e9ed1f8..0000000000 --- a/docs/examples/guide/6061aadb3b870791278212d1e8f52b39.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_memory_stats( - human: true -) -puts response ----- diff --git a/docs/examples/guide/60a9aa5dcde9023901f6ff27231a10c4.asciidoc b/docs/examples/guide/60a9aa5dcde9023901f6ff27231a10c4.asciidoc deleted file mode 100644 index b1e76c7d9e..0000000000 --- a/docs/examples/guide/60a9aa5dcde9023901f6ff27231a10c4.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'news', - body: { - query: { - match: { - content: 'madrid' - } - }, - aggregations: { - tags: { - significant_text: { - field: 'content', - background_filter: { - term: { - content: 'spain' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/60b0fc1b6ae418621ff1b31591fa1fce.asciidoc b/docs/examples/guide/60b0fc1b6ae418621ff1b31591fa1fce.asciidoc deleted file mode 100644 index c66a8b819c..0000000000 --- a/docs/examples/guide/60b0fc1b6ae418621ff1b31591fa1fce.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.watcher.delete_watch( - id: 'cluster_health_watch' -) -puts response ----- diff --git a/docs/examples/guide/60cab62af1540db2ad3b696b0ee1d7a8.asciidoc b/docs/examples/guide/60cab62af1540db2ad3b696b0ee1d7a8.asciidoc deleted file mode 100644 index 5e98a5c2b5..0000000000 --- a/docs/examples/guide/60cab62af1540db2ad3b696b0ee1d7a8.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'queries', - body: { - query: { - percolate: { - field: 'query', - document: { - body: 'fox jumps over the lazy dog' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/60f889fbed5df3185444f7015b48ed76.asciidoc b/docs/examples/guide/60f889fbed5df3185444f7015b48ed76.asciidoc deleted file mode 100644 index 8fcbbb0113..0000000000 --- a/docs/examples/guide/60f889fbed5df3185444f7015b48ed76.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/610f629d0486a64546d62402a0a5e00f.asciidoc b/docs/examples/guide/610f629d0486a64546d62402a0a5e00f.asciidoc deleted file mode 100644 index 3eabfdc371..0000000000 --- a/docs/examples/guide/610f629d0486a64546d62402a0a5e00f.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - query_string: { - query: 'kimchy\\!', - fields: [ - 'user.id' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/611c1e05f4ebb48a1a8c8488238ce34d.asciidoc b/docs/examples/guide/611c1e05f4ebb48a1a8c8488238ce34d.asciidoc deleted file mode 100644 index 9fae593a5a..0000000000 --- a/docs/examples/guide/611c1e05f4ebb48a1a8c8488238ce34d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.reroute( - metric: 'none' -) -puts response ----- diff --git a/docs/examples/guide/612c2e975f833de9815651135735eae5.asciidoc b/docs/examples/guide/612c2e975f833de9815651135735eae5.asciidoc deleted file mode 100644 index d07b9230e1..0000000000 --- a/docs/examples/guide/612c2e975f833de9815651135735eae5.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.tasks.cancel( - nodes: 'nodeId1,nodeId2', - actions: '*reindex' -) -puts response ----- diff --git a/docs/examples/guide/618c9d42284c067891fb57034a4fd834.asciidoc b/docs/examples/guide/618c9d42284c067891fb57034a4fd834.asciidoc deleted file mode 100644 index b69801fd26..0000000000 --- a/docs/examples/guide/618c9d42284c067891fb57034a4fd834.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.rollup.start_job( - id: 'sensor' -) -puts response ----- diff --git a/docs/examples/guide/61bf6ac15ae3e22323454a9a2872a2fa.asciidoc b/docs/examples/guide/61bf6ac15ae3e22323454a9a2872a2fa.asciidoc deleted file mode 100644 index 546b53762d..0000000000 --- a/docs/examples/guide/61bf6ac15ae3e22323454a9a2872a2fa.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - type_count: { - cardinality: { - field: 'type' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/61c49cee90c6aa0eafbdd5cc03936e7d.asciidoc b/docs/examples/guide/61c49cee90c6aa0eafbdd5cc03936e7d.asciidoc deleted file mode 100644 index ea381f90ba..0000000000 --- a/docs/examples/guide/61c49cee90c6aa0eafbdd5cc03936e7d.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'data', - id: 1, - body: { - count: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/61e38e95191f4dde791070c6fce8a092.asciidoc b/docs/examples/guide/61e38e95191f4dde791070c6fce8a092.asciidoc deleted file mode 100644 index 0dff100901..0000000000 --- a/docs/examples/guide/61e38e95191f4dde791070c6fce8a092.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'date', - calendar_interval: '1M' - }, - aggregations: { - the_sum: { - sum: { - field: 'price' - } - }, - the_movavg: { - moving_fn: { - buckets_path: 'the_sum', - window: 10, - script: 'MovingFunctions.holt(values, 0.3, 0.1)' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/621665fdbd7fc103c09bfeed28b67b1a.asciidoc b/docs/examples/guide/621665fdbd7fc103c09bfeed28b67b1a.asciidoc deleted file mode 100644 index 229078cd36..0000000000 --- a/docs/examples/guide/621665fdbd7fc103c09bfeed28b67b1a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.count( - filter_path: '-_shards' -) -puts response ----- diff --git a/docs/examples/guide/621f4553e24592d40c8cdbbdfaeb027e.asciidoc b/docs/examples/guide/621f4553e24592d40c8cdbbdfaeb027e.asciidoc deleted file mode 100644 index 24d41d8665..0000000000 --- a/docs/examples/guide/621f4553e24592d40c8cdbbdfaeb027e.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'image-index', - body: { - knn: { - field: 'image-vector', - query_vector: [ - 54, - 10, - -2 - ], - k: 5, - num_candidates: 50, - filter: { - term: { - "file-type": 'png' - } - } - }, - fields: [ - 'title' - ], - _source: false - } -) -puts response ----- diff --git a/docs/examples/guide/6220087321e6d288024a70c6b09bd720.asciidoc b/docs/examples/guide/6220087321e6d288024a70c6b09bd720.asciidoc deleted file mode 100644 index 4a168d3829..0000000000 --- a/docs/examples/guide/6220087321e6d288024a70c6b09bd720.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 4, - refresh: true, - body: { - query: { - match: { - message: 'lazy dog' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6244204213f60edf2f23295f9059f2c9.asciidoc b/docs/examples/guide/6244204213f60edf2f23295f9059f2c9.asciidoc deleted file mode 100644 index 5d917a6cb8..0000000000 --- a/docs/examples/guide/6244204213f60edf2f23295f9059f2c9.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.watcher.stats( - metric: 'queued_watches' -) -puts response ----- diff --git a/docs/examples/guide/62d3c8fccb11471bdc12555c1a7777f2.asciidoc b/docs/examples/guide/62d3c8fccb11471bdc12555c1a7777f2.asciidoc deleted file mode 100644 index a9b4a0b09a..0000000000 --- a/docs/examples/guide/62d3c8fccb11471bdc12555c1a7777f2.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'idx', - id: 1, - body: { - foo: [ - { - bar: 1 - }, - { - baz: 2 - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/630d127ccedd25a6cff31ea098ac2847.asciidoc b/docs/examples/guide/630d127ccedd25a6cff31ea098ac2847.asciidoc deleted file mode 100644 index 2c727a4e1b..0000000000 --- a/docs/examples/guide/630d127ccedd25a6cff31ea098ac2847.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'node_upgrade', - body: { - size: 0, - aggregations: { - startup_time_ttest: { - t_test: { - a: { - field: 'startup_time_before', - filter: { - term: { - group: 'A' - } - } - }, - b: { - field: 'startup_time_before', - filter: { - term: { - group: 'B' - } - } - }, - type: 'heteroscedastic' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6326f5c6fd2a6e6b1aff9a643b94f455.asciidoc b/docs/examples/guide/6326f5c6fd2a6e6b1aff9a643b94f455.asciidoc deleted file mode 100644 index a6cd8d24a1..0000000000 --- a/docs/examples/guide/6326f5c6fd2a6e6b1aff9a643b94f455.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - text: 'quick brown fox', - popularity: 1 - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - refresh: true, - body: { - text: 'quick fox', - popularity: 5 - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - function_score: { - query: { - match: { - text: 'quick brown fox' - } - }, - script_score: { - script: { - lang: 'expression', - source: "_score * doc['popularity']" - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/633c8a9fc57268979d8735c557705809.asciidoc b/docs/examples/guide/633c8a9fc57268979d8735c557705809.asciidoc deleted file mode 100644 index 1ceb241465..0000000000 --- a/docs/examples/guide/633c8a9fc57268979d8735c557705809.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - kwd: { - type: 'keyword', - store: true - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - kwd: [ - 'foo', - 'foo', - 'bar', - 'baz' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/63521e0089c631d6668c44a0a9d7fdcc.asciidoc b/docs/examples/guide/63521e0089c631d6668c44a0a9d7fdcc.asciidoc deleted file mode 100644 index 2397399680..0000000000 --- a/docs/examples/guide/63521e0089c631d6668c44a0a9d7fdcc.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'custom_limit_example', - body: { - settings: { - analysis: { - analyzer: { - whitespace_five_token_limit: { - tokenizer: 'whitespace', - filter: [ - 'five_token_limit' - ] - } - }, - filter: { - five_token_limit: { - type: 'limit', - max_token_count: 5 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6352e846bb83725ae6d853aa64d8697d.asciidoc b/docs/examples/guide/6352e846bb83725ae6d853aa64d8697d.asciidoc deleted file mode 100644 index faf528cbcc..0000000000 --- a/docs/examples/guide/6352e846bb83725ae6d853aa64d8697d.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_distance: { - distance: '12km', - 'pin.location' => { - lat: 40, - lon: -70 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/63893e7e9479a9b60db71dcddcc79aaf.asciidoc b/docs/examples/guide/63893e7e9479a9b60db71dcddcc79aaf.asciidoc deleted file mode 100644 index 4fa72bb64c..0000000000 --- a/docs/examples/guide/63893e7e9479a9b60db71dcddcc79aaf.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_calendar( - calendar_id: 'planned-outages' -) -puts response ----- diff --git a/docs/examples/guide/63cc960215ae83b359c12df3c0993bfa.asciidoc b/docs/examples/guide/63cc960215ae83b359c12df3c0993bfa.asciidoc deleted file mode 100644 index e49504cfd9..0000000000 --- a/docs/examples/guide/63cc960215ae83b359c12df3c0993bfa.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - index: { - number_of_shards: 3, - number_of_replicas: 2 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/63d1c07d22a3ca3b0ec6d950547c011c.asciidoc b/docs/examples/guide/63d1c07d22a3ca3b0ec6d950547c011c.asciidoc deleted file mode 100644 index d03f6fdab8..0000000000 --- a/docs/examples/guide/63d1c07d22a3ca3b0ec6d950547c011c.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - kwd: { - type: 'keyword' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - kwd: [ - 'foo', - 'foo', - 'bar', - 'baz' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/63e20883732ec30b5400046be2efb0f1.asciidoc b/docs/examples/guide/63e20883732ec30b5400046be2efb0f1.asciidoc deleted file mode 100644 index 878c6bda6c..0000000000 --- a/docs/examples/guide/63e20883732ec30b5400046be2efb0f1.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.flush( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/640621cea39cdeeb76fbc95bff31a18d.asciidoc b/docs/examples/guide/640621cea39cdeeb76fbc95bff31a18d.asciidoc deleted file mode 100644 index c3710d0691..0000000000 --- a/docs/examples/guide/640621cea39cdeeb76fbc95bff31a18d.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.connector.last_sync( - connector_id: 'my-connector', - body: { - last_access_control_sync_error: 'Houston, we have a problem!', - last_access_control_sync_scheduled_at: '2023-11-09T15:13:08.231Z', - last_access_control_sync_status: 'pending', - last_deleted_document_count: 42, - last_incremental_sync_scheduled_at: '2023-11-09T15:13:08.231Z', - last_indexed_document_count: 42, - last_sync_error: 'Houston, we have a problem!', - last_sync_scheduled_at: '2024-11-09T15:13:08.231Z', - last_sync_status: 'completed', - last_synced: '2024-11-09T15:13:08.231Z' - } -) -puts response ----- diff --git a/docs/examples/guide/640a89d0b39630269433425ff476faf3.asciidoc b/docs/examples/guide/640a89d0b39630269433425ff476faf3.asciidoc deleted file mode 100644 index f6b9e0c2c1..0000000000 --- a/docs/examples/guide/640a89d0b39630269433425ff476faf3.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - "archived.*": nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/640da6dd719a34975b5627dfa5fcdd55.asciidoc b/docs/examples/guide/640da6dd719a34975b5627dfa5fcdd55.asciidoc deleted file mode 100644 index ceb997d653..0000000000 --- a/docs/examples/guide/640da6dd719a34975b5627dfa5fcdd55.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'xpack.monitoring.collection.enabled' => true - } - } -) -puts response ----- diff --git a/docs/examples/guide/640e4f2c2d29f9851320a70927bd7a6c.asciidoc b/docs/examples/guide/640e4f2c2d29f9851320a70927bd7a6c.asciidoc deleted file mode 100644 index ade82466df..0000000000 --- a/docs/examples/guide/640e4f2c2d29f9851320a70927bd7a6c.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'indices.lifecycle.poll_interval' => nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/641009f2147e1ca56215c701f45c970b.asciidoc b/docs/examples/guide/641009f2147e1ca56215c701f45c970b.asciidoc deleted file mode 100644 index b0283ee2f3..0000000000 --- a/docs/examples/guide/641009f2147e1ca56215c701f45c970b.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - "tiles-in-bounds": { - geotile_grid: { - field: 'location', - precision: 22, - bounds: { - top_left: 'POINT (4.9 52.4)', - bottom_right: 'POINT (5.0 52.3)' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6414b9276ba1c63898c3ff5cbe03c54e.asciidoc b/docs/examples/guide/6414b9276ba1c63898c3ff5cbe03c54e.asciidoc deleted file mode 100644 index b32a8b8114..0000000000 --- a/docs/examples/guide/6414b9276ba1c63898c3ff5cbe03c54e.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.indices.segments -puts response ----- diff --git a/docs/examples/guide/641f75862c70e25e79d249d9e0a79f03.asciidoc b/docs/examples/guide/641f75862c70e25e79d249d9e0a79f03.asciidoc deleted file mode 100644 index f0cd5b13ba..0000000000 --- a/docs/examples/guide/641f75862c70e25e79d249d9e0a79f03.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - nested: { - path: 'obj1', - query: { - bool: { - must: [ - { - match: { - "obj1.name": 'blue' - } - }, - { - range: { - "obj1.count": { - gt: 5 - } - } - } - ] - } - }, - score_mode: 'avg' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/642161d70dacf7d153767d37d3726838.asciidoc b/docs/examples/guide/642161d70dacf7d153767d37d3726838.asciidoc deleted file mode 100644 index 0a27a3a082..0000000000 --- a/docs/examples/guide/642161d70dacf7d153767d37d3726838.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.rollup.get_rollup_index_caps( - index: '*_rollup' -) -puts response ----- diff --git a/docs/examples/guide/643b9506d1129d5215f9a1bb0b509aba.asciidoc b/docs/examples/guide/643b9506d1129d5215f9a1bb0b509aba.asciidoc deleted file mode 100644 index c24d025d05..0000000000 --- a/docs/examples/guide/643b9506d1129d5215f9a1bb0b509aba.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_templates: [ - { - full_name: { - path_match: 'name.*', - path_unmatch: '*.middle', - mapping: { - type: 'text', - copy_to: 'full_name' - } - } - } - ] - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - name: { - first: 'John', - middle: 'Winston', - last: 'Lennon' - } - } -) -puts response ----- diff --git a/docs/examples/guide/645433e8e479e5d71c100f66dd2de5d0.asciidoc b/docs/examples/guide/645433e8e479e5d71c100f66dd2de5d0.asciidoc deleted file mode 100644 index 611047ac1d..0000000000 --- a/docs/examples/guide/645433e8e479e5d71c100f66dd2de5d0.asciidoc +++ /dev/null @@ -1,531 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-data-stream', - refresh: true, - pipeline: 'my-timestamp-pipeline', - body: [ - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:49:00Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 91_153, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 463_314_616 - }, - usage: { - bytes: 307_007_078, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 585_236 - }, - rss: { - bytes: 102_728 - }, - pagefaults: 120_901, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:45:50Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 124_501, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 982_546_514 - }, - usage: { - bytes: 360_035_574, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 1_339_884 - }, - rss: { - bytes: 381_174 - }, - pagefaults: 178_473, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:44:50Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 38_907, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 862_723_768 - }, - usage: { - bytes: 379_572_388, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 431_227 - }, - rss: { - bytes: 386_580 - }, - pagefaults: 233_166, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:44:40Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 86_706, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 567_160_996 - }, - usage: { - bytes: 103_266_017, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 1_724_908 - }, - rss: { - bytes: 105_431 - }, - pagefaults: 233_166, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:44:00Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 150_069, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 639_054_643 - }, - usage: { - bytes: 265_142_477, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 1_786_511 - }, - rss: { - bytes: 189_235 - }, - pagefaults: 138_172, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:42:40Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 82_260, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 854_735_585 - }, - usage: { - bytes: 309_798_052, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 924_058 - }, - rss: { - bytes: 110_838 - }, - pagefaults: 259_073, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:42:10Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 153_404, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 279_586_406 - }, - usage: { - bytes: 214_904_955, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 1_047_265 - }, - rss: { - bytes: 91_914 - }, - pagefaults: 302_252, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:40:20Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 125_613, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 822_782_853 - }, - usage: { - bytes: 100_475_044, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 2_109_932 - }, - rss: { - bytes: 278_446 - }, - pagefaults: 74_843, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:40:10Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 100_046, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 567_160_996 - }, - usage: { - bytes: 362_826_547, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 1_986_724 - }, - rss: { - bytes: 402_801 - }, - pagefaults: 296_495, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - }, - { - create: {} - }, - { - "@timestamp": '2022-06-21T15:38:30Z', - kubernetes: { - host: 'gke-apps-0', - node: 'gke-apps-0-0', - pod: 'gke-apps-0-0-0', - container: { - cpu: { - usage: { - nanocores: 40_018, - core: { - ns: 12_828_317_850 - }, - node: { - pct: 2.77905e-05 - }, - limit: { - pct: 2.77905e-05 - } - } - }, - memory: { - available: { - bytes: 1_062_428_344 - }, - usage: { - bytes: 265_142_477, - node: { - pct: 0.01770037710617187 - }, - limit: { - pct: 9.923134671484496e-05 - } - }, - workingset: { - bytes: 2_294_743 - }, - rss: { - bytes: 340_623 - }, - pagefaults: 224_530, - majorpagefaults: 0 - }, - start_time: '2021-03-30T07:59:06Z', - name: 'container-name-44' - }, - namespace: 'namespace26' - } - } - ] -) -puts response ----- diff --git a/docs/examples/guide/64622409407316d2d47094e692d9b516.asciidoc b/docs/examples/guide/64622409407316d2d47094e692d9b516.asciidoc deleted file mode 100644 index f258e13d73..0000000000 --- a/docs/examples/guide/64622409407316d2d47094e692d9b516.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.ml.evaluate_data_frame( - body: { - index: 'student_performance_mathematics_reg', - query: { - term: { - 'ml.is_training' => { - value: false - } - } - }, - evaluation: { - regression: { - actual_field: 'G3', - predicted_field: 'ml.G3_prediction', - metrics: { - r_squared: {}, - mse: {}, - msle: {}, - huber: {} - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6464124d1677f4552ddddd95a340ca3a.asciidoc b/docs/examples/guide/6464124d1677f4552ddddd95a340ca3a.asciidoc deleted file mode 100644 index 23b37c50bf..0000000000 --- a/docs/examples/guide/6464124d1677f4552ddddd95a340ca3a.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'library', - refresh: true, - body: { - title: 'Book #1', - rating: 200.1 - } -) -puts response - -response = client.index( - index: 'library', - refresh: true, - body: { - title: 'Book #2', - rating: 1.7 - } -) -puts response - -response = client.index( - index: 'library', - refresh: true, - body: { - title: 'Book #3', - rating: 0.1 - } -) -puts response - -response = client.search( - filter_path: 'hits.hits._source', - _source: 'title', - sort: 'rating:desc' -) -puts response ----- diff --git a/docs/examples/guide/646d71869f1a18c5bede7759559bfc47.asciidoc b/docs/examples/guide/646d71869f1a18c5bede7759559bfc47.asciidoc deleted file mode 100644 index f01b5d29c4..0000000000 --- a/docs/examples/guide/646d71869f1a18c5bede7759559bfc47.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_field_mapping( - index: '_all', - fields: 'message' -) -puts response ----- diff --git a/docs/examples/guide/6490d89a4e43cac5e6b9bc19840d5478.asciidoc b/docs/examples/guide/6490d89a4e43cac5e6b9bc19840d5478.asciidoc deleted file mode 100644 index 03c9a7af79..0000000000 --- a/docs/examples/guide/6490d89a4e43cac5e6b9bc19840d5478.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - analyzer: 'fingerprint', - text: 'Yes yes, Gödel said this sentence is consistent and.' - } -) -puts response ----- diff --git a/docs/examples/guide/64a6fb4bcb8cfea139a0e5d3765c063a.asciidoc b/docs/examples/guide/64a6fb4bcb8cfea139a0e5d3765c063a.asciidoc deleted file mode 100644 index c7d53a0284..0000000000 --- a/docs/examples/guide/64a6fb4bcb8cfea139a0e5d3765c063a.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.sql.translate( - body: { - query: 'SELECT * FROM library ORDER BY page_count DESC', - fetch_size: 10 - } -) -puts response ----- diff --git a/docs/examples/guide/64a79861225553799b26e118d7851dcc.asciidoc b/docs/examples/guide/64a79861225553799b26e118d7851dcc.asciidoc deleted file mode 100644 index f2bea9e76d..0000000000 --- a/docs/examples/guide/64a79861225553799b26e118d7851dcc.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ilm.explain_lifecycle( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/64aff98cf477555e7411714c17006572.asciidoc b/docs/examples/guide/64aff98cf477555e7411714c17006572.asciidoc deleted file mode 100644 index 2c05f19048..0000000000 --- a/docs/examples/guide/64aff98cf477555e7411714c17006572.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - range: { - timestamp: { - gte: 'now-1d/d', - lte: 'now/d' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/64c572abc23394a77b6cca0b5368ee1d.asciidoc b/docs/examples/guide/64c572abc23394a77b6cca0b5368ee1d.asciidoc deleted file mode 100644 index 831fe8c209..0000000000 --- a/docs/examples/guide/64c572abc23394a77b6cca0b5368ee1d.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.features.get_features -puts response ----- diff --git a/docs/examples/guide/64ca2ccb79a8f4add5b8fe2d3322ae92.asciidoc b/docs/examples/guide/64ca2ccb79a8f4add5b8fe2d3322ae92.asciidoc deleted file mode 100644 index e21f41c50a..0000000000 --- a/docs/examples/guide/64ca2ccb79a8f4add5b8fe2d3322ae92.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'exams', - size: 0, - body: { - aggregations: { - avg_grade: { - avg: { - field: 'grade' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/64d24f4b2a57dba48092dafe3eb68ad1.asciidoc b/docs/examples/guide/64d24f4b2a57dba48092dafe3eb68ad1.asciidoc deleted file mode 100644 index 05a79c1f70..0000000000 --- a/docs/examples/guide/64d24f4b2a57dba48092dafe3eb68ad1.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.mget( - index: 'test', - stored_fields: 'field1,field2', - body: { - docs: [ - { - _id: '1' - }, - { - _id: '2', - stored_fields: [ - 'field3', - 'field4' - ] - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/64ffaa6814ec1ec4f59b8f33b47cffb4.asciidoc b/docs/examples/guide/64ffaa6814ec1ec4f59b8f33b47cffb4.asciidoc deleted file mode 100644 index e64fdc7004..0000000000 --- a/docs/examples/guide/64ffaa6814ec1ec4f59b8f33b47cffb4.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index', - body: { - "archived.*": nil - } -) -puts response ----- diff --git a/docs/examples/guide/650a0fb27c66a790c4687267423af1da.asciidoc b/docs/examples/guide/650a0fb27c66a790c4687267423af1da.asciidoc deleted file mode 100644 index 3ba14bd710..0000000000 --- a/docs/examples/guide/650a0fb27c66a790c4687267423af1da.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.update_aliases( - body: { - actions: [ - { - remove: { - index: 'logs-nginx.access-prod', - alias: 'logs' - } - }, - { - add: { - index: 'logs-my_app-default', - alias: 'logs' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/6521c3578dc4ad4a6db697700986e78e.asciidoc b/docs/examples/guide/6521c3578dc4ad4a6db697700986e78e.asciidoc deleted file mode 100644 index 45d9e6733c..0000000000 --- a/docs/examples/guide/6521c3578dc4ad4a6db697700986e78e.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'place', - pretty: true, - body: { - suggest: { - place_suggestion: { - prefix: 'tim', - completion: { - field: 'suggest', - size: 10, - contexts: { - location: [ - { - lat: 43.6624803, - lon: -79.3863353, - precision: 2 - }, - { - context: { - lat: 43.6624803, - lon: -79.3863353 - }, - boost: 2 - } - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/653c0d0ef146c997ef6bc6450d4f5f94.asciidoc b/docs/examples/guide/653c0d0ef146c997ef6bc6450d4f5f94.asciidoc deleted file mode 100644 index 1e1a0b03a3..0000000000 --- a/docs/examples/guide/653c0d0ef146c997ef6bc6450d4f5f94.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - actors: { - terms: { - field: 'actors', - size: 10 - }, - aggregations: { - costars: { - terms: { - field: 'actors', - size: 5 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/654882f545eca8d7047695f867c63072.asciidoc b/docs/examples/guide/654882f545eca8d7047695f867c63072.asciidoc deleted file mode 100644 index 8dac556b28..0000000000 --- a/docs/examples/guide/654882f545eca8d7047695f867c63072.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.transform.stop_transform( - transform_id: 'ecommerce_transform' -) -puts response ----- diff --git a/docs/examples/guide/65578c390837cb4c0fcc77fb17857714.asciidoc b/docs/examples/guide/65578c390837cb4c0fcc77fb17857714.asciidoc deleted file mode 100644 index 981da7db20..0000000000 --- a/docs/examples/guide/65578c390837cb4c0fcc77fb17857714.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - } - } - }, - max_monthly_sales: { - max_bucket: { - buckets_path: 'sales_per_month>sales' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/657cf67bbc48f3b8c7fa15e275a5ef72.asciidoc b/docs/examples/guide/657cf67bbc48f3b8c7fa15e275a5ef72.asciidoc deleted file mode 100644 index c19003cff0..0000000000 --- a/docs/examples/guide/657cf67bbc48f3b8c7fa15e275a5ef72.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'logs-foo_component1', - body: { - template: { - mappings: { - properties: { - 'host.name' => { - type: 'keyword' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/65c671fbecdb5b0d75c13d63f87e36f0.asciidoc b/docs/examples/guide/65c671fbecdb5b0d75c13d63f87e36f0.asciidoc deleted file mode 100644 index 660f122fbe..0000000000 --- a/docs/examples/guide/65c671fbecdb5b0d75c13d63f87e36f0.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - rings_around_amsterdam: { - geo_distance: { - field: 'location', - origin: 'POINT (4.894 52.3760)', - ranges: [ - { - to: 100_000 - }, - { - from: 100_000, - to: 300_000 - }, - { - from: 300_000 - } - ], - keyed: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/65e892a362d940e4a74965f21c15ca09.asciidoc b/docs/examples/guide/65e892a362d940e4a74965f21c15ca09.asciidoc deleted file mode 100644 index 41754cb744..0000000000 --- a/docs/examples/guide/65e892a362d940e4a74965f21c15ca09.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - wait_for_completion: false, - body: { - source: { - index: 'test-data', - size: 50 - }, - dest: { - index: 'openai-embeddings', - pipeline: 'openai_embeddings' - } - } -) -puts response ----- diff --git a/docs/examples/guide/6606d46685d10377b996b5f20f1229b5.asciidoc b/docs/examples/guide/6606d46685d10377b996b5f20f1229b5.asciidoc deleted file mode 100644 index 53dc0cf460..0000000000 --- a/docs/examples/guide/6606d46685d10377b996b5f20f1229b5.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_index_name( - connector_id: 'my-connector', - body: { - index_name: 'data-from-my-google-drive' - } -) -puts response ----- diff --git a/docs/examples/guide/6636701d31b0c9eb8316f1f8e99cc918.asciidoc b/docs/examples/guide/6636701d31b0c9eb8316f1f8e99cc918.asciidoc deleted file mode 100644 index f32743973b..0000000000 --- a/docs/examples/guide/6636701d31b0c9eb8316f1f8e99cc918.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'ledger', - size: 0, - body: { - query: { - match_all: {} - }, - aggregations: { - profit: { - scripted_metric: { - init_script: 'state.transactions = []', - map_script: "state.transactions.add(doc.type.value == 'sale' ? doc.amount.value : -1 * doc.amount.value)", - combine_script: 'double profit = 0; for (t in state.transactions) { profit += t } return profit', - reduce_script: 'double profit = 0; for (a in states) { profit += a } return profit' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/66539dc6011dd2e0282cf81db1f3df27.asciidoc b/docs/examples/guide/66539dc6011dd2e0282cf81db1f3df27.asciidoc deleted file mode 100644 index c3f6f83796..0000000000 --- a/docs/examples/guide/66539dc6011dd2e0282cf81db1f3df27.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodes( - h: 'ip,port,heapPercent,name' -) -puts response ----- diff --git a/docs/examples/guide/666c420fe61fa122386da3c356a64943.asciidoc b/docs/examples/guide/666c420fe61fa122386da3c356a64943.asciidoc deleted file mode 100644 index 01b2f5d840..0000000000 --- a/docs/examples/guide/666c420fe61fa122386da3c356a64943.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - term: { - user: 'kimchy' - } - }, - sort: { - _script: { - type: 'number', - script: { - lang: 'painless', - source: "doc['field_name'].value * params.factor", - params: { - factor: 1.1 - } - }, - order: 'asc' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6689aa213884196b47a6f482d4993749.asciidoc b/docs/examples/guide/6689aa213884196b47a6f482d4993749.asciidoc deleted file mode 100644 index 44998d1eeb..0000000000 --- a/docs/examples/guide/6689aa213884196b47a6f482d4993749.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline-id', - body: { - description: 'My optional pipeline description', - processors: [ - { - set: { - description: 'My optional processor description', - field: 'my-keyword-field', - value: 'foo' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/6693f0ffa0de3229b5dedda197810e70.asciidoc b/docs/examples/guide/6693f0ffa0de3229b5dedda197810e70.asciidoc deleted file mode 100644 index 98a8de732e..0000000000 --- a/docs/examples/guide/6693f0ffa0de3229b5dedda197810e70.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.eql.get( - id: 'FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=', - keep_alive: '5d' -) -puts response ----- diff --git a/docs/examples/guide/669773766b041be768003055ad523038.asciidoc b/docs/examples/guide/669773766b041be768003055ad523038.asciidoc deleted file mode 100644 index 579f19a5f2..0000000000 --- a/docs/examples/guide/669773766b041be768003055ad523038.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: '.ds-my-data-stream-2099.03.08-000002', - id: 2 -) -puts response ----- diff --git a/docs/examples/guide/6705eca2095ade294548cfb25bf2dd86.asciidoc b/docs/examples/guide/6705eca2095ade294548cfb25bf2dd86.asciidoc deleted file mode 100644 index 4ca03eb3cb..0000000000 --- a/docs/examples/guide/6705eca2095ade294548cfb25bf2dd86.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.shards( - v: true, - h: 'index,shard,prirep,state,node,unassigned.reason', - s: 'state' -) -puts response ----- diff --git a/docs/examples/guide/67154a4837cf996a9a9c3e61d6e9d1b3.asciidoc b/docs/examples/guide/67154a4837cf996a9a9c3e61d6e9d1b3.asciidoc deleted file mode 100644 index 8187ce5fcd..0000000000 --- a/docs/examples/guide/67154a4837cf996a9a9c3e61d6e9d1b3.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'my-index-000001' - }, - dest: { - index: 'my-index-000002' - } - } -) -puts response ----- diff --git a/docs/examples/guide/672d30eb3af573140d966e88b14814f8.asciidoc b/docs/examples/guide/672d30eb3af573140d966e88b14814f8.asciidoc deleted file mode 100644 index 3516405c69..0000000000 --- a/docs/examples/guide/672d30eb3af573140d966e88b14814f8.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index', - id: 1, - pipeline: 'monthlyindex', - body: { - "date1": '2016-04-25T12:02:01.789Z' - } -) -puts response ----- diff --git a/docs/examples/guide/674bb755111c6fbaa4c5ac759395c122.asciidoc b/docs/examples/guide/674bb755111c6fbaa4c5ac759395c122.asciidoc deleted file mode 100644 index 15014593d8..0000000000 --- a/docs/examples/guide/674bb755111c6fbaa4c5ac759395c122.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_settings( - index: 'my-index', - flat_settings: true, - include_defaults: true -) -puts response - -response = client.cluster.get_settings( - flat_settings: true, - include_defaults: true -) -puts response ----- diff --git a/docs/examples/guide/67967388db610dcb9d24fb59ede348d8.asciidoc b/docs/examples/guide/67967388db610dcb9d24fb59ede348d8.asciidoc deleted file mode 100644 index 2a201b37b1..0000000000 --- a/docs/examples/guide/67967388db610dcb9d24fb59ede348d8.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - min_price: { - min: { - field: 'price' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/67a1f31cf60773a2378c2c30723c4b96.asciidoc b/docs/examples/guide/67a1f31cf60773a2378c2c30723c4b96.asciidoc deleted file mode 100644 index a619c065c4..0000000000 --- a/docs/examples/guide/67a1f31cf60773a2378c2c30723c4b96.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_ranks: { - percentile_ranks: { - field: 'load_time', - values: [ - 500, - 600 - ], - missing: 10 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/67a490d749a0c3bb16a266663423893d.asciidoc b/docs/examples/guide/67a490d749a0c3bb16a266663423893d.asciidoc deleted file mode 100644 index 29f8ddaa8a..0000000000 --- a/docs/examples/guide/67a490d749a0c3bb16a266663423893d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.watcher.delete_watch( - id: 'log_error_watch' -) -puts response ----- diff --git a/docs/examples/guide/67a55ac3aaee09f4aeeb7d2763da3335.asciidoc b/docs/examples/guide/67a55ac3aaee09f4aeeb7d2763da3335.asciidoc deleted file mode 100644 index ee49960a2b..0000000000 --- a/docs/examples/guide/67a55ac3aaee09f4aeeb7d2763da3335.asciidoc +++ /dev/null @@ -1,83 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'places', - body: { - mappings: { - properties: { - geometry: { - type: 'geo_shape' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'places', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - name: 'NEMO Science Museum', - geometry: 'POINT(4.912350 52.374081)' - }, - { - index: { - _id: 2 - } - }, - { - name: 'Sportpark De Weeren', - geometry: { - type: 'Polygon', - coordinates: [ - [ - [ - 4.965305328369141, - 52.39347642069457 - ], - [ - 4.966979026794433, - 52.391721758934835 - ], - [ - 4.969425201416015, - 52.39238958618537 - ], - [ - 4.967944622039794, - 52.39420969150824 - ], - [ - 4.965305328369141, - 52.39347642069457 - ] - ] - ] - } - } - ] -) -puts response - -response = client.search( - index: 'places', - size: 0, - body: { - aggregations: { - viewport: { - geo_bounds: { - field: 'geometry' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/67aac8882fa476db8a5878b67ea08eb3.asciidoc b/docs/examples/guide/67aac8882fa476db8a5878b67ea08eb3.asciidoc deleted file mode 100644 index e04d1d6a3d..0000000000 --- a/docs/examples/guide/67aac8882fa476db8a5878b67ea08eb3.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.repository_analyze( - repository: 'my_repository', - blob_count: 10, - max_blob_size: '1mb', - timeout: '120s' -) -puts response ----- diff --git a/docs/examples/guide/67bab07fda27ef77e3bc948211051a33.asciidoc b/docs/examples/guide/67bab07fda27ef77e3bc948211051a33.asciidoc deleted file mode 100644 index 8e5e7cb9c5..0000000000 --- a/docs/examples/guide/67bab07fda27ef77e3bc948211051a33.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.cat.thread_pool( - thread_pool_patterns: 'write,search', - v: true, - s: 'n,nn', - h: 'n,nn,q,a,r,c' -) -puts response ----- diff --git a/docs/examples/guide/67c3808751223eef69a57e6fd02ddf4f.asciidoc b/docs/examples/guide/67c3808751223eef69a57e6fd02ddf4f.asciidoc deleted file mode 100644 index b00f1206e8..0000000000 --- a/docs/examples/guide/67c3808751223eef69a57e6fd02ddf4f.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - more_like_this: { - fields: [ - 'title', - 'description' - ], - like: [ - { - _index: 'imdb', - _id: '1' - }, - { - _index: 'imdb', - _id: '2' - }, - 'and potentially some more text here as well' - ], - min_term_freq: 1, - max_query_terms: 12 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/682336e5232c9ad3d866cb203d1c58c1.asciidoc b/docs/examples/guide/682336e5232c9ad3d866cb203d1c58c1.asciidoc deleted file mode 100644 index e8846eef91..0000000000 --- a/docs/examples/guide/682336e5232c9ad3d866cb203d1c58c1.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'azure-openai-embeddings', - body: { - mappings: { - properties: { - content_embedding: { - type: 'dense_vector', - dims: 1536, - element_type: 'float', - similarity: 'dot_product' - }, - content: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6843d859e2965d17cad4f033c81db83f.asciidoc b/docs/examples/guide/6843d859e2965d17cad4f033c81db83f.asciidoc deleted file mode 100644 index 2ee2a2cd46..0000000000 --- a/docs/examples/guide/6843d859e2965d17cad4f033c81db83f.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'my-data-stream-template', - body: { - index_patterns: [ - 'my-data-stream*' - ], - data_stream: {}, - priority: 500, - template: { - settings: { - 'sort.field' => [ - '@timestamp' - ], - 'sort.order' => [ - 'desc' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6856f7c6a732ab55ca71c1ee2ec2bbad.asciidoc b/docs/examples/guide/6856f7c6a732ab55ca71c1ee2ec2bbad.asciidoc deleted file mode 100644 index 7d703f6c47..0000000000 --- a/docs/examples/guide/6856f7c6a732ab55ca71c1ee2ec2bbad.asciidoc +++ /dev/null @@ -1,84 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'metrics_index', - body: { - mappings: { - properties: { - latency_histo: { - type: 'histogram' - } - } - } - } -) -puts response - -response = client.index( - index: 'metrics_index', - id: 1, - refresh: true, - body: { - 'network.name' => 'net-1', - latency_histo: { - values: [ - 0.1, - 0.2, - 0.3, - 0.4, - 0.5 - ], - counts: [ - 3, - 7, - 23, - 12, - 6 - ] - } - } -) -puts response - -response = client.index( - index: 'metrics_index', - id: 2, - refresh: true, - body: { - 'network.name' => 'net-2', - latency_histo: { - values: [ - 0.1, - 0.2, - 0.3, - 0.4, - 0.5 - ], - counts: [ - 8, - 17, - 8, - 7, - 6 - ] - } - } -) -puts response - -response = client.search( - index: 'metrics_index', - size: 0, - filter_path: 'aggregations', - body: { - aggregations: { - max_latency: { - max: { - field: 'latency_histo' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6859530dd9d85e59bd33a53ec96a3836.asciidoc b/docs/examples/guide/6859530dd9d85e59bd33a53ec96a3836.asciidoc deleted file mode 100644 index 2cfce7974d..0000000000 --- a/docs/examples/guide/6859530dd9d85e59bd33a53ec96a3836.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'users', - id: 1, - refresh: 'wait_for', - body: { - email: 'mardy.brown@asciidocsmith.com', - first_name: 'Mardy', - last_name: 'Brown', - city: 'New Orleans', - county: 'Orleans', - state: 'LA', - zip: 70_116, - web: 'mardy.asciidocsmith.com' - } -) -puts response ----- diff --git a/docs/examples/guide/686bc640b877de845c46bef372a9866c.asciidoc b/docs/examples/guide/686bc640b877de845c46bef372a9866c.asciidoc deleted file mode 100644 index bac13a1ff7..0000000000 --- a/docs/examples/guide/686bc640b877de845c46bef372a9866c.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'parent_example', - size: 0, - body: { - aggregations: { - "top-names": { - terms: { - field: 'owner.display_name.keyword', - size: 10 - }, - aggregations: { - "to-questions": { - parent: { - type: 'answer' - }, - aggregations: { - "top-tags": { - terms: { - field: 'tags.keyword', - size: 10 - } - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/68721288dc9ad8aa1b55099b4d303051.asciidoc b/docs/examples/guide/68721288dc9ad8aa1b55099b4d303051.asciidoc deleted file mode 100644 index 857ffb9dd3..0000000000 --- a/docs/examples/guide/68721288dc9ad8aa1b55099b4d303051.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - multi_match: { - query: 'quick brown f', - type: 'bool_prefix', - fields: [ - 'subject', - 'message' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/68738b4fd0dda177022be45be95b4c84.asciidoc b/docs/examples/guide/68738b4fd0dda177022be45be95b4c84.asciidoc deleted file mode 100644 index ec1fb7803d..0000000000 --- a/docs/examples/guide/68738b4fd0dda177022be45be95b4c84.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.reindex_rethrottle( - task_id: 'r1A2WoRbTwKZ516z6NEs5A:36619', - requests_per_second: -1 -) -puts response ----- diff --git a/docs/examples/guide/6884454f57c3a41059037ea762f48d77.asciidoc b/docs/examples/guide/6884454f57c3a41059037ea762f48d77.asciidoc deleted file mode 100644 index bd5120c482..0000000000 --- a/docs/examples/guide/6884454f57c3a41059037ea762f48d77.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - analyzer: 'standard', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/68a891f609ca3a379d2d64e4914f3067.asciidoc b/docs/examples/guide/68a891f609ca3a379d2d64e4914f3067.asciidoc deleted file mode 100644 index 58e86dc182..0000000000 --- a/docs/examples/guide/68a891f609ca3a379d2d64e4914f3067.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'kstem' - ], - text: 'the foxes jumping quickly' - } -) -puts response ----- diff --git a/docs/examples/guide/68b64313bf89ec3f2c645da61999dbb4.asciidoc b/docs/examples/guide/68b64313bf89ec3f2c645da61999dbb4.asciidoc deleted file mode 100644 index dcd2a1d138..0000000000 --- a/docs/examples/guide/68b64313bf89ec3f2c645da61999dbb4.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.nodes.info( - node_id: 'plugins' -) -puts response ----- diff --git a/docs/examples/guide/68cb8a452e780ca78b0cb761be3629af.asciidoc b/docs/examples/guide/68cb8a452e780ca78b0cb761be3629af.asciidoc deleted file mode 100644 index 90a077727a..0000000000 --- a/docs/examples/guide/68cb8a452e780ca78b0cb761be3629af.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - stored_fields: '_none_', - query: { - term: { - user: 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/692606cc6d6462becc321d92961a3bac.asciidoc b/docs/examples/guide/692606cc6d6462becc321d92961a3bac.asciidoc deleted file mode 100644 index 5c2ccaeef8..0000000000 --- a/docs/examples/guide/692606cc6d6462becc321d92961a3bac.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.text_structure.test_grok_pattern( - body: { - grok_pattern: 'Hello %{WORD:first_name} %{WORD:last_name}', - text: [ - 'Hello John Doe', - 'this does not match' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/69582847099ee62ed34feddfaba83ef6.asciidoc b/docs/examples/guide/69582847099ee62ed34feddfaba83ef6.asciidoc deleted file mode 100644 index a7d82022f3..0000000000 --- a/docs/examples/guide/69582847099ee62ed34feddfaba83ef6.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - quantity: { - histogram: { - field: 'quantity', - interval: 10, - missing: 0 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc b/docs/examples/guide/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc deleted file mode 100644 index 8122a10ef3..0000000000 --- a/docs/examples/guide/698e0a2b67ba7842caa801d9ef46ebe3.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - highlight: { - require_field_match: false, - fields: { - body: { - pre_tags: [ - '' - ], - post_tags: [ - '' - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/69a08e7bdcc616f3bdcb8ae842d9e30e.asciidoc b/docs/examples/guide/69a08e7bdcc616f3bdcb8ae842d9e30e.asciidoc deleted file mode 100644 index 969acba74d..0000000000 --- a/docs/examples/guide/69a08e7bdcc616f3bdcb8ae842d9e30e.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'my-index-000001', - id: 1, - stored_fields: 'tags,counter' -) -puts response ----- diff --git a/docs/examples/guide/69ab708fe65a75f870223d2289c3d171.asciidoc b/docs/examples/guide/69ab708fe65a75f870223d2289c3d171.asciidoc deleted file mode 100644 index d983ea07ff..0000000000 --- a/docs/examples/guide/69ab708fe65a75f870223d2289c3d171.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - description: 'Hide my IP', - processors: [ - { - redact: { - field: 'message', - patterns: [ - '%{IP:REDACTED}', - '%{EMAILADDRESS:REDACTED}' - ], - prefix: '*', - suffix: '*' - } - } - ] - }, - docs: [ - { - _source: { - message: '55.3.244.1 GET /index.html 15824 0.043 test@elastic.co' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/69c07cfdf8054c301cd6186c5d71aa02.asciidoc b/docs/examples/guide/69c07cfdf8054c301cd6186c5d71aa02.asciidoc deleted file mode 100644 index 26aa749cf5..0000000000 --- a/docs/examples/guide/69c07cfdf8054c301cd6186c5d71aa02.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'my-index-000001,my-index-000002' -) -puts response ----- diff --git a/docs/examples/guide/69d5710bdec73041c66f21d5f96637e8.asciidoc b/docs/examples/guide/69d5710bdec73041c66f21d5f96637e8.asciidoc deleted file mode 100644 index bbba93ce23..0000000000 --- a/docs/examples/guide/69d5710bdec73041c66f21d5f96637e8.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index_long', - body: { - mappings: { - properties: { - field: { - type: 'date_nanos' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/69d9b8fd364596aa37eae6864d8a6d89.asciidoc b/docs/examples/guide/69d9b8fd364596aa37eae6864d8a6d89.asciidoc deleted file mode 100644 index 6e4b5cb2d9..0000000000 --- a/docs/examples/guide/69d9b8fd364596aa37eae6864d8a6d89.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: '.watcher-history*', - pretty: true, - body: { - sort: [ - { - 'result.execution_time' => 'desc' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/69f8b0f2a9ba47e11f363d788cee9d6d.asciidoc b/docs/examples/guide/69f8b0f2a9ba47e11f363d788cee9d6d.asciidoc deleted file mode 100644 index 12dcba5c97..0000000000 --- a/docs/examples/guide/69f8b0f2a9ba47e11f363d788cee9d6d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.migration.deprecations( - index: 'logstash-*' -) -puts response ----- diff --git a/docs/examples/guide/6a1702dd50690cae833572e48a0ddf25.asciidoc b/docs/examples/guide/6a1702dd50690cae833572e48a0ddf25.asciidoc deleted file mode 100644 index 76d75c4684..0000000000 --- a/docs/examples/guide/6a1702dd50690cae833572e48a0ddf25.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - multi_match: { - query: 'Will Smith', - fields: [ - 'title', - '*_name' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6a350a17701e8c8158407191f2718b66.asciidoc b/docs/examples/guide/6a350a17701e8c8158407191f2718b66.asciidoc deleted file mode 100644 index 0034459926..0000000000 --- a/docs/examples/guide/6a350a17701e8c8158407191f2718b66.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ccr.unfollow( - index: 'follower_index' -) -puts response ----- diff --git a/docs/examples/guide/6a3a578ce37fb2c63ccfab7f75db9bae.asciidoc b/docs/examples/guide/6a3a578ce37fb2c63ccfab7f75db9bae.asciidoc deleted file mode 100644 index f3a30d6ace..0000000000 --- a/docs/examples/guide/6a3a578ce37fb2c63ccfab7f75db9bae.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'ingest.geoip.downloader.enabled' => false, - 'indices.lifecycle.history_index_enabled' => false - } - } -) -puts response ----- diff --git a/docs/examples/guide/6a3a86ff58e5f20950d429cf2832c229.asciidoc b/docs/examples/guide/6a3a86ff58e5f20950d429cf2832c229.asciidoc deleted file mode 100644 index f4764801f8..0000000000 --- a/docs/examples/guide/6a3a86ff58e5f20950d429cf2832c229.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ingest.get_pipeline( - id: 'my-pipeline-id' -) -puts response ----- diff --git a/docs/examples/guide/6a50c1c53673fe9cc3cbda38a2853cdd.asciidoc b/docs/examples/guide/6a50c1c53673fe9cc3cbda38a2853cdd.asciidoc deleted file mode 100644 index 101efc58aa..0000000000 --- a/docs/examples/guide/6a50c1c53673fe9cc3cbda38a2853cdd.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.sql.delete_async( - id: 'FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=' -) -puts response ----- diff --git a/docs/examples/guide/6a55dbba114c6c1408474f7e9cfdbb94.asciidoc b/docs/examples/guide/6a55dbba114c6c1408474f7e9cfdbb94.asciidoc deleted file mode 100644 index 9787a5fd73..0000000000 --- a/docs/examples/guide/6a55dbba114c6c1408474f7e9cfdbb94.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.create_repository( - repository: 'my_unverified_backup', - verify: false, - body: { - type: 'fs', - settings: { - location: 'my_unverified_backup_location' - } - } -) -puts response ----- diff --git a/docs/examples/guide/6a9655fe22fa5db7a540c145bcf1fb31.asciidoc b/docs/examples/guide/6a9655fe22fa5db7a540c145bcf1fb31.asciidoc deleted file mode 100644 index 49b27e6168..0000000000 --- a/docs/examples/guide/6a9655fe22fa5db7a540c145bcf1fb31.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'stats-index', - id: 1, - body: { - agg_metric: { - min: -302.5, - max: 702.3, - sum: 200, - value_count: 25 - } - } -) -puts response - -response = client.index( - index: 'stats-index', - id: 2, - body: { - agg_metric: { - min: -93, - max: 1702.3, - sum: 300, - value_count: 25 - } - } -) -puts response ----- diff --git a/docs/examples/guide/6a969ebe7490d93d35be895b14e5a42a.asciidoc b/docs/examples/guide/6a969ebe7490d93d35be895b14e5a42a.asciidoc deleted file mode 100644 index 0475fef57f..0000000000 --- a/docs/examples/guide/6a969ebe7490d93d35be895b14e5a42a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get( - index: 'logs-my_app-default' -) -puts response ----- diff --git a/docs/examples/guide/6aa2941855d13f365f70aa8767ecb137.asciidoc b/docs/examples/guide/6aa2941855d13f365f70aa8767ecb137.asciidoc deleted file mode 100644 index 735e95268d..0000000000 --- a/docs/examples/guide/6aa2941855d13f365f70aa8767ecb137.asciidoc +++ /dev/null @@ -1,61 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - city: { - type: 'text', - fields: { - raw: { - type: 'keyword' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - city: 'New York' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - city: 'York' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - city: 'york' - } - }, - sort: { - 'city.raw' => 'asc' - }, - aggregations: { - "Cities": { - terms: { - field: 'city.raw' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6aca241c0361d26f134712821e2d09a9.asciidoc b/docs/examples/guide/6aca241c0361d26f134712821e2d09a9.asciidoc deleted file mode 100644 index b06ffe18fc..0000000000 --- a/docs/examples/guide/6aca241c0361d26f134712821e2d09a9.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.cleanup_repository( - repository: 'my_repository' -) -puts response ----- diff --git a/docs/examples/guide/6af9dc1c3240aa8e623ff3622bcb1b48.asciidoc b/docs/examples/guide/6af9dc1c3240aa8e623ff3622bcb1b48.asciidoc deleted file mode 100644 index 24cec3e577..0000000000 --- a/docs/examples/guide/6af9dc1c3240aa8e623ff3622bcb1b48.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.exclude._ip' => '192.168.2.*' - } - } -) -puts response ----- diff --git a/docs/examples/guide/6b0288acb739c4667d41339e5100c327.asciidoc b/docs/examples/guide/6b0288acb739c4667d41339e5100c327.asciidoc deleted file mode 100644 index 8b0ae0c441..0000000000 --- a/docs/examples/guide/6b0288acb739c4667d41339e5100c327.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - message: { - query: 'this is a testt', - fuzziness: 'AUTO' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6b0d492c0f50103fefeab385a7bebd01.asciidoc b/docs/examples/guide/6b0d492c0f50103fefeab385a7bebd01.asciidoc deleted file mode 100644 index ad6b0c6ff8..0000000000 --- a/docs/examples/guide/6b0d492c0f50103fefeab385a7bebd01.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'logs-debug', - body: { - mappings: { - properties: { - "@timestamp": { - type: 'date' - }, - message: { - type: 'text' - }, - level: { - type: 'constant_keyword', - value: 'debug' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6b1336ff477f91d4a0db0b06db546ff0.asciidoc b/docs/examples/guide/6b1336ff477f91d4a0db0b06db546ff0.asciidoc deleted file mode 100644 index b993c9c9d1..0000000000 --- a/docs/examples/guide/6b1336ff477f91d4a0db0b06db546ff0.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.watcher.stop -puts response ----- diff --git a/docs/examples/guide/6b1e837a8469eca2d03d5c36f5910f34.asciidoc b/docs/examples/guide/6b1e837a8469eca2d03d5c36f5910f34.asciidoc deleted file mode 100644 index 35130dcf88..0000000000 --- a/docs/examples/guide/6b1e837a8469eca2d03d5c36f5910f34.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - filter_path: 'aggregations', - body: { - aggregations: { - avg_price: { - avg: { - field: 'price' - } - }, - t_shirts: { - filter: { - term: { - type: 't-shirt' - } - }, - aggregations: { - avg_price: { - avg: { - field: 'price' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6b3dcde0656d3a96dbcfed1ec814e10a.asciidoc b/docs/examples/guide/6b3dcde0656d3a96dbcfed1ec814e10a.asciidoc deleted file mode 100644 index cf823737a9..0000000000 --- a/docs/examples/guide/6b3dcde0656d3a96dbcfed1ec814e10a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.shutdown.delete_node( - node_id: 'USpTGYaBSIKbgSUJR2Z9lg' -) -puts response ----- diff --git a/docs/examples/guide/6b77795e9249c8d9865f7a49fd86a863.asciidoc b/docs/examples/guide/6b77795e9249c8d9865f7a49fd86a863.asciidoc deleted file mode 100644 index 505a6f783a..0000000000 --- a/docs/examples/guide/6b77795e9249c8d9865f7a49fd86a863.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - range: { - age: { - gte: 10, - lte: 20, - boost: 2 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc b/docs/examples/guide/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc deleted file mode 100644 index d3fd22a7a7..0000000000 --- a/docs/examples/guide/6b8c5c8145c287c4fc535fa57ccf95a7.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.sync_job_list( - status: 'pending' -) -puts response ----- diff --git a/docs/examples/guide/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc b/docs/examples/guide/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc deleted file mode 100644 index cb4d64e948..0000000000 --- a/docs/examples/guide/6bbc613bd4f9aec1bbdbabf5db021d28.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - bool: { - should: [ - { - match: { - title: 'quick brown fox' - } - }, - { - match: { - 'title.original' => 'quick brown fox' - } - }, - { - match: { - 'title.shingles' => 'quick brown fox' - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6bfa0a9a50c4e94276c7d63af1c31d9e.asciidoc b/docs/examples/guide/6bfa0a9a50c4e94276c7d63af1c31d9e.asciidoc deleted file mode 100644 index ab249a8bd2..0000000000 --- a/docs/examples/guide/6bfa0a9a50c4e94276c7d63af1c31d9e.asciidoc +++ /dev/null @@ -1,57 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'place', - body: { - mappings: { - properties: { - suggest: { - type: 'completion', - contexts: [ - { - name: 'place_type', - type: 'category' - }, - { - name: 'location', - type: 'geo', - precision: 4 - } - ] - } - } - } - } -) -puts response - -response = client.indices.create( - index: 'place_path_category', - body: { - mappings: { - properties: { - suggest: { - type: 'completion', - contexts: [ - { - name: 'place_type', - type: 'category', - path: 'cat' - }, - { - name: 'location', - type: 'geo', - precision: 4, - path: 'loc' - } - ] - }, - loc: { - type: 'geo_point' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6c00dae1a456ae5e854e98e895dca2ab.asciidoc b/docs/examples/guide/6c00dae1a456ae5e854e98e895dca2ab.asciidoc deleted file mode 100644 index 57f2ab7495..0000000000 --- a/docs/examples/guide/6c00dae1a456ae5e854e98e895dca2ab.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - function_score: { - query: { - match: { - message: 'elasticsearch' - } - }, - script_score: { - script: { - source: "Math.log(2 + doc['my-int'].value)" - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6c3f7c8601e8cc13d36eef98a5e2cb34.asciidoc b/docs/examples/guide/6c3f7c8601e8cc13d36eef98a5e2cb34.asciidoc deleted file mode 100644 index d594de7630..0000000000 --- a/docs/examples/guide/6c3f7c8601e8cc13d36eef98a5e2cb34.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'drivers', - body: { - mappings: { - properties: { - driver: { - type: 'nested', - properties: { - last_name: { - type: 'text' - }, - vehicle: { - type: 'nested', - properties: { - make: { - type: 'text' - }, - model: { - type: 'text' - } - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6c70b022a8a74b887fe46e514feb38c0.asciidoc b/docs/examples/guide/6c70b022a8a74b887fe46e514feb38c0.asciidoc deleted file mode 100644 index 3d4e7b87f3..0000000000 --- a/docs/examples/guide/6c70b022a8a74b887fe46e514feb38c0.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.recovery( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/6c72460570307f23478100db04a84c8e.asciidoc b/docs/examples/guide/6c72460570307f23478100db04a84c8e.asciidoc deleted file mode 100644 index 6a522d4b78..0000000000 --- a/docs/examples/guide/6c72460570307f23478100db04a84c8e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_component_template( - name: 'temp*' -) -puts response ----- diff --git a/docs/examples/guide/6c72f6791ba9223943f7556c5bfaa728.asciidoc b/docs/examples/guide/6c72f6791ba9223943f7556c5bfaa728.asciidoc deleted file mode 100644 index 5cb5c17ec4..0000000000 --- a/docs/examples/guide/6c72f6791ba9223943f7556c5bfaa728.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - fields: [ - 'user.id', - 'http.response.*', - { - field: '@timestamp', - format: 'epoch_millis' - } - ], - _source: false - } -) -puts response ----- diff --git a/docs/examples/guide/6cd083045bf06e80b83889a939a18451.asciidoc b/docs/examples/guide/6cd083045bf06e80b83889a939a18451.asciidoc deleted file mode 100644 index 4e3c9675a1..0000000000 --- a/docs/examples/guide/6cd083045bf06e80b83889a939a18451.asciidoc +++ /dev/null @@ -1,98 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - user: { - type: 'nested' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - group: 'fans', - user: [ - { - first: 'John', - last: 'Smith' - }, - { - first: 'Alice', - last: 'White' - } - ] - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - nested: { - path: 'user', - query: { - bool: { - must: [ - { - match: { - 'user.first' => 'Alice' - } - }, - { - match: { - 'user.last' => 'Smith' - } - } - ] - } - } - } - } - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - nested: { - path: 'user', - query: { - bool: { - must: [ - { - match: { - 'user.first' => 'Alice' - } - }, - { - match: { - 'user.last' => 'White' - } - } - ] - } - }, - inner_hits: { - highlight: { - fields: { - 'user.first' => {} - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6ce8334def48552ba7d44025580d9105.asciidoc b/docs/examples/guide/6ce8334def48552ba7d44025580d9105.asciidoc deleted file mode 100644 index 41c757aa91..0000000000 --- a/docs/examples/guide/6ce8334def48552ba7d44025580d9105.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: '', - body: { - aliases: { - "my-alias": {} - } - } -) -puts response ----- diff --git a/docs/examples/guide/6cf3307c00f464c46475e352e067d714.asciidoc b/docs/examples/guide/6cf3307c00f464c46475e352e067d714.asciidoc deleted file mode 100644 index 97ada0749d..0000000000 --- a/docs/examples/guide/6cf3307c00f464c46475e352e067d714.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_geoshapes', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_bounding_box: { - 'pin.location' => { - top_left: { - lat: 40.73, - lon: -74.1 - }, - bottom_right: { - lat: 40.01, - lon: -71.12 - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6d48f83c4a36d0544d876d3eff48dcef.asciidoc b/docs/examples/guide/6d48f83c4a36d0544d876d3eff48dcef.asciidoc deleted file mode 100644 index 6bbe78c1f6..0000000000 --- a/docs/examples/guide/6d48f83c4a36d0544d876d3eff48dcef.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.slm.execute_retention -puts response ----- diff --git a/docs/examples/guide/6db118771354792646229e7a3c30c7e9.asciidoc b/docs/examples/guide/6db118771354792646229e7a3c30c7e9.asciidoc deleted file mode 100644 index 4649aa5695..0000000000 --- a/docs/examples/guide/6db118771354792646229e7a3c30c7e9.asciidoc +++ /dev/null @@ -1,64 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-index-000001', - refresh: true, - body: [ - { - index: {} - }, - { - timestamp: 1_516_729_294_000, - temperature: 200, - voltage: 5.2, - node: 'a' - }, - { - index: {} - }, - { - timestamp: 1_516_642_894_000, - temperature: 201, - voltage: 5.8, - node: 'b' - }, - { - index: {} - }, - { - timestamp: 1_516_556_494_000, - temperature: 202, - voltage: 5.1, - node: 'a' - }, - { - index: {} - }, - { - timestamp: 1_516_470_094_000, - temperature: 198, - voltage: 5.6, - node: 'b' - }, - { - index: {} - }, - { - timestamp: 1_516_383_694_000, - temperature: 200, - voltage: 4.2, - node: 'c' - }, - { - index: {} - }, - { - timestamp: 1_516_297_294_000, - temperature: 202, - voltage: 4, - node: 'c' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/6dbfe5565a95508e65d304131847f9fc.asciidoc b/docs/examples/guide/6dbfe5565a95508e65d304131847f9fc.asciidoc deleted file mode 100644 index 0878bdc119..0000000000 --- a/docs/examples/guide/6dbfe5565a95508e65d304131847f9fc.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - { - type: 'edge_ngram', - min_gram: 1, - max_gram: 2 - } - ], - text: 'the quick brown fox jumps' - } -) -puts response ----- diff --git a/docs/examples/guide/6dd4c02fe3d6b800648a04d3e2d29fc1.asciidoc b/docs/examples/guide/6dd4c02fe3d6b800648a04d3e2d29fc1.asciidoc deleted file mode 100644 index 07229450f6..0000000000 --- a/docs/examples/guide/6dd4c02fe3d6b800648a04d3e2d29fc1.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.delete( - repository: 'my_repository', - snapshot: 'snapshot_2,snapshot_3' -) -puts response ----- diff --git a/docs/examples/guide/6e000496a1fa8b57148518eaad692f35.asciidoc b/docs/examples/guide/6e000496a1fa8b57148518eaad692f35.asciidoc deleted file mode 100644 index 9ba5c36a1d..0000000000 --- a/docs/examples/guide/6e000496a1fa8b57148518eaad692f35.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match_none: {} - } - } -) -puts response ----- diff --git a/docs/examples/guide/6e0b675eff7ed73c09a76a415930a486.asciidoc b/docs/examples/guide/6e0b675eff7ed73c09a76a415930a486.asciidoc deleted file mode 100644 index 87b7126f3e..0000000000 --- a/docs/examples/guide/6e0b675eff7ed73c09a76a415930a486.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - "my-join-field": { - type: 'join', - relations: { - "my-parent": 'my-child' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6e1157f3184fa192d47a3d0e3ea17a6c.asciidoc b/docs/examples/guide/6e1157f3184fa192d47a3d0e3ea17a6c.asciidoc deleted file mode 100644 index c5e918fe53..0000000000 --- a/docs/examples/guide/6e1157f3184fa192d47a3d0e3ea17a6c.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'letter_unique_pos_example', - body: { - settings: { - analysis: { - analyzer: { - letter_unique_pos: { - tokenizer: 'letter', - filter: [ - 'unique_pos' - ] - } - }, - filter: { - unique_pos: { - type: 'unique', - only_on_same_position: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6e1ae8d6103e0b77f14fb0ea1bfb7ffa.asciidoc b/docs/examples/guide/6e1ae8d6103e0b77f14fb0ea1bfb7ffa.asciidoc deleted file mode 100644 index b9e5cc79c0..0000000000 --- a/docs/examples/guide/6e1ae8d6103e0b77f14fb0ea1bfb7ffa.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'GEOMETRYCOLLECTION (POINT (1000.0 100.0), LINESTRING (1001.0 100.0, 1002.0 100.0))' - } -) -puts response ----- diff --git a/docs/examples/guide/6ea062455229151e311869a81ee40252.asciidoc b/docs/examples/guide/6ea062455229151e311869a81ee40252.asciidoc deleted file mode 100644 index c597c84956..0000000000 --- a/docs/examples/guide/6ea062455229151e311869a81ee40252.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response - -response = client.search( - index: '_all', - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response - -response = client.search( - index: '*', - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6edfc35a66afd9b884431fccf48fdbf5.asciidoc b/docs/examples/guide/6edfc35a66afd9b884431fccf48fdbf5.asciidoc deleted file mode 100644 index 474dddba52..0000000000 --- a/docs/examples/guide/6edfc35a66afd9b884431fccf48fdbf5.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'lowercase', - { - type: 'synonym_graph', - synonyms: [ - 'pc => personal computer', - 'computer, pc, laptop' - ] - } - ], - text: 'Check how PC synonyms work' - } -) -puts response ----- diff --git a/docs/examples/guide/6eead05dd3b04722ef0ea5644c2e047d.asciidoc b/docs/examples/guide/6eead05dd3b04722ef0ea5644c2e047d.asciidoc deleted file mode 100644 index ae492d97fa..0000000000 --- a/docs/examples/guide/6eead05dd3b04722ef0ea5644c2e047d.asciidoc +++ /dev/null @@ -1,48 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - total_sales: { - sum: { - field: 'price' - } - }, - "t-shirts": { - filter: { - term: { - type: 't-shirt' - } - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - } - } - }, - "t-shirt-percentage": { - bucket_script: { - buckets_path: { - "tShirtSales": 't-shirts>sales', - "totalSales": 'total_sales' - }, - script: 'params.tShirtSales / params.totalSales * 100' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6f07152055e99416deb10e95b428b847.asciidoc b/docs/examples/guide/6f07152055e99416deb10e95b428b847.asciidoc deleted file mode 100644 index 6e4de49757..0000000000 --- a/docs/examples/guide/6f07152055e99416deb10e95b428b847.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'edge_ngram_custom_example', - body: { - settings: { - analysis: { - analyzer: { - default: { - tokenizer: 'whitespace', - filter: [ - '3_5_edgegrams' - ] - } - }, - filter: { - "3_5_edgegrams": { - type: 'edge_ngram', - min_gram: 3, - max_gram: 5 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6f34e27481460a95e59ffbacb76bd637.asciidoc b/docs/examples/guide/6f34e27481460a95e59ffbacb76bd637.asciidoc deleted file mode 100644 index b95a7b102a..0000000000 --- a/docs/examples/guide/6f34e27481460a95e59ffbacb76bd637.asciidoc +++ /dev/null @@ -1,55 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_custom_analyzer: { - char_filter: [ - 'emoticons' - ], - tokenizer: 'punctuation', - filter: [ - 'lowercase', - 'english_stop' - ] - } - }, - tokenizer: { - punctuation: { - type: 'pattern', - pattern: '[ .,!?]' - } - }, - char_filter: { - emoticons: { - type: 'mapping', - mappings: [ - ':) => _happy_', - ':( => _sad_' - ] - } - }, - filter: { - english_stop: { - type: 'stop', - stopwords: '_english_' - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_custom_analyzer', - text: "I'm a :) person, and you?" - } -) -puts response ----- diff --git a/docs/examples/guide/6f5adbd55a3a2760e7fe9d32df18b1a1.asciidoc b/docs/examples/guide/6f5adbd55a3a2760e7fe9d32df18b1a1.asciidoc deleted file mode 100644 index 589c3faf80..0000000000 --- a/docs/examples/guide/6f5adbd55a3a2760e7fe9d32df18b1a1.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'logs', - body: { - timestamp: '2015-05-17T18:12:07.613Z', - request: 'GET index.html', - status_code: 404, - message: 'Error: File not found' - } -) -puts response ----- diff --git a/docs/examples/guide/6f6d5a4a90e1265822628d4ced963639.asciidoc b/docs/examples/guide/6f6d5a4a90e1265822628d4ced963639.asciidoc deleted file mode 100644 index c20e254539..0000000000 --- a/docs/examples/guide/6f6d5a4a90e1265822628d4ced963639.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - create_date: '2015/09/02' - } -) -puts response - -response = client.indices.get_mapping( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/6f842819c50e8490080dd085e0c6aca3.asciidoc b/docs/examples/guide/6f842819c50e8490080dd085e0c6aca3.asciidoc deleted file mode 100644 index 1e7d0ae232..0000000000 --- a/docs/examples/guide/6f842819c50e8490080dd085e0c6aca3.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'index', - body: { - size: 0, - aggregations: { - foo_terms: { - terms: { - field: 'foo' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6f855bc92b4cc6e6a63f95bce1cb4441.asciidoc b/docs/examples/guide/6f855bc92b4cc6e6a63f95bce1cb4441.asciidoc deleted file mode 100644 index 14a6c7ec82..0000000000 --- a/docs/examples/guide/6f855bc92b4cc6e6a63f95bce1cb4441.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.logstash.get_pipeline( - id: 'my_pipeline' -) -puts response ----- diff --git a/docs/examples/guide/6f8a682c908b826ca90cadd9d2f582b4.asciidoc b/docs/examples/guide/6f8a682c908b826ca90cadd9d2f582b4.asciidoc deleted file mode 100644 index 4de2cb9a3a..0000000000 --- a/docs/examples/guide/6f8a682c908b826ca90cadd9d2f582b4.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - stored_fields: [ - 'user', - 'postDate' - ], - query: { - term: { - user: 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/6fa570ae7039171e2ab722344ec1063f.asciidoc b/docs/examples/guide/6fa570ae7039171e2ab722344ec1063f.asciidoc deleted file mode 100644 index afa96b1ce4..0000000000 --- a/docs/examples/guide/6fa570ae7039171e2ab722344ec1063f.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_field_mapping( - index: 'my-index-000001', - fields: 'user' -) -puts response ----- diff --git a/docs/examples/guide/6fbbf40cab0187f544ff7bca31d18d57.asciidoc b/docs/examples/guide/6fbbf40cab0187f544ff7bca31d18d57.asciidoc deleted file mode 100644 index fce927f338..0000000000 --- a/docs/examples/guide/6fbbf40cab0187f544ff7bca31d18d57.asciidoc +++ /dev/null @@ -1,58 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'Polygon', - coordinates: [ - [ - [ - 100, - 0 - ], - [ - 101, - 0 - ], - [ - 101, - 1 - ], - [ - 100, - 1 - ], - [ - 100, - 0 - ] - ], - [ - [ - 100.2, - 0.2 - ], - [ - 100.8, - 0.2 - ], - [ - 100.8, - 0.8 - ], - [ - 100.2, - 0.8 - ], - [ - 100.2, - 0.2 - ] - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/6fc778e9a888b16b937c5c2a7a1ec140.asciidoc b/docs/examples/guide/6fc778e9a888b16b937c5c2a7a1ec140.asciidoc deleted file mode 100644 index 407d2226d0..0000000000 --- a/docs/examples/guide/6fc778e9a888b16b937c5c2a7a1ec140.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.searchable_snapshots.clear_cache( - index: 'my-index' -) -puts response ----- diff --git a/docs/examples/guide/6fd82baa17a48e09e3d2eed514af7f46.asciidoc b/docs/examples/guide/6fd82baa17a48e09e3d2eed514af7f46.asciidoc deleted file mode 100644 index 1b94f68c05..0000000000 --- a/docs/examples/guide/6fd82baa17a48e09e3d2eed514af7f46.asciidoc +++ /dev/null @@ -1,68 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'MultiLineString', - coordinates: [ - [ - [ - 102, - 2 - ], - [ - 103, - 2 - ], - [ - 103, - 3 - ], - [ - 102, - 3 - ] - ], - [ - [ - 100, - 0 - ], - [ - 101, - 0 - ], - [ - 101, - 1 - ], - [ - 100, - 1 - ] - ], - [ - [ - 100.2, - 0.2 - ], - [ - 100.8, - 0.2 - ], - [ - 100.8, - 0.8 - ], - [ - 100.2, - 0.8 - ] - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/6fe6c095c6995e0f2214f5f3bc85d74e.asciidoc b/docs/examples/guide/6fe6c095c6995e0f2214f5f3bc85d74e.asciidoc deleted file mode 100644 index 8c3505332e..0000000000 --- a/docs/examples/guide/6fe6c095c6995e0f2214f5f3bc85d74e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete_data_lifecycle( - name: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/6febf0e6883b23b15ac213abc4bac326.asciidoc b/docs/examples/guide/6febf0e6883b23b15ac213abc4bac326.asciidoc deleted file mode 100644 index f9f65182cf..0000000000 --- a/docs/examples/guide/6febf0e6883b23b15ac213abc4bac326.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'place', - body: { - suggest: { - place_suggestion: { - prefix: 'tim', - completion: { - field: 'suggest', - size: 10, - contexts: { - location: { - lat: 43.662, - lon: -79.38 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7011fcdd231804f9c3894154ae2c3fbc.asciidoc b/docs/examples/guide/7011fcdd231804f9c3894154ae2c3fbc.asciidoc deleted file mode 100644 index 24da6ea4c5..0000000000 --- a/docs/examples/guide/7011fcdd231804f9c3894154ae2c3fbc.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index', - body: { - mappings: { - properties: { - 'text.tokens' => { - type: 'sparse_vector' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7021ddb273a3a00847324d2f670c4c04.asciidoc b/docs/examples/guide/7021ddb273a3a00847324d2f670c4c04.asciidoc deleted file mode 100644 index 9b96fc7b71..0000000000 --- a/docs/examples/guide/7021ddb273a3a00847324d2f670c4c04.asciidoc +++ /dev/null @@ -1,44 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'image-index', - body: { - query: { - match: { - title: { - query: 'mountain lake', - boost: 0.9 - } - } - }, - knn: [ - { - field: 'image-vector', - query_vector: [ - 54, - 10, - -2 - ], - k: 5, - num_candidates: 50, - boost: 0.1 - }, - { - field: 'title-vector', - query_vector: [ - 1, - 20, - -52, - 23, - 10 - ], - k: 10, - num_candidates: 10, - boost: 0.5 - } - ], - size: 10 - } -) -puts response ----- diff --git a/docs/examples/guide/7067a498bb6c788854a26443a64b843a.asciidoc b/docs/examples/guide/7067a498bb6c788854a26443a64b843a.asciidoc deleted file mode 100644 index fc0773bed3..0000000000 --- a/docs/examples/guide/7067a498bb6c788854a26443a64b843a.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - runtime_mappings: { - 'amount.signed' => { - type: 'double', - script: "\n double amount = doc['amount'].value;\n if (doc['type'].value == 'expense') {\n amount *= -1;\n }\n emit(amount);\n " - } - }, - query: { - bool: { - filter: { - range: { - 'amount.signed' => { - lt: 10 - } - } - } - } - }, - fields: [ - { - field: 'amount.signed' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/708e7ec681be41791f232817a07cda82.asciidoc b/docs/examples/guide/708e7ec681be41791f232817a07cda82.asciidoc deleted file mode 100644 index d6bf1d1a0b..0000000000 --- a/docs/examples/guide/708e7ec681be41791f232817a07cda82.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get( - repository: 'my_repository', - snapshot: 'snapshot*', - size: 2, - sort: 'name', - offset: 2 -) -puts response ----- diff --git a/docs/examples/guide/70c736ecb3746dbe839af0e468712805.asciidoc b/docs/examples/guide/70c736ecb3746dbe839af0e468712805.asciidoc deleted file mode 100644 index b04107bfb8..0000000000 --- a/docs/examples/guide/70c736ecb3746dbe839af0e468712805.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.transform.delete_transform( - transform_id: 'ecommerce_transform' -) -puts response ----- diff --git a/docs/examples/guide/70cc66bf4054ebf0ad4955cb99d9ab80.asciidoc b/docs/examples/guide/70cc66bf4054ebf0ad4955cb99d9ab80.asciidoc deleted file mode 100644 index 308888986e..0000000000 --- a/docs/examples/guide/70cc66bf4054ebf0ad4955cb99d9ab80.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.ml.update_trained_model_deployment( - model_id: 'elastic__distilbert-base-uncased-finetuned-conll03-english', - body: { - number_of_allocations: 4 - } -) -puts response ----- diff --git a/docs/examples/guide/70f89dd6b71ea890ad3cf47d83e43344.asciidoc b/docs/examples/guide/70f89dd6b71ea890ad3cf47d83e43344.asciidoc deleted file mode 100644 index ea797c0ebc..0000000000 --- a/docs/examples/guide/70f89dd6b71ea890ad3cf47d83e43344.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - description: 'My optional pipeline description', - processors: [ - { - set: { - description: 'My optional processor description', - field: 'my-long-field', - value: 10 - } - }, - { - set: { - description: "Set 'my-boolean-field' to true", - field: 'my-boolean-field', - value: true - } - }, - { - lowercase: { - field: 'my-keyword-field' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/711443504b69d0d296e717c716a223e2.asciidoc b/docs/examples/guide/711443504b69d0d296e717c716a223e2.asciidoc deleted file mode 100644 index fbab109146..0000000000 --- a/docs/examples/guide/711443504b69d0d296e717c716a223e2.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'drivers', - body: { - query: { - nested: { - path: 'driver', - query: { - nested: { - path: 'driver.vehicle', - query: { - bool: { - must: [ - { - match: { - 'driver.vehicle.make' => 'Powell Motors' - } - }, - { - match: { - 'driver.vehicle.model' => 'Canyonero' - } - } - ] - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/719141517d83b7e8e929b347a8d67c9f.asciidoc b/docs/examples/guide/719141517d83b7e8e929b347a8d67c9f.asciidoc deleted file mode 100644 index 264c6a3725..0000000000 --- a/docs/examples/guide/719141517d83b7e8e929b347a8d67c9f.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.indices.get( - index: 'kibana_sample_data_flights,.ds-my-data-stream-2022.06.17-000001', - features: 'settings', - flat_settings: true -) -puts response ----- diff --git a/docs/examples/guide/71c629c44bf3c542a0daacbfc253c4b0.asciidoc b/docs/examples/guide/71c629c44bf3c542a0daacbfc253c4b0.asciidoc deleted file mode 100644 index 3332f21f1a..0000000000 --- a/docs/examples/guide/71c629c44bf3c542a0daacbfc253c4b0.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.stats( - node_id: 'node1,node*,master:false' -) -puts response ----- diff --git a/docs/examples/guide/71de08a2d962c66f0c60677eff23f8d1.asciidoc b/docs/examples/guide/71de08a2d962c66f0c60677eff23f8d1.asciidoc deleted file mode 100644 index 073f5e1922..0000000000 --- a/docs/examples/guide/71de08a2d962c66f0c60677eff23f8d1.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - aggregations: { - price_ranges: { - range: { - field: 'price', - keyed: true, - ranges: [ - { - key: 'cheap', - to: 100 - }, - { - key: 'average', - from: 100, - to: 200 - }, - { - key: 'expensive', - from: 200 - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/71fa652ddea811eb3c8bf8c5db21e549.asciidoc b/docs/examples/guide/71fa652ddea811eb3c8bf8c5db21e549.asciidoc deleted file mode 100644 index 917d949313..0000000000 --- a/docs/examples/guide/71fa652ddea811eb3c8bf8c5db21e549.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - index: 'analyze_sample', - body: { - analyzer: 'whitespace', - text: 'this is a test' - } -) -puts response ----- diff --git a/docs/examples/guide/722238b4e7b78cdb3c6a986780e7e286.asciidoc b/docs/examples/guide/722238b4e7b78cdb3c6a986780e7e286.asciidoc deleted file mode 100644 index 00ad5c2653..0000000000 --- a/docs/examples/guide/722238b4e7b78cdb3c6a986780e7e286.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'range_index', - size: 0, - body: { - query: { - range: { - time_frame: { - gte: '2019-11-01', - format: 'yyyy-MM-dd' - } - } - }, - aggregations: { - november_data: { - date_histogram: { - field: 'time_frame', - calendar_interval: 'day', - format: 'yyyy-MM-dd' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/726994d8f3793b86628255a797155a52.asciidoc b/docs/examples/guide/726994d8f3793b86628255a797155a52.asciidoc deleted file mode 100644 index f6b4565cf6..0000000000 --- a/docs/examples/guide/726994d8f3793b86628255a797155a52.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.nodes.info( - node_id: 'ingest', - filter_path: 'nodes.*.ingest.processors' -) -puts response ----- diff --git a/docs/examples/guide/72a3668ddc95d9aec47cc679d1e7afc5.asciidoc b/docs/examples/guide/72a3668ddc95d9aec47cc679d1e7afc5.asciidoc deleted file mode 100644 index a5e4bdb3ea..0000000000 --- a/docs/examples/guide/72a3668ddc95d9aec47cc679d1e7afc5.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - cluster: { - remote: { - cluster_one: { - seeds: [ - '35.238.149.1:9300' - ], - skip_unavailable: true - }, - cluster_two: { - seeds: [ - '35.238.149.2:9300' - ], - skip_unavailable: false - }, - cluster_three: { - seeds: [ - '35.238.149.3:9300' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/72ae3851160fcf02b8e2cdfd4e57d238.asciidoc b/docs/examples/guide/72ae3851160fcf02b8e2cdfd4e57d238.asciidoc deleted file mode 100644 index 9481eff5e8..0000000000 --- a/docs/examples/guide/72ae3851160fcf02b8e2cdfd4e57d238.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ilm.start -puts response ----- diff --git a/docs/examples/guide/72b999120785dfba2827268482e9be0a.asciidoc b/docs/examples/guide/72b999120785dfba2827268482e9be0a.asciidoc deleted file mode 100644 index 556019760a..0000000000 --- a/docs/examples/guide/72b999120785dfba2827268482e9be0a.asciidoc +++ /dev/null @@ -1,99 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'museums', - body: { - mappings: { - properties: { - location: { - type: 'geo_point' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'museums', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - location: 'POINT (4.912350 52.374081)', - name: 'NEMO Science Museum' - }, - { - index: { - _id: 2 - } - }, - { - location: 'POINT (4.901618 52.369219)', - name: 'Museum Het Rembrandthuis' - }, - { - index: { - _id: 3 - } - }, - { - location: 'POINT (4.914722 52.371667)', - name: 'Nederlands Scheepvaartmuseum' - }, - { - index: { - _id: 4 - } - }, - { - location: 'POINT (4.405200 51.222900)', - name: 'Letterenhuis' - }, - { - index: { - _id: 5 - } - }, - { - location: 'POINT (2.336389 48.861111)', - name: 'Musée du Louvre' - }, - { - index: { - _id: 6 - } - }, - { - location: 'POINT (2.327000 48.860000)', - name: "Musée d'Orsay" - } - ] -) -puts response - -response = client.search( - index: 'museums', - size: 0, - body: { - query: { - match: { - name: 'musée' - } - }, - aggregations: { - viewport: { - geo_bounds: { - field: 'location', - wrap_longitude: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/72bae0252b74ff6fd9f0702ff008d84a.asciidoc b/docs/examples/guide/72bae0252b74ff6fd9f0702ff008d84a.asciidoc deleted file mode 100644 index 44bf6c62b4..0000000000 --- a/docs/examples/guide/72bae0252b74ff6fd9f0702ff008d84a.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get( - repository: 'my_repository', - snapshot: '*', - sort: 'name', - from_sort_value: 'snapshot_2' -) -puts response ----- diff --git a/docs/examples/guide/72beebe779a258c225dee7b023e60c52.asciidoc b/docs/examples/guide/72beebe779a258c225dee7b023e60c52.asciidoc deleted file mode 100644 index 35cf9a82b2..0000000000 --- a/docs/examples/guide/72beebe779a258c225dee7b023e60c52.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - metric: 'indices', - index_metric: 'search' -) -puts response ----- diff --git a/docs/examples/guide/72d33fbd72b0766b2f14ea27d9ccf0fa.asciidoc b/docs/examples/guide/72d33fbd72b0766b2f14ea27d9ccf0fa.asciidoc deleted file mode 100644 index fcce2d27b4..0000000000 --- a/docs/examples/guide/72d33fbd72b0766b2f14ea27d9ccf0fa.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete( - index: 'my-index' -) -puts response ----- diff --git a/docs/examples/guide/73250f845738c428246a3ade66a8f54c.asciidoc b/docs/examples/guide/73250f845738c428246a3ade66a8f54c.asciidoc deleted file mode 100644 index 78d1509e59..0000000000 --- a/docs/examples/guide/73250f845738c428246a3ade66a8f54c.asciidoc +++ /dev/null @@ -1,52 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'exams', - refresh: true, - body: { - grade: 100, - weight: [ - 2, - 3 - ] - } -) -puts response - -response = client.index( - index: 'exams', - refresh: true, - body: { - grade: 80, - weight: 3 - } -) -puts response - -response = client.search( - index: 'exams', - filter_path: 'aggregations', - body: { - size: 0, - runtime_mappings: { - 'weight.combined' => { - type: 'double', - script: "\n double s = 0;\n for (double w : doc['weight']) {\n s += w;\n }\n emit(s);\n " - } - }, - aggregations: { - weighted_grade: { - weighted_avg: { - value: { - script: 'doc.grade.value + 1' - }, - weight: { - field: 'weight.combined' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/734e2b1d1ca84a305240a449738f0eba.asciidoc b/docs/examples/guide/734e2b1d1ca84a305240a449738f0eba.asciidoc deleted file mode 100644 index e0dd435db7..0000000000 --- a/docs/examples/guide/734e2b1d1ca84a305240a449738f0eba.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.indices( - v: true, - index: '.ds-my-data-stream-2022.06.17-000001,kibana_sample_data_flightsh=index,status,health' -) -puts response ----- diff --git a/docs/examples/guide/7353d42289155bb864504fd62efc6979.asciidoc b/docs/examples/guide/7353d42289155bb864504fd62efc6979.asciidoc deleted file mode 100644 index 541412dae2..0000000000 --- a/docs/examples/guide/7353d42289155bb864504fd62efc6979.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-image-index', - body: { - size: 3, - query: { - knn: { - field: 'image-vector', - query_vector: [ - -5, - 9, - -12 - ], - num_candidates: 10 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/738db420e3ad2a127ea75fb8e5051926.asciidoc b/docs/examples/guide/738db420e3ad2a127ea75fb8e5051926.asciidoc deleted file mode 100644 index 7910029c7c..0000000000 --- a/docs/examples/guide/738db420e3ad2a127ea75fb8e5051926.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'last-log-from-clientip' -) -puts response ----- diff --git a/docs/examples/guide/73be1f93d789264e5b972ddb5991bc66.asciidoc b/docs/examples/guide/73be1f93d789264e5b972ddb5991bc66.asciidoc deleted file mode 100644 index ddaf86b2a1..0000000000 --- a/docs/examples/guide/73be1f93d789264e5b972ddb5991bc66.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'logger.org.elasticsearch.discovery' => 'DEBUG' - } - } -) -puts response ----- diff --git a/docs/examples/guide/73d1a6c5ef90b7e35d43a0bfdc1e158d.asciidoc b/docs/examples/guide/73d1a6c5ef90b7e35d43a0bfdc1e158d.asciidoc deleted file mode 100644 index 489c946752..0000000000 --- a/docs/examples/guide/73d1a6c5ef90b7e35d43a0bfdc1e158d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.rollup.get_rollup_index_caps( - index: 'sensor_rollup' -) -puts response ----- diff --git a/docs/examples/guide/73df03be6ee78b10106581dbd7cb39ef.asciidoc b/docs/examples/guide/73df03be6ee78b10106581dbd7cb39ef.asciidoc deleted file mode 100644 index e964eff542..0000000000 --- a/docs/examples/guide/73df03be6ee78b10106581dbd7cb39ef.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'date', - calendar_interval: '1M' - }, - aggregations: { - the_sum: { - sum: { - field: 'price' - } - }, - the_movavg: { - moving_fn: { - buckets_path: 'the_sum', - window: 10, - script: 'MovingFunctions.ewma(values, 0.3)' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc b/docs/examples/guide/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc deleted file mode 100644 index 2296b26fd4..0000000000 --- a/docs/examples/guide/73ebc89cb32adb389ae16bb088d7c7e6.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.enable' => nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/73ecdaeca5885a88f9a4273a462196d0.asciidoc b/docs/examples/guide/73ecdaeca5885a88f9a4273a462196d0.asciidoc deleted file mode 100644 index 377804bcd3..0000000000 --- a/docs/examples/guide/73ecdaeca5885a88f9a4273a462196d0.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'template_1', - body: { - index_patterns: [ - 'te*' - ], - priority: 1, - template: { - settings: { - number_of_shards: 2 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/73f9271dee9b8539b6aa7e17f323c623.asciidoc b/docs/examples/guide/73f9271dee9b8539b6aa7e17f323c623.asciidoc deleted file mode 100644 index c61c84c3f8..0000000000 --- a/docs/examples/guide/73f9271dee9b8539b6aa7e17f323c623.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'products', - body: { - aggregations: { - genres_and_products: { - multi_terms: { - terms: [ - { - field: 'genre' - }, - { - field: 'product' - } - ], - order: { - total_quantity: 'desc' - } - }, - aggregations: { - total_quantity: { - sum: { - field: 'quantity' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7404c6e809fee5d7eb9678a82a872806.asciidoc b/docs/examples/guide/7404c6e809fee5d7eb9678a82a872806.asciidoc deleted file mode 100644 index 4d061cb9d0..0000000000 --- a/docs/examples/guide/7404c6e809fee5d7eb9678a82a872806.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - aggregations: { - "my-agg-name": { - terms: { - field: 'my-field' - }, - aggregations: { - "my-sub-agg-name": { - avg: { - field: 'my-other-field' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7456ef459d510d66ba4492cc9fbdc6c6.asciidoc b/docs/examples/guide/7456ef459d510d66ba4492cc9fbdc6c6.asciidoc deleted file mode 100644 index 7f77edf783..0000000000 --- a/docs/examples/guide/7456ef459d510d66ba4492cc9fbdc6c6.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - cluster: { - remote: { - cluster_two: { - mode: nil, - seeds: nil, - skip_unavailable: nil, - 'transport.compress' => nil - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/74678f8bbc7e4fc1885719d1cf63ac67.asciidoc b/docs/examples/guide/74678f8bbc7e4fc1885719d1cf63ac67.asciidoc deleted file mode 100644 index 02bc626d7e..0000000000 --- a/docs/examples/guide/74678f8bbc7e4fc1885719d1cf63ac67.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - range: { - date_range: { - field: 'date', - format: 'MM-yyy', - ranges: [ - { - from: '01-2015', - to: '03-2015', - key: 'quarter_01' - }, - { - from: '03-2015', - to: '06-2015', - key: 'quarter_02' - } - ], - keyed: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/746e0a1cb5984f2672963b363505c7b3.asciidoc b/docs/examples/guide/746e0a1cb5984f2672963b363505c7b3.asciidoc deleted file mode 100644 index 6e3b3f9b42..0000000000 --- a/docs/examples/guide/746e0a1cb5984f2672963b363505c7b3.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - date: { - type: 'date', - format: 'strict_date_optional_time||epoch_second' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'example', - refresh: true, - body: { - date: 1_618_321_898 - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - fields: [ - { - field: 'date' - } - ], - _source: false - } -) -puts response ----- diff --git a/docs/examples/guide/746e87db7e1e8b5e6b40d8b5b188de42.asciidoc b/docs/examples/guide/746e87db7e1e8b5e6b40d8b5b188de42.asciidoc deleted file mode 100644 index 0da6b29e6a..0000000000 --- a/docs/examples/guide/746e87db7e1e8b5e6b40d8b5b188de42.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'exams', - size: 0, - body: { - aggregations: { - grades_stats: { - stats: { - field: 'grade' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7471e97aaaf21c3a200abdd89f15c3cc.asciidoc b/docs/examples/guide/7471e97aaaf21c3a200abdd89f15c3cc.asciidoc deleted file mode 100644 index 2b730dbf46..0000000000 --- a/docs/examples/guide/7471e97aaaf21c3a200abdd89f15c3cc.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - intervals: { - my_text: { - match: { - query: 'hot porridge', - max_gaps: 10, - filter: { - not_containing: { - match: { - query: 'salty' - } - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/747a4b5001423938d7d05399d28f1995.asciidoc b/docs/examples/guide/747a4b5001423938d7d05399d28f1995.asciidoc deleted file mode 100644 index a388fcf38a..0000000000 --- a/docs/examples/guide/747a4b5001423938d7d05399d28f1995.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'indices.lifecycle.poll_interval' => '1m' - } - } -) -puts response ----- diff --git a/docs/examples/guide/74a80c28737a0648db0dfe7f049d12f2.asciidoc b/docs/examples/guide/74a80c28737a0648db0dfe7f049d12f2.asciidoc deleted file mode 100644 index ebf45586f5..0000000000 --- a/docs/examples/guide/74a80c28737a0648db0dfe7f049d12f2.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.exists( - index: 'my-index-000001', - id: 0 -) -puts response ----- diff --git a/docs/examples/guide/74b13ceb6cda3acaa9e9f58c9e5e2431.asciidoc b/docs/examples/guide/74b13ceb6cda3acaa9e9f58c9e5e2431.asciidoc deleted file mode 100644 index 7fdc78d2f4..0000000000 --- a/docs/examples/guide/74b13ceb6cda3acaa9e9f58c9e5e2431.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - _meta: { - class: 'MyApp2::User3', - version: { - min: '1.3', - max: '1.5' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/74da377bccad43da2b0e276c086d26ba.asciidoc b/docs/examples/guide/74da377bccad43da2b0e276c086d26ba.asciidoc deleted file mode 100644 index 2f9c916c48..0000000000 --- a/docs/examples/guide/74da377bccad43da2b0e276c086d26ba.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.cluster.info( - target: '_all' -) -puts response - -response = client.cluster.info( - target: 'http' -) -puts response - -response = client.cluster.info( - target: 'ingest' -) -puts response - -response = client.cluster.info( - target: 'thread_pool' -) -puts response - -response = client.cluster.info( - target: 'script' -) -puts response - -response = client.cluster.info( - target: 'http,ingest' -) -puts response ----- diff --git a/docs/examples/guide/75957a7d1b67e3d47899c5f18b32cb61.asciidoc b/docs/examples/guide/75957a7d1b67e3d47899c5f18b32cb61.asciidoc deleted file mode 100644 index 117077606d..0000000000 --- a/docs/examples/guide/75957a7d1b67e3d47899c5f18b32cb61.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.close_job( - job_id: 'low_request_rate' -) -puts response ----- diff --git a/docs/examples/guide/75aba7b1d3a22dce62f26b8b1e6bee58.asciidoc b/docs/examples/guide/75aba7b1d3a22dce62f26b8b1e6bee58.asciidoc deleted file mode 100644 index f63a421cbd..0000000000 --- a/docs/examples/guide/75aba7b1d3a22dce62f26b8b1e6bee58.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.validate_query( - index: 'my-index-000001', - explain: true, - body: { - query: { - query_string: { - query: '@timestamp:foo', - lenient: false - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/75c347b181112d2c4538c01ade903afe.asciidoc b/docs/examples/guide/75c347b181112d2c4538c01ade903afe.asciidoc deleted file mode 100644 index 87a6ce8cf2..0000000000 --- a/docs/examples/guide/75c347b181112d2c4538c01ade903afe.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.validate_query( - index: 'my-index-000001', - rewrite: true, - body: { - query: { - match: { - 'user.id' => { - query: 'kimchy', - fuzziness: 'auto' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/75e360d03fb416f0a65ca37c662c2e9c.asciidoc b/docs/examples/guide/75e360d03fb416f0a65ca37c662c2e9c.asciidoc deleted file mode 100644 index af02ad26a6..0000000000 --- a/docs/examples/guide/75e360d03fb416f0a65ca37c662c2e9c.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'transactions', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - type: 'sale', - amount: 80 - }, - { - index: { - _id: 2 - } - }, - { - type: 'cost', - amount: 10 - }, - { - index: { - _id: 3 - } - }, - { - type: 'cost', - amount: 30 - }, - { - index: { - _id: 4 - } - }, - { - type: 'sale', - amount: 130 - } - ] -) -puts response ----- diff --git a/docs/examples/guide/75e6d66e94e61bd8a555beaaee255c36.asciidoc b/docs/examples/guide/75e6d66e94e61bd8a555beaaee255c36.asciidoc deleted file mode 100644 index e3407f4260..0000000000 --- a/docs/examples/guide/75e6d66e94e61bd8a555beaaee255c36.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.rollup.rollup_search( - index: 'sensor_rollup', - body: { - size: 0, - aggregations: { - avg_temperature: { - avg: { - field: 'temperature' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/763ce1377c8dfa1ca6a042d8ee99f4f5.asciidoc b/docs/examples/guide/763ce1377c8dfa1ca6a042d8ee99f4f5.asciidoc deleted file mode 100644 index 2d38c96984..0000000000 --- a/docs/examples/guide/763ce1377c8dfa1ca6a042d8ee99f4f5.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.rollover( - alias: 'k9s' -) -puts response ----- diff --git a/docs/examples/guide/76448aaaaa2c352bb6e09d2f83a3fbb3.asciidoc b/docs/examples/guide/76448aaaaa2c352bb6e09d2f83a3fbb3.asciidoc deleted file mode 100644 index ea157c408d..0000000000 --- a/docs/examples/guide/76448aaaaa2c352bb6e09d2f83a3fbb3.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'letter', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/7659f2f2b0fbe8584b855a01638b95ed.asciidoc b/docs/examples/guide/7659f2f2b0fbe8584b855a01638b95ed.asciidoc deleted file mode 100644 index f78f4c30d4..0000000000 --- a/docs/examples/guide/7659f2f2b0fbe8584b855a01638b95ed.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - user_name: { - terms: { - field: 'user_name' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/765c9c8b40b67a42121648045dbf10fb.asciidoc b/docs/examples/guide/765c9c8b40b67a42121648045dbf10fb.asciidoc deleted file mode 100644 index 84943f158c..0000000000 --- a/docs/examples/guide/765c9c8b40b67a42121648045dbf10fb.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - filter_path: 'nodes.*.jvm.mem.pools.old' -) -puts response ----- diff --git a/docs/examples/guide/766cfc1c9fcd2c186e965761ceb2c07d.asciidoc b/docs/examples/guide/766cfc1c9fcd2c186e965761ceb2c07d.asciidoc deleted file mode 100644 index 40b02740e2..0000000000 --- a/docs/examples/guide/766cfc1c9fcd2c186e965761ceb2c07d.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - index: { - number_of_replicas: 1 - } - } -) -puts response ----- diff --git a/docs/examples/guide/769f75829a8e6670aa4cf83d0d737046.asciidoc b/docs/examples/guide/769f75829a8e6670aa4cf83d0d737046.asciidoc deleted file mode 100644 index b3da931487..0000000000 --- a/docs/examples/guide/769f75829a8e6670aa4cf83d0d737046.asciidoc +++ /dev/null @@ -1,48 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - date: '2015-10-01T00:30:00Z' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - refresh: true, - body: { - date: '2015-10-01T01:30:00Z' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 3, - refresh: true, - body: { - date: '2015-10-01T02:30:00Z' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - size: 0, - body: { - aggregations: { - by_day: { - auto_date_histogram: { - field: 'date', - buckets: 3 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/76b279835936ee4b546a171c671c3cd7.asciidoc b/docs/examples/guide/76b279835936ee4b546a171c671c3cd7.asciidoc deleted file mode 100644 index d1cbb95fa9..0000000000 --- a/docs/examples/guide/76b279835936ee4b546a171c671c3cd7.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'cjk_width' - ], - text: 'シーサイドライナー' - } -) -puts response ----- diff --git a/docs/examples/guide/76c167d8ab305cb43b594f140c902dfe.asciidoc b/docs/examples/guide/76c167d8ab305cb43b594f140c902dfe.asciidoc deleted file mode 100644 index 1096e55f6b..0000000000 --- a/docs/examples/guide/76c167d8ab305cb43b594f140c902dfe.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.shrink( - index: 'my_source_index', - target: 'my_target_index', - body: { - settings: { - 'index.number_of_replicas' => 1, - 'index.number_of_shards' => 1, - 'index.codec' => 'best_compression' - }, - aliases: { - my_search_indices: {} - } - } -) -puts response ----- diff --git a/docs/examples/guide/76dbdd0b2bd48c3c6b1a8d81e23bafd6.asciidoc b/docs/examples/guide/76dbdd0b2bd48c3c6b1a8d81e23bafd6.asciidoc deleted file mode 100644 index bdad71491c..0000000000 --- a/docs/examples/guide/76dbdd0b2bd48c3c6b1a8d81e23bafd6.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - analyzer: 'standard', - text: 'this is a test' - } -) -puts response ----- diff --git a/docs/examples/guide/77113c65e1755313183a8969233a5a07.asciidoc b/docs/examples/guide/77113c65e1755313183a8969233a5a07.asciidoc deleted file mode 100644 index d80c355950..0000000000 --- a/docs/examples/guide/77113c65e1755313183a8969233a5a07.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - kwd: { - type: 'keyword', - ignore_above: 3 - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - kwd: [ - 'foo', - 'foo', - 'bang', - 'bar', - 'baz' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/7741a04e7e621c528cd72848d875776d.asciidoc b/docs/examples/guide/7741a04e7e621c528cd72848d875776d.asciidoc deleted file mode 100644 index 5b7b69ff48..0000000000 --- a/docs/examples/guide/7741a04e7e621c528cd72848d875776d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.create_data_stream( - name: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/77447e2966708e92f5e219d43ac3f00d.asciidoc b/docs/examples/guide/77447e2966708e92f5e219d43ac3f00d.asciidoc deleted file mode 100644 index 4909bfef4f..0000000000 --- a/docs/examples/guide/77447e2966708e92f5e219d43ac3f00d.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.tasks.list( - actions: '*reindex', - wait_for_completion: true, - timeout: '10s' -) -puts response ----- diff --git a/docs/examples/guide/774bfde8793dc4927f7cad2dd91c5b5f.asciidoc b/docs/examples/guide/774bfde8793dc4927f7cad2dd91c5b5f.asciidoc deleted file mode 100644 index 7e694c785c..0000000000 --- a/docs/examples/guide/774bfde8793dc4927f7cad2dd91c5b5f.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.msearch_template( - index: 'my-index', - body: [ - {}, - { - id: 'my-search-template', - params: { - query_string: 'hello world', - from: 0, - size: 10 - } - }, - {}, - { - id: 'my-other-search-template', - params: { - query_type: 'match_all' - } - } - ] -) -puts response ----- diff --git a/docs/examples/guide/77518e8c6198acfe77c0934fd2fe65cb.asciidoc b/docs/examples/guide/77518e8c6198acfe77c0934fd2fe65cb.asciidoc deleted file mode 100644 index ea938fe04b..0000000000 --- a/docs/examples/guide/77518e8c6198acfe77c0934fd2fe65cb.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.text_structure.find_message_structure( - body: { - messages: [ - '[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128', - '[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]', - '[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]', - '[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]', - '[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]', - '[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]', - '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]', - '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]', - '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]', - '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]', - '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]', - '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]', - '[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]', - '[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]', - '[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]', - '[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled', - '[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled', - '[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled', - '[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]', - '[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]', - '[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized', - '[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/776b553df0e507c96dbdbaedecaca0cc.asciidoc b/docs/examples/guide/776b553df0e507c96dbdbaedecaca0cc.asciidoc deleted file mode 100644 index 2688db9ee2..0000000000 --- a/docs/examples/guide/776b553df0e507c96dbdbaedecaca0cc.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.ml.infer_trained_model( - model_id: 'model2', - body: { - docs: [ - { - text_field: 'The movie was awesome!!' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/7777326c6052fee28061e5b82540aedc.asciidoc b/docs/examples/guide/7777326c6052fee28061e5b82540aedc.asciidoc deleted file mode 100644 index a36eb39893..0000000000 --- a/docs/examples/guide/7777326c6052fee28061e5b82540aedc.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - grade_percentiles: { - percentiles: { - field: 'grade', - missing: 10 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/77828fcaecc3f058c48b955928198ff6.asciidoc b/docs/examples/guide/77828fcaecc3f058c48b955928198ff6.asciidoc deleted file mode 100644 index 39007a0aa7..0000000000 --- a/docs/examples/guide/77828fcaecc3f058c48b955928198ff6.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - description: 'parse multiple patterns', - processors: [ - { - grok: { - field: 'message', - patterns: [ - '%{FAVORITE_DOG:pet}', - '%{FAVORITE_CAT:pet}' - ], - pattern_definitions: { - "FAVORITE_DOG": 'beagle', - "FAVORITE_CAT": 'burmese' - } - } - } - ] - }, - docs: [ - { - _source: { - message: 'I love burmese cats!' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/77c099c97ea6911e2dd6e996da7dcca0.asciidoc b/docs/examples/guide/77c099c97ea6911e2dd6e996da7dcca0.asciidoc deleted file mode 100644 index de1a8f620f..0000000000 --- a/docs/examples/guide/77c099c97ea6911e2dd6e996da7dcca0.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.nodes.hot_threads -puts response - -response = client.nodes.hot_threads( - node_id: 'nodeId1,nodeId2' -) -puts response ----- diff --git a/docs/examples/guide/77c50f982906718ecc59aa708aed728f.asciidoc b/docs/examples/guide/77c50f982906718ecc59aa708aed728f.asciidoc deleted file mode 100644 index 1a1d85cdd9..0000000000 --- a/docs/examples/guide/77c50f982906718ecc59aa708aed728f.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'my-index-000001', - id: 1, - body: { - script: { - source: 'ctx._source.counter += params.count', - lang: 'painless', - params: { - count: 4 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/77ca1a3193f75651e0bf9e8fe5227a04.asciidoc b/docs/examples/guide/77ca1a3193f75651e0bf9e8fe5227a04.asciidoc deleted file mode 100644 index c0fe304583..0000000000 --- a/docs/examples/guide/77ca1a3193f75651e0bf9e8fe5227a04.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_model_snapshot_upgrade_stats( - job_id: 'low_request_rate', - snapshot_id: '_all' -) -puts response ----- diff --git a/docs/examples/guide/77d0780c5faea4c9ec51a322a6811b3b.asciidoc b/docs/examples/guide/77d0780c5faea4c9ec51a322a6811b3b.asciidoc deleted file mode 100644 index f993fe647a..0000000000 --- a/docs/examples/guide/77d0780c5faea4c9ec51a322a6811b3b.asciidoc +++ /dev/null @@ -1,59 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-index-000001', - refresh: true, - body: [ - { - index: {} - }, - { - timestamp: '2020-04-30T14:30:17-05:00', - message: '40.135.0.0 - - [30/Apr/2020:14:30:17 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:30:53-05:00', - message: '232.0.0.0 - - [30/Apr/2020:14:30:53 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:12-05:00', - message: '26.1.0.0 - - [30/Apr/2020:14:31:12 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:19-05:00', - message: '247.37.0.0 - - [30/Apr/2020:14:31:19 -0500] "GET /french/splash_inet.html HTTP/1.0" 200 3781' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:22-05:00', - message: '247.37.0.0 - - [30/Apr/2020:14:31:22 -0500] "GET /images/hm_nbg.jpg HTTP/1.0" 304 0' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:27-05:00', - message: '252.0.0.0 - - [30/Apr/2020:14:31:27 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:28-05:00', - message: 'not a valid apache log' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/78176cd6f570e1534bb40b19e6e900b6.asciidoc b/docs/examples/guide/78176cd6f570e1534bb40b19e6e900b6.asciidoc deleted file mode 100644 index f0147da6ac..0000000000 --- a/docs/examples/guide/78176cd6f570e1534bb40b19e6e900b6.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.aliases( - v: true -) -puts response ----- diff --git a/docs/examples/guide/7841b65a3bb880ed66cec453925a50cf.asciidoc b/docs/examples/guide/7841b65a3bb880ed66cec453925a50cf.asciidoc deleted file mode 100644 index 59aa715d1c..0000000000 --- a/docs/examples/guide/7841b65a3bb880ed66cec453925a50cf.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.delete_by_query( - index: 'my-index-000001,my-index-000002', - body: { - query: { - match_all: {} - } - } -) -puts response ----- diff --git a/docs/examples/guide/78c4035e4fbf6851140660f6ed2a1fa5.asciidoc b/docs/examples/guide/78c4035e4fbf6851140660f6ed2a1fa5.asciidoc deleted file mode 100644 index ccd777929e..0000000000 --- a/docs/examples/guide/78c4035e4fbf6851140660f6ed2a1fa5.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.indices.stats -puts response ----- diff --git a/docs/examples/guide/78c96113ae4ed0054e581b17542528a7.asciidoc b/docs/examples/guide/78c96113ae4ed0054e581b17542528a7.asciidoc deleted file mode 100644 index 622b47b3b8..0000000000 --- a/docs/examples/guide/78c96113ae4ed0054e581b17542528a7.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'source', - query: { - match: { - company: 'cat' - } - } - }, - dest: { - index: 'dest', - routing: '=cat' - } - } -) -puts response ----- diff --git a/docs/examples/guide/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc b/docs/examples/guide/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc deleted file mode 100644 index b8e9fdf7cc..0000000000 --- a/docs/examples/guide/78e20b4cff470ed7357de1fd74bcfeb7.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.update_aliases( - body: { - actions: [ - { - remove: { - index: 'index1', - alias: 'logs-non-existing' - } - }, - { - add: { - index: 'index2', - alias: 'logs-non-existing' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/790c49fe2ec638e5e8db51a9236bba35.asciidoc b/docs/examples/guide/790c49fe2ec638e5e8db51a9236bba35.asciidoc deleted file mode 100644 index ea327204d5..0000000000 --- a/docs/examples/guide/790c49fe2ec638e5e8db51a9236bba35.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations,my_geoshapes', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_bounding_box: { - 'pin.location' => { - top_left: { - lat: 40.73, - lon: -74.1 - }, - bottom_right: { - lat: 40.01, - lon: -71.12 - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/79b43a1bf02fb5b38f54b8d5aa5dab53.asciidoc b/docs/examples/guide/79b43a1bf02fb5b38f54b8d5aa5dab53.asciidoc deleted file mode 100644 index 4372f0ef9f..0000000000 --- a/docs/examples/guide/79b43a1bf02fb5b38f54b8d5aa5dab53.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - sales_over_time: { - auto_date_histogram: { - field: 'date', - buckets: 5, - format: 'yyyy-MM-dd' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/79bf91ace935d095d8e44b3ef3fe2efa.asciidoc b/docs/examples/guide/79bf91ace935d095d8e44b3ef3fe2efa.asciidoc deleted file mode 100644 index ac08fa2146..0000000000 --- a/docs/examples/guide/79bf91ace935d095d8e44b3ef3fe2efa.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_settings( - index: 'my-index-000001', - flat_settings: true, - include_defaults: true -) -puts response - -response = client.cluster.get_settings( - flat_settings: true, - include_defaults: true -) -puts response ----- diff --git a/docs/examples/guide/79e053326a3a8eec828523a035393f66.asciidoc b/docs/examples/guide/79e053326a3a8eec828523a035393f66.asciidoc deleted file mode 100644 index 367db3efef..0000000000 --- a/docs/examples/guide/79e053326a3a8eec828523a035393f66.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.delete( - index: '.ds-my-data-stream-2099.03.08-000003', - id: 'bfspvnIBr7VVZlfp2lqX' -) -puts response ----- diff --git a/docs/examples/guide/79e8bbbd6c440a21b0b4260c8cb1a61c.asciidoc b/docs/examples/guide/79e8bbbd6c440a21b0b4260c8cb1a61c.asciidoc deleted file mode 100644 index 1a46160372..0000000000 --- a/docs/examples/guide/79e8bbbd6c440a21b0b4260c8cb1a61c.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'LINESTRING (-77.03653 38.897676, -77.009051 38.889939)' - } -) -puts response ----- diff --git a/docs/examples/guide/79f33e05b203eb46eef7958fbc95ef77.asciidoc b/docs/examples/guide/79f33e05b203eb46eef7958fbc95ef77.asciidoc deleted file mode 100644 index 666c133009..0000000000 --- a/docs/examples/guide/79f33e05b203eb46eef7958fbc95ef77.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ccr.get_auto_follow_pattern( - name: 'my_auto_follow_pattern' -) -puts response ----- diff --git a/docs/examples/guide/79feb4a0c0a21b7015a52f9736cd4683.asciidoc b/docs/examples/guide/79feb4a0c0a21b7015a52f9736cd4683.asciidoc deleted file mode 100644 index 5aa84331b4..0000000000 --- a/docs/examples/guide/79feb4a0c0a21b7015a52f9736cd4683.asciidoc +++ /dev/null @@ -1,70 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - mappings: { - properties: { - comments: { - type: 'nested', - properties: { - votes: { - type: 'nested' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'test', - id: 1, - refresh: true, - body: { - title: 'Test title', - comments: [ - { - author: 'kimchy', - text: 'comment text', - votes: [] - }, - { - author: 'nik9000', - text: 'words words words', - votes: [ - { - value: 1, - voter: 'kimchy' - }, - { - value: -1, - voter: 'other' - } - ] - } - ] - } -) -puts response - -response = client.search( - index: 'test', - body: { - query: { - nested: { - path: 'comments.votes', - query: { - match: { - 'comments.votes.voter' => 'kimchy' - } - }, - inner_hits: {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7a0eb2222fe282d3aab66e12feff2a3b.asciidoc b/docs/examples/guide/7a0eb2222fe282d3aab66e12feff2a3b.asciidoc deleted file mode 100644 index 4fcfed65b4..0000000000 --- a/docs/examples/guide/7a0eb2222fe282d3aab66e12feff2a3b.asciidoc +++ /dev/null @@ -1,60 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'ip_location', - refresh: true, - body: { - ip: '192.168.1.1', - country: 'Canada', - city: 'Montreal' - } -) -puts response - -response = client.index( - index: 'logs', - id: 1, - refresh: true, - body: { - host: '192.168.1.1', - message: 'the first message' - } -) -puts response - -response = client.index( - index: 'logs', - id: 2, - refresh: true, - body: { - host: '192.168.1.2', - message: 'the second message' - } -) -puts response - -response = client.search( - index: 'logs', - body: { - runtime_mappings: { - location: { - type: 'lookup', - target_index: 'ip_location', - input_field: 'host', - target_field: 'ip', - fetch_fields: [ - 'country', - 'city' - ] - } - }, - fields: [ - 'host', - 'message', - 'location' - ], - _source: false - } -) -puts response ----- diff --git a/docs/examples/guide/7a2b9a7b2b6553a48bd4db60a939c0fc.asciidoc b/docs/examples/guide/7a2b9a7b2b6553a48bd4db60a939c0fc.asciidoc deleted file mode 100644 index a2fd24b888..0000000000 --- a/docs/examples/guide/7a2b9a7b2b6553a48bd4db60a939c0fc.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'test_index', - id: 1, - refresh: true, - body: { - query: { - match: { - body: { - query: 'miss bicycl', - analyzer: 'whitespace' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7a3a7fbd81e5050b42e8c1eca26c7c1d.asciidoc b/docs/examples/guide/7a3a7fbd81e5050b42e8c1eca26c7c1d.asciidoc deleted file mode 100644 index 8dc4f6196f..0000000000 --- a/docs/examples/guide/7a3a7fbd81e5050b42e8c1eca26c7c1d.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.async_search.delete( - id: 'FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=' -) -puts response ----- diff --git a/docs/examples/guide/7a8de5606f283f4ef171b015eef6befa.asciidoc b/docs/examples/guide/7a8de5606f283f4ef171b015eef6befa.asciidoc deleted file mode 100644 index 08d5507f2e..0000000000 --- a/docs/examples/guide/7a8de5606f283f4ef171b015eef6befa.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.stats( - metric: 'search', - groups: 'group1,group2' -) -puts response ----- diff --git a/docs/examples/guide/7ab968a61bb0783f563dd6d29b253901.asciidoc b/docs/examples/guide/7ab968a61bb0783f563dd6d29b253901.asciidoc deleted file mode 100644 index c242a64428..0000000000 --- a/docs/examples/guide/7ab968a61bb0783f563dd6d29b253901.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'catalan_example', - body: { - settings: { - analysis: { - filter: { - catalan_elision: { - type: 'elision', - articles: [ - 'd', - 'l', - 'm', - 'n', - 's', - 't' - ], - articles_case: true - }, - catalan_stop: { - type: 'stop', - stopwords: '_catalan_' - }, - catalan_keywords: { - type: 'keyword_marker', - keywords: [ - 'example' - ] - }, - catalan_stemmer: { - type: 'stemmer', - language: 'catalan' - } - }, - analyzer: { - rebuilt_catalan: { - tokenizer: 'standard', - filter: [ - 'catalan_elision', - 'lowercase', - 'catalan_stop', - 'catalan_keywords', - 'catalan_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7ae434b3667c589a8e70fe560f4ee3f9.asciidoc b/docs/examples/guide/7ae434b3667c589a8e70fe560f4ee3f9.asciidoc deleted file mode 100644 index 7370a3ff27..0000000000 --- a/docs/examples/guide/7ae434b3667c589a8e70fe560f4ee3f9.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'my-index-000001', - conflicts: 'proceed' -) -puts response ----- diff --git a/docs/examples/guide/7b3e913368e96eaa6e22e0d03c81310e.asciidoc b/docs/examples/guide/7b3e913368e96eaa6e22e0d03c81310e.asciidoc deleted file mode 100644 index fea4b10462..0000000000 --- a/docs/examples/guide/7b3e913368e96eaa6e22e0d03c81310e.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - 'index.store.type' => 'hybridfs' - } - } -) -puts response ----- diff --git a/docs/examples/guide/7b5c231526846f2f7b98d78f3656ae6a.asciidoc b/docs/examples/guide/7b5c231526846f2f7b98d78f3656ae6a.asciidoc deleted file mode 100644 index ad510028bb..0000000000 --- a/docs/examples/guide/7b5c231526846f2f7b98d78f3656ae6a.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'test', - id: 1, - body: { - doc: { - name: 'new_name' - }, - doc_as_upsert: true - } -) -puts response ----- diff --git a/docs/examples/guide/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc b/docs/examples/guide/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc deleted file mode 100644 index bfe7b4214e..0000000000 --- a/docs/examples/guide/7b7a828c21c856a3cbc41fd2f85108bf.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.refresh -puts response - -response = client.search( - index: 'my-index-000001', - size: 0, - filter_path: 'hits.total', - body: { - query: { - range: { - 'http.response.bytes' => { - lt: 2_000_000 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7b908b1189f076942de8cd497ff1fa59.asciidoc b/docs/examples/guide/7b908b1189f076942de8cd497ff1fa59.asciidoc deleted file mode 100644 index 46329a7bfa..0000000000 --- a/docs/examples/guide/7b908b1189f076942de8cd497ff1fa59.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - multi_match: { - query: 'quick brown fox', - type: 'most_fields', - fields: [ - 'title', - 'title.original', - 'title.shingles' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7b9dfe5857bde1bd8483ea3241656714.asciidoc b/docs/examples/guide/7b9dfe5857bde1bd8483ea3241656714.asciidoc deleted file mode 100644 index c8c660b0fb..0000000000 --- a/docs/examples/guide/7b9dfe5857bde1bd8483ea3241656714.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/7c24d4bef3f2045407fbf1b95c5416f9.asciidoc b/docs/examples/guide/7c24d4bef3f2045407fbf1b95c5416f9.asciidoc deleted file mode 100644 index 2a310948d6..0000000000 --- a/docs/examples/guide/7c24d4bef3f2045407fbf1b95c5416f9.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'range_index', - body: { - settings: { - number_of_shards: 2 - }, - mappings: { - properties: { - expected_attendees: { - type: 'integer_range' - }, - time_frame: { - type: 'date_range', - format: 'yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis' - } - } - } - } -) -puts response - -response = client.index( - index: 'range_index', - id: 1, - refresh: true, - body: { - expected_attendees: { - gte: 10, - lt: 20 - }, - time_frame: { - gte: '2015-10-31 12:00:00', - lte: '2015-11-01' - } - } -) -puts response ----- diff --git a/docs/examples/guide/7c3414279d47e9c29105d061ed316ef8.asciidoc b/docs/examples/guide/7c3414279d47e9c29105d061ed316ef8.asciidoc deleted file mode 100644 index ccdf650736..0000000000 --- a/docs/examples/guide/7c3414279d47e9c29105d061ed316ef8.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'music', - id: 1, - refresh: true, - body: { - suggest: [ - 'Nevermind', - 'Nirvana' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/7c4551abbb7a5f3841109f7664bc4aad.asciidoc b/docs/examples/guide/7c4551abbb7a5f3841109f7664bc4aad.asciidoc deleted file mode 100644 index f0a21358b9..0000000000 --- a/docs/examples/guide/7c4551abbb7a5f3841109f7664bc4aad.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - camel: { - type: 'pattern', - pattern: '([^\\p{L}\\d]+)|(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)|(?<=[\\p{L}&&[^\\p{Lu}]])(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}[\\p{L}&&[^\\p{Lu}]])' - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'camel', - text: 'MooseX::FTPClass2_beta' - } -) -puts response ----- diff --git a/docs/examples/guide/7c5aed55a2a1dce4b63c18e1ce8146ff.asciidoc b/docs/examples/guide/7c5aed55a2a1dce4b63c18e1ce8146ff.asciidoc deleted file mode 100644 index a13e819343..0000000000 --- a/docs/examples/guide/7c5aed55a2a1dce4b63c18e1ce8146ff.asciidoc +++ /dev/null @@ -1,108 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'network-traffic', - body: { - mappings: { - properties: { - "ipv4": { - type: 'ip' - }, - "ipv6": { - type: 'ip' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'network-traffic', - refresh: true, - body: [ - { - index: { - _id: 0 - } - }, - { - "ipv4": '192.168.1.10', - "ipv6": '2001:db8:a4f8:112a:6001:0:12:7f10' - }, - { - index: { - _id: 1 - } - }, - { - "ipv4": '192.168.1.12', - "ipv6": '2001:db8:a4f8:112a:6001:0:12:7f12' - }, - { - index: { - _id: 2 - } - }, - { - "ipv4": '192.168.1.33', - "ipv6": '2001:db8:a4f8:112a:6001:0:12:7f33' - }, - { - index: { - _id: 3 - } - }, - { - "ipv4": '192.168.1.10', - "ipv6": '2001:db8:a4f8:112a:6001:0:12:7f10' - }, - { - index: { - _id: 4 - } - }, - { - "ipv4": '192.168.2.41', - "ipv6": '2001:db8:a4f8:112c:6001:0:12:7f41' - }, - { - index: { - _id: 5 - } - }, - { - "ipv4": '192.168.2.10', - "ipv6": '2001:db8:a4f8:112c:6001:0:12:7f10' - }, - { - index: { - _id: 6 - } - }, - { - "ipv4": '192.168.2.23', - "ipv6": '2001:db8:a4f8:112c:6001:0:12:7f23' - }, - { - index: { - _id: 7 - } - }, - { - "ipv4": '192.168.3.201', - "ipv6": '2001:db8:a4f8:114f:6001:0:12:7201' - }, - { - index: { - _id: 8 - } - }, - { - "ipv4": '192.168.3.107', - "ipv6": '2001:db8:a4f8:114f:6001:0:12:7307' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/7c5e41a7c0075d87b8f8348a6efa990c.asciidoc b/docs/examples/guide/7c5e41a7c0075d87b8f8348a6efa990c.asciidoc deleted file mode 100644 index e97785fb7a..0000000000 --- a/docs/examples/guide/7c5e41a7c0075d87b8f8348a6efa990c.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.ccr.pause_follow( - index: 'follower_index' -) -puts response - -response = client.indices.close( - index: 'follower_index' -) -puts response - -response = client.ccr.follow( - index: 'follower_index', - wait_for_active_shards: 1, - body: { - remote_cluster: 'remote_cluster', - leader_index: 'leader_index' - } -) -puts response ----- diff --git a/docs/examples/guide/7c8f207e43115ea8f20d2298be5aaebc.asciidoc b/docs/examples/guide/7c8f207e43115ea8f20d2298be5aaebc.asciidoc deleted file mode 100644 index 9a73648d67..0000000000 --- a/docs/examples/guide/7c8f207e43115ea8f20d2298be5aaebc.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.simulate.ingest( - body: { - docs: [ - { - _index: 'my-index', - _id: 'id', - _source: { - foo: 'bar' - } - }, - { - _index: 'my-index', - _id: 'id', - _source: { - foo: 'rab' - } - } - ], - pipeline_substitutions: { - "my-pipeline": { - processors: [ - { - set: { - field: 'field3', - value: 'value3' - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7ca224d1a7de20a15c008e1b9dbda377.asciidoc b/docs/examples/guide/7ca224d1a7de20a15c008e1b9dbda377.asciidoc deleted file mode 100644 index 8784c2df6f..0000000000 --- a/docs/examples/guide/7ca224d1a7de20a15c008e1b9dbda377.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - tags: { - terms: { - field: 'tags', - missing: 'N/A' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7cd23457e220c8b64c5b0041d2acc27a.asciidoc b/docs/examples/guide/7cd23457e220c8b64c5b0041d2acc27a.asciidoc deleted file mode 100644 index 57c84aabc9..0000000000 --- a/docs/examples/guide/7cd23457e220c8b64c5b0041d2acc27a.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.nodes.info( - node_id: '_all', - metric: 'jvm' -) -puts response ----- diff --git a/docs/examples/guide/7cd3d8388c51a9f6ee3f730cdaddbb89.asciidoc b/docs/examples/guide/7cd3d8388c51a9f6ee3f730cdaddbb89.asciidoc deleted file mode 100644 index 06e747d416..0000000000 --- a/docs/examples/guide/7cd3d8388c51a9f6ee3f730cdaddbb89.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - index: { - refresh_interval: nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/7d1cbcb545aa19260073dbb2b7ef5074.asciidoc b/docs/examples/guide/7d1cbcb545aa19260073dbb2b7ef5074.asciidoc deleted file mode 100644 index 1a53efbd7f..0000000000 --- a/docs/examples/guide/7d1cbcb545aa19260073dbb2b7ef5074.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - size: 2, - sources: [ - { - date: { - date_histogram: { - field: 'timestamp', - calendar_interval: '1d' - } - } - }, - { - product: { - terms: { - field: 'product' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7d9eba51a269571ae62fb8b442b373ce.asciidoc b/docs/examples/guide/7d9eba51a269571ae62fb8b442b373ce.asciidoc deleted file mode 100644 index 243599e85e..0000000000 --- a/docs/examples/guide/7d9eba51a269571ae62fb8b442b373ce.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'custom_stems', - 'porter_stem' - ] - } - }, - filter: { - custom_stems: { - type: 'stemmer_override', - rules_path: 'analysis/stemmer_override.txt' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7dabae9b37d2cbd724f2a069be9e753b.asciidoc b/docs/examples/guide/7dabae9b37d2cbd724f2a069be9e753b.asciidoc deleted file mode 100644 index 38a8c75ee0..0000000000 --- a/docs/examples/guide/7dabae9b37d2cbd724f2a069be9e753b.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ml.reset_job( - job_id: 'total-requests', - wait_for_completion: false -) -puts response ----- diff --git a/docs/examples/guide/7dc6c0a6386289ac6a34105e839ced55.asciidoc b/docs/examples/guide/7dc6c0a6386289ac6a34105e839ced55.asciidoc deleted file mode 100644 index 4777646acb..0000000000 --- a/docs/examples/guide/7dc6c0a6386289ac6a34105e839ced55.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - by_date: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - my_rate: { - rate: { - unit: 'year' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7dc82f7d36686fd57a47e34cbda39a4e.asciidoc b/docs/examples/guide/7dc82f7d36686fd57a47e34cbda39a4e.asciidoc deleted file mode 100644 index d91fa32c9f..0000000000 --- a/docs/examples/guide/7dc82f7d36686fd57a47e34cbda39a4e.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'delimited_payload' - ], - text: 'the|0 brown|10 fox|5 is|0 quick|10' - } -) -puts response ----- diff --git a/docs/examples/guide/7dd481337e40f16185f3baa3fc2cce15.asciidoc b/docs/examples/guide/7dd481337e40f16185f3baa3fc2cce15.asciidoc deleted file mode 100644 index 18fdf2e1ba..0000000000 --- a/docs/examples/guide/7dd481337e40f16185f3baa3fc2cce15.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - terms: { - _routing: [ - 'user1' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7dedb148ff74912de81b8f8275f0d7f3.asciidoc b/docs/examples/guide/7dedb148ff74912de81b8f8275f0d7f3.asciidoc deleted file mode 100644 index b0b7c16f35..0000000000 --- a/docs/examples/guide/7dedb148ff74912de81b8f8275f0d7f3.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'index', - body: { - aggregations: { - price_ranges: { - terms: { - field: 'price_range' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7df191cc7f814e410a4ac7261065e6ef.asciidoc b/docs/examples/guide/7df191cc7f814e410a4ac7261065e6ef.asciidoc deleted file mode 100644 index c91a193ea8..0000000000 --- a/docs/examples/guide/7df191cc7f814e410a4ac7261065e6ef.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.tasks.list( - detailed: true, - actions: '*byquery' -) -puts response ----- diff --git a/docs/examples/guide/7e126e2751311db60cfcbb22c9c41caa.asciidoc b/docs/examples/guide/7e126e2751311db60cfcbb22c9c41caa.asciidoc deleted file mode 100644 index 89565f6b19..0000000000 --- a/docs/examples/guide/7e126e2751311db60cfcbb22c9c41caa.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.cat.shards -puts response ----- diff --git a/docs/examples/guide/7e16d21cba51eb8960835b63a1a7266a.asciidoc b/docs/examples/guide/7e16d21cba51eb8960835b63a1a7266a.asciidoc deleted file mode 100644 index 9ffc73a521..0000000000 --- a/docs/examples/guide/7e16d21cba51eb8960835b63a1a7266a.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_date_formats: [ - 'MM/dd/yyyy' - ] - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - create_date: '09/25/2015' - } -) -puts response ----- diff --git a/docs/examples/guide/7e20b6e15e409b02a5e452ceddf1e1e0.asciidoc b/docs/examples/guide/7e20b6e15e409b02a5e452ceddf1e1e0.asciidoc deleted file mode 100644 index 0c3fb527fb..0000000000 --- a/docs/examples/guide/7e20b6e15e409b02a5e452ceddf1e1e0.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - date: { - date_histogram: { - field: 'timestamp', - calendar_interval: '1d', - order: 'desc' - } - } - }, - { - product: { - terms: { - field: 'product', - order: 'asc' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7e484b8b41f9dbc2bcf1f340db197c1d.asciidoc b/docs/examples/guide/7e484b8b41f9dbc2bcf1f340db197c1d.asciidoc deleted file mode 100644 index 966f5db555..0000000000 --- a/docs/examples/guide/7e484b8b41f9dbc2bcf1f340db197c1d.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'my-index-000001' - }, - dest: { - index: 'my-new-index-000001' - } - } -) -puts response ----- diff --git a/docs/examples/guide/7e48648ca27024831c60b455e836c496.asciidoc b/docs/examples/guide/7e48648ca27024831c60b455e836c496.asciidoc deleted file mode 100644 index 86a64fc64d..0000000000 --- a/docs/examples/guide/7e48648ca27024831c60b455e836c496.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - pinned: { - docs: [ - { - _index: 'my-index-000001', - _id: '1' - }, - { - _id: '4' - } - ], - organic: { - match: { - description: 'iphone' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7e49705769c42895fb7b1e2ca028ff47.asciidoc b/docs/examples/guide/7e49705769c42895fb7b1e2ca028ff47.asciidoc deleted file mode 100644 index 98684d3b58..0000000000 --- a/docs/examples/guide/7e49705769c42895fb7b1e2ca028ff47.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodes -puts response ----- diff --git a/docs/examples/guide/7e4cb3de3e3c75646b60f9f81ddc59cc.asciidoc b/docs/examples/guide/7e4cb3de3e3c75646b60f9f81ddc59cc.asciidoc deleted file mode 100644 index b22ae79a90..0000000000 --- a/docs/examples/guide/7e4cb3de3e3c75646b60f9f81ddc59cc.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.clear_trained_model_deployment_cache( - model_id: 'elastic__distilbert-base-uncased-finetuned-conll03-english' -) -puts response ----- diff --git a/docs/examples/guide/7ebeb6cf26be5b5ecdfd408bd0fc3215.asciidoc b/docs/examples/guide/7ebeb6cf26be5b5ecdfd408bd0fc3215.asciidoc deleted file mode 100644 index 7902db1adf..0000000000 --- a/docs/examples/guide/7ebeb6cf26be5b5ecdfd408bd0fc3215.asciidoc +++ /dev/null @@ -1,63 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-knn-index', - body: { - mappings: { - properties: { - "my-vector": { - type: 'dense_vector', - dims: 3, - index: true, - similarity: 'l2_norm' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'my-knn-index', - refresh: true, - body: [ - { - index: { - _id: '1' - } - }, - { - "my-vector": [ - 1, - 5, - -20 - ] - }, - { - index: { - _id: '2' - } - }, - { - "my-vector": [ - 42, - 8, - -15 - ] - }, - { - index: { - _id: '3' - } - }, - { - "my-vector": [ - 15, - 11, - 23 - ] - } - ] -) -puts response ----- diff --git a/docs/examples/guide/7ed26b34ce90192a1563dcddf0e45dc0.asciidoc b/docs/examples/guide/7ed26b34ce90192a1563dcddf0e45dc0.asciidoc deleted file mode 100644 index 508468a781..0000000000 --- a/docs/examples/guide/7ed26b34ce90192a1563dcddf0e45dc0.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - }, - sales_deriv: { - derivative: { - buckets_path: 'sales' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7f514e9e785e4323d16396359cb184f2.asciidoc b/docs/examples/guide/7f514e9e785e4323d16396359cb184f2.asciidoc deleted file mode 100644 index 6956ba73a0..0000000000 --- a/docs/examples/guide/7f514e9e785e4323d16396359cb184f2.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'range_index', - body: { - properties: { - ip_allowlist: { - type: 'ip_range' - } - } - } -) -puts response - -response = client.index( - index: 'range_index', - id: 2, - body: { - ip_allowlist: '192.168.0.0/16' - } -) -puts response ----- diff --git a/docs/examples/guide/7f56755fb6c42f7e6203339a6d0cb6e6.asciidoc b/docs/examples/guide/7f56755fb6c42f7e6203339a6d0cb6e6.asciidoc deleted file mode 100644 index 534fb28f5a..0000000000 --- a/docs/examples/guide/7f56755fb6c42f7e6203339a6d0cb6e6.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - message: { - query: 'ny city', - auto_generate_synonyms_phrase_query: false - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7fb921376cbf66bf9f381bcdd62030ba.asciidoc b/docs/examples/guide/7fb921376cbf66bf9f381bcdd62030ba.asciidoc deleted file mode 100644 index 265c30d0f0..0000000000 --- a/docs/examples/guide/7fb921376cbf66bf9f381bcdd62030ba.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.get_script_context -puts response ----- diff --git a/docs/examples/guide/7fd2532f4e12e3efbc58af195060b31e.asciidoc b/docs/examples/guide/7fd2532f4e12e3efbc58af195060b31e.asciidoc deleted file mode 100644 index 61a0e88e13..0000000000 --- a/docs/examples/guide/7fd2532f4e12e3efbc58af195060b31e.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - text: 'The fooBarBaz method' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - text: 'bar' - } - }, - highlight: { - fields: { - text: {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7fd5883564d183603e60b37d286ac7e2.asciidoc b/docs/examples/guide/7fd5883564d183603e60b37d286ac7e2.asciidoc deleted file mode 100644 index 0830fdcd6c..0000000000 --- a/docs/examples/guide/7fd5883564d183603e60b37d286ac7e2.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_expired_data( - timeout: '1h' -) -puts response ----- diff --git a/docs/examples/guide/7fe2179705304af5e87eb382dca6235a.asciidoc b/docs/examples/guide/7fe2179705304af5e87eb382dca6235a.asciidoc deleted file mode 100644 index ae2f59cb15..0000000000 --- a/docs/examples/guide/7fe2179705304af5e87eb382dca6235a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.open( - index: 'logs-my_app-default' -) -puts response ----- diff --git a/docs/examples/guide/7fe9f0a583e079f7fc6fd64d12b6e9e5.asciidoc b/docs/examples/guide/7fe9f0a583e079f7fc6fd64d12b6e9e5.asciidoc deleted file mode 100644 index 22721e0621..0000000000 --- a/docs/examples/guide/7fe9f0a583e079f7fc6fd64d12b6e9e5.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - runtime_mappings: { - 'price.weighted' => { - type: 'double', - script: "\n double price = doc['price'].value;\n if (doc['promoted'].value) {\n price *= 0.8;\n }\n emit(price);\n " - } - }, - query: { - constant_score: { - filter: { - match: { - type: 'hat' - } - } - } - }, - aggregations: { - hat_prices: { - sum: { - field: 'price.weighted' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/7fef68840761c6982c14ad7af96caf37.asciidoc b/docs/examples/guide/7fef68840761c6982c14ad7af96caf37.asciidoc deleted file mode 100644 index 44a0d48f7e..0000000000 --- a/docs/examples/guide/7fef68840761c6982c14ad7af96caf37.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - group: 'fans', - user: [ - { - first: 'John', - last: 'Smith' - }, - { - first: 'Alice', - last: 'White' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/7ff4124df0541ee2496034004f4146d4.asciidoc b/docs/examples/guide/7ff4124df0541ee2496034004f4146d4.asciidoc deleted file mode 100644 index 0c4c289faf..0000000000 --- a/docs/examples/guide/7ff4124df0541ee2496034004f4146d4.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - properties: { - tags: { - type: 'keyword', - eager_global_ordinals: false - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/800861c15bb33ca01a46fb97dde7537a.asciidoc b/docs/examples/guide/800861c15bb33ca01a46fb97dde7537a.asciidoc deleted file mode 100644 index dcec79c710..0000000000 --- a/docs/examples/guide/800861c15bb33ca01a46fb97dde7537a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_filters( - filter_id: 'safe_domains' -) -puts response ----- diff --git a/docs/examples/guide/803bbc14fbec0e49dfed9fab49c8a7f8.asciidoc b/docs/examples/guide/803bbc14fbec0e49dfed9fab49c8a7f8.asciidoc deleted file mode 100644 index 95befd7d96..0000000000 --- a/docs/examples/guide/803bbc14fbec0e49dfed9fab49c8a7f8.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - full_text: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/805f5550b90e75aa5cc82b90d8c6c242.asciidoc b/docs/examples/guide/805f5550b90e75aa5cc82b90d8c6c242.asciidoc deleted file mode 100644 index 70dc7d7419..0000000000 --- a/docs/examples/guide/805f5550b90e75aa5cc82b90d8c6c242.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'news', - body: { - query: { - match: { - content: 'elasticsearch' - } - }, - aggregations: { - sample: { - sampler: { - shard_size: 100 - }, - aggregations: { - keywords: { - significant_text: { - field: 'content', - filter_duplicate_text: true - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/807c0c9763f8c1114b3c8278c2a0cb56.asciidoc b/docs/examples/guide/807c0c9763f8c1114b3c8278c2a0cb56.asciidoc deleted file mode 100644 index fea7acb5e4..0000000000 --- a/docs/examples/guide/807c0c9763f8c1114b3c8278c2a0cb56.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - intervals: { - my_text: { - all_of: { - ordered: true, - intervals: [ - { - match: { - query: 'my favorite food', - max_gaps: 0, - ordered: true - } - }, - { - any_of: { - intervals: [ - { - match: { - query: 'hot water' - } - }, - { - match: { - query: 'cold porridge' - } - } - ] - } - } - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/808f4db1e2361be77dd6816c1f818139.asciidoc b/docs/examples/guide/808f4db1e2361be77dd6816c1f818139.asciidoc deleted file mode 100644 index 7bc678e4a4..0000000000 --- a/docs/examples/guide/808f4db1e2361be77dd6816c1f818139.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.shard_stores( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/80dbaf28d1976dc00de3fe2018067e81.asciidoc b/docs/examples/guide/80dbaf28d1976dc00de3fe2018067e81.asciidoc deleted file mode 100644 index 02da63e852..0000000000 --- a/docs/examples/guide/80dbaf28d1976dc00de3fe2018067e81.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete_template( - name: '.cloud-hot-warm-allocation-0' -) -puts response ----- diff --git a/docs/examples/guide/80edd2124a822d9f9bf22ecc49d2c2e9.asciidoc b/docs/examples/guide/80edd2124a822d9f9bf22ecc49d2c2e9.asciidoc deleted file mode 100644 index a7f8eeaa34..0000000000 --- a/docs/examples/guide/80edd2124a822d9f9bf22ecc49d2c2e9.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.synonyms.get_synonym_rule( - set_id: 'my-synonyms-set', - rule_id: 'test-1' -) -puts response ----- diff --git a/docs/examples/guide/812a3d7ab461d74efd9136aaf4bcf11c.asciidoc b/docs/examples/guide/812a3d7ab461d74efd9136aaf4bcf11c.asciidoc deleted file mode 100644 index 2ce40ced0b..0000000000 --- a/docs/examples/guide/812a3d7ab461d74efd9136aaf4bcf11c.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'range_index', - size: 0, - body: { - aggregations: { - range_histo: { - histogram: { - field: 'expected_attendees', - interval: 5 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/812deb6b7668c7444f3b99d843d2adc1.asciidoc b/docs/examples/guide/812deb6b7668c7444f3b99d843d2adc1.asciidoc deleted file mode 100644 index b544fef72d..0000000000 --- a/docs/examples/guide/812deb6b7668c7444f3b99d843d2adc1.asciidoc +++ /dev/null @@ -1,55 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'shapes', - body: { - mappings: { - properties: { - geometry: { - type: 'shape' - } - } - } - } -) -puts response - -response = client.index( - index: 'shapes', - id: 'footprint', - body: { - geometry: { - type: 'envelope', - coordinates: [ - [ - 1355, - 5355 - ], - [ - 1400, - 5200 - ] - ] - } - } -) -puts response - -response = client.search( - index: 'example', - body: { - query: { - shape: { - geometry: { - indexed_shape: { - index: 'shapes', - id: 'footprint', - path: 'geometry' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8141b60ad245ece2ff5e8d0817400ee5.asciidoc b/docs/examples/guide/8141b60ad245ece2ff5e8d0817400ee5.asciidoc deleted file mode 100644 index 7676789e5f..0000000000 --- a/docs/examples/guide/8141b60ad245ece2ff5e8d0817400ee5.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.eql.search( - index: 'my-data-stream', - body: { - query: "\n sequence by process.pid\n [ file where file.name == \"cmd.exe\" and process.pid != 2013 ]\n [ process where stringContains(process.executable, \"regsvr32\") ]\n " - } -) -puts response ----- diff --git a/docs/examples/guide/8141cdaddbe7d794f09f9ee84e46194c.asciidoc b/docs/examples/guide/8141cdaddbe7d794f09f9ee84e46194c.asciidoc deleted file mode 100644 index e9fb64b457..0000000000 --- a/docs/examples/guide/8141cdaddbe7d794f09f9ee84e46194c.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.count( - index: 'my-index-000001', - v: true -) -puts response ----- diff --git a/docs/examples/guide/81612c2537386e031b7eb604f6756a71.asciidoc b/docs/examples/guide/81612c2537386e031b7eb604f6756a71.asciidoc deleted file mode 100644 index 4db274b124..0000000000 --- a/docs/examples/guide/81612c2537386e031b7eb604f6756a71.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.clone( - index: 'my_source_index', - target: 'my_target_index', - body: { - settings: { - 'index.number_of_shards' => 5 - }, - aliases: { - my_search_indices: {} - } - } -) -puts response ----- diff --git a/docs/examples/guide/8194f1fae6aa72ab91ea559daad932d4.asciidoc b/docs/examples/guide/8194f1fae6aa72ab91ea559daad932d4.asciidoc deleted file mode 100644 index 7b23195fec..0000000000 --- a/docs/examples/guide/8194f1fae6aa72ab91ea559daad932d4.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - max_concurrent_shard_requests: 3, - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/819e00cc6547d925d80090b94e0650d7.asciidoc b/docs/examples/guide/819e00cc6547d925d80090b94e0650d7.asciidoc deleted file mode 100644 index 85d352a923..0000000000 --- a/docs/examples/guide/819e00cc6547d925d80090b94e0650d7.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001,cluster_one:my-index-000001,cluster_two:my-index-000001', - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - _source: [ - 'user.id', - 'message', - 'http.response.status_code' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/81c7a392efd505b686eed978fb7d9d17.asciidoc b/docs/examples/guide/81c7a392efd505b686eed978fb7d9d17.asciidoc deleted file mode 100644 index 08240111fd..0000000000 --- a/docs/examples/guide/81c7a392efd505b686eed978fb7d9d17.asciidoc +++ /dev/null @@ -1,45 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'english_example', - body: { - settings: { - analysis: { - filter: { - english_stop: { - type: 'stop', - stopwords: '_english_' - }, - english_keywords: { - type: 'keyword_marker', - keywords: [ - 'example' - ] - }, - english_stemmer: { - type: 'stemmer', - language: 'english' - }, - english_possessive_stemmer: { - type: 'stemmer', - language: 'possessive_english' - } - }, - analyzer: { - rebuilt_english: { - tokenizer: 'standard', - filter: [ - 'english_possessive_stemmer', - 'lowercase', - 'english_stop', - 'english_keywords', - 'english_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/81ef5774355180fc44d2a52b5182d24a.asciidoc b/docs/examples/guide/81ef5774355180fc44d2a52b5182d24a.asciidoc deleted file mode 100644 index b25fc6a360..0000000000 --- a/docs/examples/guide/81ef5774355180fc44d2a52b5182d24a.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - size: 0, - body: { - aggregations: { - message_stats: { - string_stats: { - field: 'message.keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/81f1b1e1d5c81683b6bf471c469e6046.asciidoc b/docs/examples/guide/81f1b1e1d5c81683b6bf471c469e6046.asciidoc deleted file mode 100644 index d2e2d68a58..0000000000 --- a/docs/examples/guide/81f1b1e1d5c81683b6bf471c469e6046.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'shirts', - body: { - query: { - bool: { - filter: [ - { - term: { - color: 'red' - } - }, - { - term: { - brand: 'gucci' - } - } - ] - } - }, - aggregations: { - models: { - terms: { - field: 'model' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8206a7cc615ad93fec322513b8fdd4fd.asciidoc b/docs/examples/guide/8206a7cc615ad93fec322513b8fdd4fd.asciidoc deleted file mode 100644 index 20cd926790..0000000000 --- a/docs/examples/guide/8206a7cc615ad93fec322513b8fdd4fd.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'job-candidates', - id: 2, - refresh: true, - body: { - name: 'Jason Response', - programming_languages: [ - 'java', - 'php' - ], - required_matches: 2 - } -) -puts response ----- diff --git a/docs/examples/guide/820f689eaaef15fc07abd1073fa880f8.asciidoc b/docs/examples/guide/820f689eaaef15fc07abd1073fa880f8.asciidoc deleted file mode 100644 index 3a68cccb2f..0000000000 --- a/docs/examples/guide/820f689eaaef15fc07abd1073fa880f8.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - from: 5, - size: 20, - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/821422f8a03dc98d024a15fc737fe9eb.asciidoc b/docs/examples/guide/821422f8a03dc98d024a15fc737fe9eb.asciidoc deleted file mode 100644 index dd55beb529..0000000000 --- a/docs/examples/guide/821422f8a03dc98d024a15fc737fe9eb.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_trained_model_alias( - model_id: 'flight-delay-prediction-1574775339910', - model_alias: 'flight_delay_model' -) -puts response ----- diff --git a/docs/examples/guide/821ac598f5f4a795a13f8dd0c0c4d8d6.asciidoc b/docs/examples/guide/821ac598f5f4a795a13f8dd0c0c4d8d6.asciidoc deleted file mode 100644 index 32425bdd26..0000000000 --- a/docs/examples/guide/821ac598f5f4a795a13f8dd0c0c4d8d6.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.create_data_stream( - name: 'metrics-weather_sensors-dev' -) -puts response ----- diff --git a/docs/examples/guide/827b7e9308ea288f18aea00a5accc38e.asciidoc b/docs/examples/guide/827b7e9308ea288f18aea00a5accc38e.asciidoc deleted file mode 100644 index e36813519d..0000000000 --- a/docs/examples/guide/827b7e9308ea288f18aea00a5accc38e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_component_template( - name: 'template_1' -) -puts response ----- diff --git a/docs/examples/guide/829a40d484c778a8c58340c7bf09e1d8.asciidoc b/docs/examples/guide/829a40d484c778a8c58340c7bf09e1d8.asciidoc deleted file mode 100644 index b8bfbf3157..0000000000 --- a/docs/examples/guide/829a40d484c778a8c58340c7bf09e1d8.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - message: { - operator: 'or', - query: 'the quick brown' - } - } - }, - rescore: { - window_size: 50, - query: { - rescore_query: { - match_phrase: { - message: { - query: 'the quick brown', - slop: 2 - } - } - }, - query_weight: 0.7, - rescore_query_weight: 1.2 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/82e94b6cdf65e324575f916b3776b779.asciidoc b/docs/examples/guide/82e94b6cdf65e324575f916b3776b779.asciidoc deleted file mode 100644 index 3018b64ee8..0000000000 --- a/docs/examples/guide/82e94b6cdf65e324575f916b3776b779.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_templates: [ - { - strings_as_keywords: { - match_mapping_type: 'string', - runtime: {} - } - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/831f65d700577e11112c711236110f61.asciidoc b/docs/examples/guide/831f65d700577e11112c711236110f61.asciidoc deleted file mode 100644 index e95f002be5..0000000000 --- a/docs/examples/guide/831f65d700577e11112c711236110f61.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_email_analyzer: { - type: 'pattern', - pattern: '\\W|_', - lowercase: true - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_email_analyzer', - text: 'John_Smith@foo-bar.com' - } -) -puts response ----- diff --git a/docs/examples/guide/8330b2ea6317769e52d0647ba434b354.asciidoc b/docs/examples/guide/8330b2ea6317769e52d0647ba434b354.asciidoc deleted file mode 100644 index 3ebe8dbfa0..0000000000 --- a/docs/examples/guide/8330b2ea6317769e52d0647ba434b354.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.mget( - routing: 'key1', - body: { - docs: [ - { - _index: 'test', - _id: '1', - routing: 'key2' - }, - { - _index: 'test', - _id: '2' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/834764b2fba6cbb41eaabd740be75656.asciidoc b/docs/examples/guide/834764b2fba6cbb41eaabd740be75656.asciidoc deleted file mode 100644 index 1b26080507..0000000000 --- a/docs/examples/guide/834764b2fba6cbb41eaabd740be75656.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_custom_analyzer: { - tokenizer: 'standard', - filter: [ - 'keyword_repeat', - 'porter_stem', - 'remove_duplicates' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8357aa6099089940589ae3e97e7bcffa.asciidoc b/docs/examples/guide/8357aa6099089940589ae3e97e7bcffa.asciidoc deleted file mode 100644 index 85688b506b..0000000000 --- a/docs/examples/guide/8357aa6099089940589ae3e97e7bcffa.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_data_stream -puts response ----- diff --git a/docs/examples/guide/83780c8f5f17eb21064c1ba6e0a7aa10.asciidoc b/docs/examples/guide/83780c8f5f17eb21064c1ba6e0a7aa10.asciidoc deleted file mode 100644 index 2f3c66db97..0000000000 --- a/docs/examples/guide/83780c8f5f17eb21064c1ba6e0a7aa10.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - wrapper: { - query: 'eyJ0ZXJtIiA6IHsgInVzZXIuaWQiIDogImtpbWNoeSIgfX0=' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/839a4b2930856790e34cc9dfeb983284.asciidoc b/docs/examples/guide/839a4b2930856790e34cc9dfeb983284.asciidoc deleted file mode 100644 index 3a36fec193..0000000000 --- a/docs/examples/guide/839a4b2930856790e34cc9dfeb983284.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - warm: { - actions: { - downsample: { - fixed_interval: '1h' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/83b94f9e7b3a9abca8e165ea56927714.asciidoc b/docs/examples/guide/83b94f9e7b3a9abca8e165ea56927714.asciidoc deleted file mode 100644 index 8ef2723cd0..0000000000 --- a/docs/examples/guide/83b94f9e7b3a9abca8e165ea56927714.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: '', - body: { - aliases: { - "my-write-alias": {} - } - } -) -puts response ----- diff --git a/docs/examples/guide/83cd4eb89818b4c32f654d370eafa920.asciidoc b/docs/examples/guide/83cd4eb89818b4c32f654d370eafa920.asciidoc deleted file mode 100644 index 00ce48ae3e..0000000000 --- a/docs/examples/guide/83cd4eb89818b4c32f654d370eafa920.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - { - type: 'keep_types', - types: [ - '' - ] - } - ], - text: '1 quick fox 2 lazy dogs' - } -) -puts response ----- diff --git a/docs/examples/guide/83d712b9ffb2e703212b762eba3c521a.asciidoc b/docs/examples/guide/83d712b9ffb2e703212b762eba3c521a.asciidoc deleted file mode 100644 index b9df659550..0000000000 --- a/docs/examples/guide/83d712b9ffb2e703212b762eba3c521a.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-alias', - ignore_unavailable: true -) -puts response ----- diff --git a/docs/examples/guide/83d8c920460a12f87b9d5bf65515c367.asciidoc b/docs/examples/guide/83d8c920460a12f87b9d5bf65515c367.asciidoc deleted file mode 100644 index a322975860..0000000000 --- a/docs/examples/guide/83d8c920460a12f87b9d5bf65515c367.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'date', - calendar_interval: '1M' - }, - aggregations: { - the_sum: { - sum: { - field: 'price' - } - }, - the_moving_sum: { - moving_fn: { - buckets_path: 'the_sum', - window: 10, - script: 'MovingFunctions.stdDev(values, MovingFunctions.unweightedAvg(values))' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/83dd715e45a5da097123c6d10f22f8f4.asciidoc b/docs/examples/guide/83dd715e45a5da097123c6d10f22f8f4.asciidoc deleted file mode 100644 index 3b097cd55c..0000000000 --- a/docs/examples/guide/83dd715e45a5da097123c6d10f22f8f4.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - span_containing: { - little: { - span_term: { - "field1": 'foo' - } - }, - big: { - span_near: { - clauses: [ - { - span_term: { - "field1": 'bar' - } - }, - { - span_term: { - "field1": 'baz' - } - } - ], - slop: 5, - in_order: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/83dfd0852101eca3ba8174c9c38b4e73.asciidoc b/docs/examples/guide/83dfd0852101eca3ba8174c9c38b4e73.asciidoc deleted file mode 100644 index e4e58da9d2..0000000000 --- a/docs/examples/guide/83dfd0852101eca3ba8174c9c38b4e73.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_template( - name: '.monitoring-*' -) -puts response ----- diff --git a/docs/examples/guide/840b6c5c3d9c56aed854cfab8da04486.asciidoc b/docs/examples/guide/840b6c5c3d9c56aed854cfab8da04486.asciidoc deleted file mode 100644 index 57eaacf967..0000000000 --- a/docs/examples/guide/840b6c5c3d9c56aed854cfab8da04486.asciidoc +++ /dev/null @@ -1,94 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'file-path-test', - body: { - settings: { - analysis: { - analyzer: { - custom_path_tree: { - tokenizer: 'custom_hierarchy' - }, - custom_path_tree_reversed: { - tokenizer: 'custom_hierarchy_reversed' - } - }, - tokenizer: { - custom_hierarchy: { - type: 'path_hierarchy', - delimiter: '/' - }, - custom_hierarchy_reversed: { - type: 'path_hierarchy', - delimiter: '/', - reverse: 'true' - } - } - } - }, - mappings: { - properties: { - file_path: { - type: 'text', - fields: { - tree: { - type: 'text', - analyzer: 'custom_path_tree' - }, - tree_reversed: { - type: 'text', - analyzer: 'custom_path_tree_reversed' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'file-path-test', - id: 1, - body: { - file_path: '/User/alice/photos/2017/05/16/my_photo1.jpg' - } -) -puts response - -response = client.index( - index: 'file-path-test', - id: 2, - body: { - file_path: '/User/alice/photos/2017/05/16/my_photo2.jpg' - } -) -puts response - -response = client.index( - index: 'file-path-test', - id: 3, - body: { - file_path: '/User/alice/photos/2017/05/16/my_photo3.jpg' - } -) -puts response - -response = client.index( - index: 'file-path-test', - id: 4, - body: { - file_path: '/User/alice/photos/2017/05/15/my_photo1.jpg' - } -) -puts response - -response = client.index( - index: 'file-path-test', - id: 5, - body: { - file_path: '/User/bob/photos/2017/05/16/my_photo1.jpg' - } -) -puts response ----- diff --git a/docs/examples/guide/84108653e9e03b4edacd878ec870df77.asciidoc b/docs/examples/guide/84108653e9e03b4edacd878ec870df77.asciidoc deleted file mode 100644 index ac01598bac..0000000000 --- a/docs/examples/guide/84108653e9e03b4edacd878ec870df77.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'hungarian_example', - body: { - settings: { - analysis: { - filter: { - hungarian_stop: { - type: 'stop', - stopwords: '_hungarian_' - }, - hungarian_keywords: { - type: 'keyword_marker', - keywords: [ - 'példa' - ] - }, - hungarian_stemmer: { - type: 'stemmer', - language: 'hungarian' - } - }, - analyzer: { - rebuilt_hungarian: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'hungarian_stop', - 'hungarian_keywords', - 'hungarian_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/841ad0a70f4271f61f0bac0b467b59c5.asciidoc b/docs/examples/guide/841ad0a70f4271f61f0bac0b467b59c5.asciidoc deleted file mode 100644 index d6ffb56ae9..0000000000 --- a/docs/examples/guide/841ad0a70f4271f61f0bac0b467b59c5.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.mtermvectors( - index: 'my-index-000001', - body: { - docs: [ - { - _id: '2', - fields: [ - 'message' - ], - term_statistics: true - }, - { - _id: '1' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/841d8b766902c8e3ae85c228a31383ac.asciidoc b/docs/examples/guide/841d8b766902c8e3ae85c228a31383ac.asciidoc deleted file mode 100644 index 6196c03368..0000000000 --- a/docs/examples/guide/841d8b766902c8e3ae85c228a31383ac.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.sql.get_async_status( - id: 'FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=', - format: 'json' -) -puts response ----- diff --git a/docs/examples/guide/84243213614fe64930b1d430704afb29.asciidoc b/docs/examples/guide/84243213614fe64930b1d430704afb29.asciidoc deleted file mode 100644 index 5ed8df98ef..0000000000 --- a/docs/examples/guide/84243213614fe64930b1d430704afb29.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - runtime: { - voltage_corrected: { - type: 'double', - script: { - source: "\n emit(doc['voltage'].value * params['multiplier'])\n ", - params: { - multiplier: 2 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/84465de841fe5c6099a0382f786f2cb8.asciidoc b/docs/examples/guide/84465de841fe5c6099a0382f786f2cb8.asciidoc deleted file mode 100644 index 882ccfb10b..0000000000 --- a/docs/examples/guide/84465de841fe5c6099a0382f786f2cb8.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.update_aliases( - body: { - actions: [ - { - remove: { - index: 'logs-nginx.access-prod', - alias: 'logs' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/84490ee2c6c07dbd2101ce2e3751e1aa.asciidoc b/docs/examples/guide/84490ee2c6c07dbd2101ce2e3751e1aa.asciidoc deleted file mode 100644 index c3f423d9bf..0000000000 --- a/docs/examples/guide/84490ee2c6c07dbd2101ce2e3751e1aa.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - wait_for_completion: false, - body: { - source: { - index: 'test-data', - size: 50 - }, - dest: { - index: 'cohere-embeddings', - pipeline: 'cohere_embeddings' - } - } -) -puts response ----- diff --git a/docs/examples/guide/844928da2ff9a1394af5347a5e2e4f78.asciidoc b/docs/examples/guide/844928da2ff9a1394af5347a5e2e4f78.asciidoc deleted file mode 100644 index 43ed7d73c0..0000000000 --- a/docs/examples/guide/844928da2ff9a1394af5347a5e2e4f78.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - 'index.indexing.slowlog.threshold.index.warn' => '10s', - 'index.indexing.slowlog.threshold.index.info' => '5s', - 'index.indexing.slowlog.threshold.index.debug' => '2s', - 'index.indexing.slowlog.threshold.index.trace' => '500ms', - 'index.indexing.slowlog.source' => '1000' - } -) -puts response ----- diff --git a/docs/examples/guide/8494d09c39e109a012094eb9d6ec52ac.asciidoc b/docs/examples/guide/8494d09c39e109a012094eb9d6ec52ac.asciidoc deleted file mode 100644 index 0421339ff9..0000000000 --- a/docs/examples/guide/8494d09c39e109a012094eb9d6ec52ac.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'pipelineA', - body: { - description: 'inner pipeline', - processors: [ - { - set: { - field: 'inner_pipeline_set', - value: 'inner' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/84c61160ca815e29e9973ba1380219dd.asciidoc b/docs/examples/guide/84c61160ca815e29e9973ba1380219dd.asciidoc deleted file mode 100644 index 79ccbd58b7..0000000000 --- a/docs/examples/guide/84c61160ca815e29e9973ba1380219dd.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.searchable_snapshots.stats( - index: 'my-index' -) -puts response ----- diff --git a/docs/examples/guide/84c69fb07050f0e89720007a6507a221.asciidoc b/docs/examples/guide/84c69fb07050f0e89720007a6507a221.asciidoc deleted file mode 100644 index 5c5ffa4703..0000000000 --- a/docs/examples/guide/84c69fb07050f0e89720007a6507a221.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.tasks.cancel( - task_id: 'oTUltX4IQMOUUVeiohTt8A:464' -) -puts response ----- diff --git a/docs/examples/guide/84e2cf7417c9e0c9e6f3c23031001440.asciidoc b/docs/examples/guide/84e2cf7417c9e0c9e6f3c23031001440.asciidoc deleted file mode 100644 index 33feeb1ab0..0000000000 --- a/docs/examples/guide/84e2cf7417c9e0c9e6f3c23031001440.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.enrich.stats -puts response ----- diff --git a/docs/examples/guide/84edb44c5b74426f448b2baa101092d6.asciidoc b/docs/examples/guide/84edb44c5b74426f448b2baa101092d6.asciidoc deleted file mode 100644 index 11a16fe5f2..0000000000 --- a/docs/examples/guide/84edb44c5b74426f448b2baa101092d6.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'range_index', - body: { - query: { - term: { - expected_attendees: { - value: 12 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/84f3e8524f6ff80e870c03ab71551538.asciidoc b/docs/examples/guide/84f3e8524f6ff80e870c03ab71551538.asciidoc deleted file mode 100644 index 48a97dd3c2..0000000000 --- a/docs/examples/guide/84f3e8524f6ff80e870c03ab71551538.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - preference: 'my-custom-shard-string', - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/850bfd0a00d32475a54ac7f87fb4cc4d.asciidoc b/docs/examples/guide/850bfd0a00d32475a54ac7f87fb4cc4d.asciidoc deleted file mode 100644 index c1f28b57bb..0000000000 --- a/docs/examples/guide/850bfd0a00d32475a54ac7f87fb4cc4d.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - runtime_mappings: { - 'measures.voltage' => { - type: 'double', - script: { - source: "if (doc['model_number.keyword'].value.equals('HG537PU'))\n {emit(1.7 * params._source['measures']['voltage']);}\n else{emit(params._source['measures']['voltage']);}" - } - } - }, - query: { - match: { - model_number: 'HG537PU' - } - }, - fields: [ - 'measures.voltage' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/851f9754dbefc099c54c5423ca4565c0.asciidoc b/docs/examples/guide/851f9754dbefc099c54c5423ca4565c0.asciidoc deleted file mode 100644 index 1c52545b67..0000000000 --- a/docs/examples/guide/851f9754dbefc099c54c5423ca4565c0.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'network-traffic', - body: { - size: 0, - aggregations: { - "ipv6-subnets": { - ip_prefix: { - field: 'ipv6', - prefix_length: 64, - "is_ipv6": true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/852b394d78b8c79ee0055b5501981a4b.asciidoc b/docs/examples/guide/852b394d78b8c79ee0055b5501981a4b.asciidoc deleted file mode 100644 index 0228e20602..0000000000 --- a/docs/examples/guide/852b394d78b8c79ee0055b5501981a4b.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - product_name: { - terms: { - field: 'product', - missing_bucket: true, - missing_order: 'last' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/85479e02af00681210e17e3d0ff51e21.asciidoc b/docs/examples/guide/85479e02af00681210e17e3d0ff51e21.asciidoc deleted file mode 100644 index ce9b99aad0..0000000000 --- a/docs/examples/guide/85479e02af00681210e17e3d0ff51e21.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - date: { - type: 'date', - format: 'yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/85519a614ae18c998986d46bbad82b76.asciidoc b/docs/examples/guide/85519a614ae18c998986d46bbad82b76.asciidoc deleted file mode 100644 index 6a687a5c7a..0000000000 --- a/docs/examples/guide/85519a614ae18c998986d46bbad82b76.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'my_template', - body: { - index_patterns: [ - 'test-*' - ], - template: { - settings: { - number_of_shards: 1, - number_of_replicas: 1, - 'index.lifecycle.name' => 'my_policy', - 'index.lifecycle.rollover_alias' => 'test-alias' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/856c10ad554c26b70f1121454caff40a.asciidoc b/docs/examples/guide/856c10ad554c26b70f1121454caff40a.asciidoc deleted file mode 100644 index f0ffaae57a..0000000000 --- a/docs/examples/guide/856c10ad554c26b70f1121454caff40a.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'byte-image-index', - body: { - knn: { - field: 'byte-image-vector', - query_vector: 'fb09', - k: 10, - num_candidates: 100 - }, - fields: [ - 'title' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/8575c966b004fb124c7afd6bb5827b50.asciidoc b/docs/examples/guide/8575c966b004fb124c7afd6bb5827b50.asciidoc deleted file mode 100644 index e85d828755..0000000000 --- a/docs/examples/guide/8575c966b004fb124c7afd6bb5827b50.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'books', - body: { - name: 'Snow Crash', - author: 'Neal Stephenson', - release_date: '1992-06-01', - page_count: 470 - } -) -puts response ----- diff --git a/docs/examples/guide/8582e918a6275472d2eba2e95f1dbe77.asciidoc b/docs/examples/guide/8582e918a6275472d2eba2e95f1dbe77.asciidoc deleted file mode 100644 index d9c5bd0e03..0000000000 --- a/docs/examples/guide/8582e918a6275472d2eba2e95f1dbe77.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.disk.watermark.low' => '90%', - 'cluster.routing.allocation.disk.watermark.low.max_headroom' => '100GB', - 'cluster.routing.allocation.disk.watermark.high' => '95%', - 'cluster.routing.allocation.disk.watermark.high.max_headroom' => '20GB', - 'cluster.routing.allocation.disk.watermark.flood_stage' => '97%', - 'cluster.routing.allocation.disk.watermark.flood_stage.max_headroom' => '5GB', - 'cluster.routing.allocation.disk.watermark.flood_stage.frozen' => '97%', - 'cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom' => '5GB' - } - } -) -puts response - -response = client.indices.put_settings( - index: '*', - expand_wildcards: 'all', - body: { - 'index.blocks.read_only_allow_delete' => nil - } -) -puts response ----- diff --git a/docs/examples/guide/858fde15fb0a0340873b123043f8c3b4.asciidoc b/docs/examples/guide/858fde15fb0a0340873b123043f8c3b4.asciidoc deleted file mode 100644 index b9fdd046d7..0000000000 --- a/docs/examples/guide/858fde15fb0a0340873b123043f8c3b4.asciidoc +++ /dev/null @@ -1,54 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - my_text: 'histogram_1', - my_histogram: { - values: [ - 0.1, - 0.2, - 0.3, - 0.4, - 0.5 - ], - counts: [ - 3, - 7, - 23, - 12, - 6 - ] - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - my_text: 'histogram_2', - my_histogram: { - values: [ - 0.1, - 0.25, - 0.35, - 0.4, - 0.45, - 0.5 - ], - counts: [ - 8, - 17, - 8, - 7, - 6, - 2 - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/85ae90b63ecba9d2bad16144b054c0a1.asciidoc b/docs/examples/guide/85ae90b63ecba9d2bad16144b054c0a1.asciidoc deleted file mode 100644 index fea7d24beb..0000000000 --- a/docs/examples/guide/85ae90b63ecba9d2bad16144b054c0a1.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'txt', - body: { - runtime_mappings: { - release_day_of_week: { - type: 'keyword', - script: "\n emit(doc['release_date'].value.dayOfWeekEnum.toString())\n " - } - }, - query: "\n SELECT * FROM library WHERE page_count > 300 AND author = 'Frank Herbert'\n " - } -) -puts response ----- diff --git a/docs/examples/guide/85e2719d9fd6d2c2d47d28d39f2e3f7e.asciidoc b/docs/examples/guide/85e2719d9fd6d2c2d47d28d39f2e3f7e.asciidoc deleted file mode 100644 index f60485ac7a..0000000000 --- a/docs/examples/guide/85e2719d9fd6d2c2d47d28d39f2e3f7e.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.migration.get_feature_upgrade_status -puts response ----- diff --git a/docs/examples/guide/85f0e5e8ab91ceab63c21dbedd9f4037.asciidoc b/docs/examples/guide/85f0e5e8ab91ceab63c21dbedd9f4037.asciidoc deleted file mode 100644 index ccf65b1328..0000000000 --- a/docs/examples/guide/85f0e5e8ab91ceab63c21dbedd9f4037.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'finnish_example', - body: { - settings: { - analysis: { - filter: { - finnish_stop: { - type: 'stop', - stopwords: '_finnish_' - }, - finnish_keywords: { - type: 'keyword_marker', - keywords: [ - 'esimerkki' - ] - }, - finnish_stemmer: { - type: 'stemmer', - language: 'finnish' - } - }, - analyzer: { - rebuilt_finnish: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'finnish_stop', - 'finnish_keywords', - 'finnish_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/85f6667f148d16d075493fddf07e2932.asciidoc b/docs/examples/guide/85f6667f148d16d075493fddf07e2932.asciidoc deleted file mode 100644 index 3b25d15288..0000000000 --- a/docs/examples/guide/85f6667f148d16d075493fddf07e2932.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: '.ds-my-data-stream-2099.03.07-000001' - }, - dest: { - index: 'new-data-stream', - op_type: 'create' - } - } -) -puts response ----- diff --git a/docs/examples/guide/861f5f61409dc87f3671293b87839ff7.asciidoc b/docs/examples/guide/861f5f61409dc87f3671293b87839ff7.asciidoc deleted file mode 100644 index be019b76bb..0000000000 --- a/docs/examples/guide/861f5f61409dc87f3671293b87839ff7.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cluster.stats( - human: true, - pretty: true -) -puts response ----- diff --git a/docs/examples/guide/86280dcb49aa89083be4b2644daf1b7c.asciidoc b/docs/examples/guide/86280dcb49aa89083be4b2644daf1b7c.asciidoc deleted file mode 100644 index 453e74097a..0000000000 --- a/docs/examples/guide/86280dcb49aa89083be4b2644daf1b7c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_jobs( - job_id: 'high_sum_total_sales' -) -puts response ----- diff --git a/docs/examples/guide/863253bf0ab7d227ff72a0a384f4de8c.asciidoc b/docs/examples/guide/863253bf0ab7d227ff72a0a384f4de8c.asciidoc deleted file mode 100644 index ade82466df..0000000000 --- a/docs/examples/guide/863253bf0ab7d227ff72a0a384f4de8c.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'indices.lifecycle.poll_interval' => nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/867f7d43a78066731ead2e223960fc07.asciidoc b/docs/examples/guide/867f7d43a78066731ead2e223960fc07.asciidoc deleted file mode 100644 index 83c0726045..0000000000 --- a/docs/examples/guide/867f7d43a78066731ead2e223960fc07.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'action.destructive_requires_name' => false - } - } -) -puts response ----- diff --git a/docs/examples/guide/8684589e31d96ab229e8c4feb4d704bb.asciidoc b/docs/examples/guide/8684589e31d96ab229e8c4feb4d704bb.asciidoc deleted file mode 100644 index e3444c31b4..0000000000 --- a/docs/examples/guide/8684589e31d96ab229e8c4feb4d704bb.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.enrich.get_policy( - name: 'my-policy,other-policy' -) -puts response ----- diff --git a/docs/examples/guide/86926bcebf213ac182d4373027554858.asciidoc b/docs/examples/guide/86926bcebf213ac182d4373027554858.asciidoc deleted file mode 100644 index cb9181e26d..0000000000 --- a/docs/examples/guide/86926bcebf213ac182d4373027554858.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my_index', - body: { - mappings: { - properties: { - my_counter: { - type: 'unsigned_long' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8696ba08ca6cc4992110c331732e5f47.asciidoc b/docs/examples/guide/8696ba08ca6cc4992110c331732e5f47.asciidoc deleted file mode 100644 index f12fcf7b38..0000000000 --- a/docs/examples/guide/8696ba08ca6cc4992110c331732e5f47.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - grade_boxplot: { - boxplot: { - field: 'grade', - missing: 10 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8699d35269a47ba867fa8cc766287413.asciidoc b/docs/examples/guide/8699d35269a47ba867fa8cc766287413.asciidoc deleted file mode 100644 index 4c1c21797b..0000000000 --- a/docs/examples/guide/8699d35269a47ba867fa8cc766287413.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.license.post_start_basic -puts response ----- diff --git a/docs/examples/guide/86c5594c4ec551391096c1abcd652b50.asciidoc b/docs/examples/guide/86c5594c4ec551391096c1abcd652b50.asciidoc deleted file mode 100644 index 44c53378f2..0000000000 --- a/docs/examples/guide/86c5594c4ec551391096c1abcd652b50.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_index', - body: { - query: { - match_all: {} - }, - script_fields: { - "count10": { - script: { - source: "Long.divideUnsigned(doc['my_counter'].value, 10)" - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8703f3b1b3895543abc36e2a7a0013d3.asciidoc b/docs/examples/guide/8703f3b1b3895543abc36e2a7a0013d3.asciidoc deleted file mode 100644 index 420db430b5..0000000000 --- a/docs/examples/guide/8703f3b1b3895543abc36e2a7a0013d3.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index_1' -) -puts response - -response = client.indices.create( - index: 'index_2' -) -puts response - -response = client.indices.create( - index: 'index_3', - body: { - settings: { - 'index.priority' => 10 - } - } -) -puts response - -response = client.indices.create( - index: 'index_4', - body: { - settings: { - 'index.priority' => 5 - } - } -) -puts response ----- diff --git a/docs/examples/guide/871154d08efd7251cf3272e758f06acf.asciidoc b/docs/examples/guide/871154d08efd7251cf3272e758f06acf.asciidoc deleted file mode 100644 index 4e37d0e0a0..0000000000 --- a/docs/examples/guide/871154d08efd7251cf3272e758f06acf.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'common_grams_example', - body: { - settings: { - analysis: { - analyzer: { - index_grams: { - tokenizer: 'whitespace', - filter: [ - 'common_grams' - ] - } - }, - filter: { - common_grams: { - type: 'common_grams', - common_words: [ - 'a', - 'is', - 'the' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8731188553e14134b0a533010318f91a.asciidoc b/docs/examples/guide/8731188553e14134b0a533010318f91a.asciidoc deleted file mode 100644 index 3f5a061951..0000000000 --- a/docs/examples/guide/8731188553e14134b0a533010318f91a.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - terms: { - force: [ - 'British Transport Police' - ] - } - }, - aggregations: { - significant_crime_types: { - significant_terms: { - field: 'crime_type' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8739fad1fb2323950b673acf0c9f2ff5.asciidoc b/docs/examples/guide/8739fad1fb2323950b673acf0c9f2ff5.asciidoc deleted file mode 100644 index 6f93faba54..0000000000 --- a/docs/examples/guide/8739fad1fb2323950b673acf0c9f2ff5.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.open( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/873e2333734b1cf5ed066596e5f74b0a.asciidoc b/docs/examples/guide/873e2333734b1cf5ed066596e5f74b0a.asciidoc deleted file mode 100644 index 426cdbc397..0000000000 --- a/docs/examples/guide/873e2333734b1cf5ed066596e5f74b0a.asciidoc +++ /dev/null @@ -1,99 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'museums', - body: { - mappings: { - properties: { - location: { - type: 'geo_point' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'museums', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - location: 'POINT (4.912350 52.374081)', - city: 'Amsterdam', - name: 'NEMO Science Museum' - }, - { - index: { - _id: 2 - } - }, - { - location: 'POINT (4.901618 52.369219)', - city: 'Amsterdam', - name: 'Museum Het Rembrandthuis' - }, - { - index: { - _id: 3 - } - }, - { - location: 'POINT (4.914722 52.371667)', - city: 'Amsterdam', - name: 'Nederlands Scheepvaartmuseum' - }, - { - index: { - _id: 4 - } - }, - { - location: 'POINT (4.405200 51.222900)', - city: 'Antwerp', - name: 'Letterenhuis' - }, - { - index: { - _id: 5 - } - }, - { - location: 'POINT (2.336389 48.861111)', - city: 'Paris', - name: 'Musée du Louvre' - }, - { - index: { - _id: 6 - } - }, - { - location: 'POINT (2.327000 48.860000)', - city: 'Paris', - name: "Musée d'Orsay" - } - ] -) -puts response - -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - centroid: { - geo_centroid: { - field: 'location' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/873fbbc6ab81409058591385fd602736.asciidoc b/docs/examples/guide/873fbbc6ab81409058591385fd602736.asciidoc deleted file mode 100644 index a9266be9c0..0000000000 --- a/docs/examples/guide/873fbbc6ab81409058591385fd602736.asciidoc +++ /dev/null @@ -1,45 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'drivers', - id: 1, - body: { - driver: { - last_name: 'McQueen', - vehicle: [ - { - make: 'Powell Motors', - model: 'Canyonero' - }, - { - make: 'Miller-Meteor', - model: 'Ecto-1' - } - ] - } - } -) -puts response - -response = client.index( - index: 'drivers', - id: 2, - refresh: true, - body: { - driver: { - last_name: 'Hudson', - vehicle: [ - { - make: 'Mifune', - model: 'Mach Five' - }, - { - make: 'Miller-Meteor', - model: 'Ecto-1' - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/87416e6a1ca2da324dbed6deb05303eb.asciidoc b/docs/examples/guide/87416e6a1ca2da324dbed6deb05303eb.asciidoc deleted file mode 100644 index 6f14013326..0000000000 --- a/docs/examples/guide/87416e6a1ca2da324dbed6deb05303eb.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - 'user.id' => 'kimchy' - } -) -puts response - -response = client.count( - index: 'my-index-000001', - q: 'user:kimchy' -) -puts response - -response = client.count( - index: 'my-index-000001', - body: { - query: { - term: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/87733deeea4b441b595d19a0f97346f0.asciidoc b/docs/examples/guide/87733deeea4b441b595d19a0f97346f0.asciidoc deleted file mode 100644 index e8eee83694..0000000000 --- a/docs/examples/guide/87733deeea4b441b595d19a0f97346f0.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.health_report( - feature: 'shards_availability' -) -puts response ----- diff --git a/docs/examples/guide/877ea90c663b5df9efe95717646a666f.asciidoc b/docs/examples/guide/877ea90c663b5df9efe95717646a666f.asciidoc deleted file mode 100644 index bf5c21e911..0000000000 --- a/docs/examples/guide/877ea90c663b5df9efe95717646a666f.asciidoc +++ /dev/null @@ -1,58 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - group: { - type: 'keyword' - }, - user: { - type: 'nested', - properties: { - first: { - type: 'keyword' - }, - last: { - type: 'keyword' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - group: 'fans', - user: [ - { - first: 'John', - last: 'Smith' - }, - { - first: 'Alice', - last: 'White' - } - ] - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - fields: [ - '*' - ], - _source: false - } -) -puts response ----- diff --git a/docs/examples/guide/87b0b496747ad6c1e4ab4b462128fa1c.asciidoc b/docs/examples/guide/87b0b496747ad6c1e4ab4b462128fa1c.asciidoc deleted file mode 100644 index 179cbdeb23..0000000000 --- a/docs/examples/guide/87b0b496747ad6c1e4ab4b462128fa1c.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodeattrs( - v: true, - h: 'name,pid,attr,value' -) -puts response ----- diff --git a/docs/examples/guide/87f854393d715aabf4d45e90a8eb74ce.asciidoc b/docs/examples/guide/87f854393d715aabf4d45e90a8eb74ce.asciidoc deleted file mode 100644 index e155187d16..0000000000 --- a/docs/examples/guide/87f854393d715aabf4d45e90a8eb74ce.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'reviews', - body: { - size: 0, - aggregations: { - review_variability: { - median_absolute_deviation: { - field: 'rating', - missing: 5 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/88195d87a350e7fff200131f410c3e88.asciidoc b/docs/examples/guide/88195d87a350e7fff200131f410c3e88.asciidoc deleted file mode 100644 index 7f959d8407..0000000000 --- a/docs/examples/guide/88195d87a350e7fff200131f410c3e88.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - aggregations: { - price_ranges: { - range: { - field: 'price', - keyed: true, - ranges: [ - { - to: 100 - }, - { - from: 100, - to: 200 - }, - { - from: 200 - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/88a08d0b15ef41324f5c23db533d47d1.asciidoc b/docs/examples/guide/88a08d0b15ef41324f5c23db533d47d1.asciidoc deleted file mode 100644 index 896939f4fb..0000000000 --- a/docs/examples/guide/88a08d0b15ef41324f5c23db533d47d1.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/88b19973b970adf9b73fca82017d4951.asciidoc b/docs/examples/guide/88b19973b970adf9b73fca82017d4951.asciidoc deleted file mode 100644 index 280dfb3ffa..0000000000 --- a/docs/examples/guide/88b19973b970adf9b73fca82017d4951.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-*', - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/88cecae3f0363fc186d955dd8616b5d4.asciidoc b/docs/examples/guide/88cecae3f0363fc186d955dd8616b5d4.asciidoc deleted file mode 100644 index b9a0dce763..0000000000 --- a/docs/examples/guide/88cecae3f0363fc186d955dd8616b5d4.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.eql.get_status( - id: 'FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=', - keep_alive: '5d' -) -puts response ----- diff --git a/docs/examples/guide/88cf60d3310a56d8ae12704abc05b565.asciidoc b/docs/examples/guide/88cf60d3310a56d8ae12704abc05b565.asciidoc deleted file mode 100644 index 2a223db680..0000000000 --- a/docs/examples/guide/88cf60d3310a56d8ae12704abc05b565.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.license.get_trial_status -puts response ----- diff --git a/docs/examples/guide/88ec7fa6768a7e13cd2158667a69e97f.asciidoc b/docs/examples/guide/88ec7fa6768a7e13cd2158667a69e97f.asciidoc deleted file mode 100644 index 2ce16b3a10..0000000000 --- a/docs/examples/guide/88ec7fa6768a7e13cd2158667a69e97f.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - runtime_mappings: { - day_of_week: { - type: 'keyword', - script: "\n emit(doc['timestamp'].value.dayOfWeekEnum\n .getDisplayName(TextStyle.FULL, Locale.ROOT))\n " - } - }, - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - dow: { - terms: { - field: 'day_of_week' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8963fb1e3d0900ba3b68be212e8972ee.asciidoc b/docs/examples/guide/8963fb1e3d0900ba3b68be212e8972ee.asciidoc deleted file mode 100644 index edce94a9d5..0000000000 --- a/docs/examples/guide/8963fb1e3d0900ba3b68be212e8972ee.asciidoc +++ /dev/null @@ -1,41 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - names: { - type: 'text', - position_increment_gap: 0 - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - names: [ - 'John Abraham', - 'Lincoln Smith' - ] - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - match_phrase: { - names: 'Abraham Lincoln' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/897668edcbb0785fa5229aeb2dfc963e.asciidoc b/docs/examples/guide/897668edcbb0785fa5229aeb2dfc963e.asciidoc deleted file mode 100644 index f4392803c1..0000000000 --- a/docs/examples/guide/897668edcbb0785fa5229aeb2dfc963e.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - query: { - match: { - message: 'bonsai tree' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/89b72dd7f747f6297c2b089e8bc807be.asciidoc b/docs/examples/guide/89b72dd7f747f6297c2b089e8bc807be.asciidoc deleted file mode 100644 index 924b6aa723..0000000000 --- a/docs/examples/guide/89b72dd7f747f6297c2b089e8bc807be.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.create_repository( - repository: 'my_repository', - body: { - type: 'fs', - settings: { - location: 'my_backup_location' - } - } -) -puts response ----- diff --git a/docs/examples/guide/89c57917bc7bd2e6387b5eb54ece37b1.asciidoc b/docs/examples/guide/89c57917bc7bd2e6387b5eb54ece37b1.asciidoc deleted file mode 100644 index ed6bdce398..0000000000 --- a/docs/examples/guide/89c57917bc7bd2e6387b5eb54ece37b1.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.count( - index: 'my-index-000001', - body: { - query: { - exists: { - field: 'my-field' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/89d2a3748dc14c6d5d4c6f94b9b03938.asciidoc b/docs/examples/guide/89d2a3748dc14c6d5d4c6f94b9b03938.asciidoc deleted file mode 100644 index 70ef33abaf..0000000000 --- a/docs/examples/guide/89d2a3748dc14c6d5d4c6f94b9b03938.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.add_block( - index: 'my_source_index', - block: 'write' -) -puts response ----- diff --git a/docs/examples/guide/89dee10a24ea2727af5b00039a4271bd.asciidoc b/docs/examples/guide/89dee10a24ea2727af5b00039a4271bd.asciidoc deleted file mode 100644 index 36b9db8182..0000000000 --- a/docs/examples/guide/89dee10a24ea2727af5b00039a4271bd.asciidoc +++ /dev/null @@ -1,162 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'tour', - body: { - mappings: { - properties: { - city: { - type: 'keyword', - time_series_dimension: true - }, - category: { - type: 'keyword' - }, - route: { - type: 'long' - }, - name: { - type: 'keyword' - }, - location: { - type: 'geo_point' - }, - "@timestamp": { - type: 'date' - } - } - }, - settings: { - index: { - mode: 'time_series', - routing_path: [ - 'city' - ], - time_series: { - start_time: '2023-01-01T00:00:00Z', - end_time: '2024-01-01T00:00:00Z' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'tour', - refresh: true, - body: [ - { - index: {} - }, - { - "@timestamp": '2023-01-02T09:00:00Z', - route: 0, - location: 'POINT(4.889187 52.373184)', - city: 'Amsterdam', - category: 'Attraction', - name: 'Royal Palace Amsterdam' - }, - { - index: {} - }, - { - "@timestamp": '2023-01-02T10:00:00Z', - route: 1, - location: 'POINT(4.885057 52.370159)', - city: 'Amsterdam', - category: 'Attraction', - name: 'The Amsterdam Dungeon' - }, - { - index: {} - }, - { - "@timestamp": '2023-01-02T13:00:00Z', - route: 2, - location: 'POINT(4.901618 52.369219)', - city: 'Amsterdam', - category: 'Museum', - name: 'Museum Het Rembrandthuis' - }, - { - index: {} - }, - { - "@timestamp": '2023-01-02T16:00:00Z', - route: 3, - location: 'POINT(4.912350 52.374081)', - city: 'Amsterdam', - category: 'Museum', - name: 'NEMO Science Museum' - }, - { - index: {} - }, - { - "@timestamp": '2023-01-03T12:00:00Z', - route: 4, - location: 'POINT(4.914722 52.371667)', - city: 'Amsterdam', - category: 'Museum', - name: 'Nederlands Scheepvaartmuseum' - }, - { - index: {} - }, - { - "@timestamp": '2023-01-04T09:00:00Z', - route: 5, - location: 'POINT(4.401384 51.220292)', - city: 'Antwerp', - category: 'Attraction', - name: 'Cathedral of Our Lady' - }, - { - index: {} - }, - { - "@timestamp": '2023-01-04T12:00:00Z', - route: 6, - location: 'POINT(4.405819 51.221758)', - city: 'Antwerp', - category: 'Museum', - name: 'Snijders&Rockoxhuis' - }, - { - index: {} - }, - { - "@timestamp": '2023-01-04T15:00:00Z', - route: 7, - location: 'POINT(4.405200 51.222900)', - city: 'Antwerp', - category: 'Museum', - name: 'Letterenhuis' - }, - { - index: {} - }, - { - "@timestamp": '2023-01-05T10:00:00Z', - route: 8, - location: 'POINT(2.336389 48.861111)', - city: 'Paris', - category: 'Museum', - name: 'Musée du Louvre' - }, - { - index: {} - }, - { - "@timestamp": '2023-01-05T14:00:00Z', - route: 9, - location: 'POINT(2.327000 48.860000)', - city: 'Paris', - category: 'Museum', - name: 'Musée dOrsay' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/89f8eac24f3ec6a7668d580aaf0eeefa.asciidoc b/docs/examples/guide/89f8eac24f3ec6a7668d580aaf0eeefa.asciidoc deleted file mode 100644 index 32e40e8383..0000000000 --- a/docs/examples/guide/89f8eac24f3ec6a7668d580aaf0eeefa.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'snowball' - ], - text: 'detailed output', - explain: true, - attributes: [ - 'keyword' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/8a12cd824404d74f098d854716a26899.asciidoc b/docs/examples/guide/8a12cd824404d74f098d854716a26899.asciidoc deleted file mode 100644 index b3ab03febe..0000000000 --- a/docs/examples/guide/8a12cd824404d74f098d854716a26899.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_datafeed( - datafeed_id: 'datafeed-total-requests' -) -puts response ----- diff --git a/docs/examples/guide/8a1f6cffa653800282c0ae160ee375bc.asciidoc b/docs/examples/guide/8a1f6cffa653800282c0ae160ee375bc.asciidoc deleted file mode 100644 index 03b474149a..0000000000 --- a/docs/examples/guide/8a1f6cffa653800282c0ae160ee375bc.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'test', - id: 1, - body: { - script: { - source: 'if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }', - lang: 'painless', - params: { - tag: 'blue' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8aa74aee3dcf4b34028e4c5e1c1ed27b.asciidoc b/docs/examples/guide/8aa74aee3dcf4b34028e4c5e1c1ed27b.asciidoc deleted file mode 100644 index 6a60f4e5a1..0000000000 --- a/docs/examples/guide/8aa74aee3dcf4b34028e4c5e1c1ed27b.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'bug_reports', - body: { - mappings: { - properties: { - title: { - type: 'text' - }, - labels: { - type: 'flattened' - } - } - } - } -) -puts response - -response = client.index( - index: 'bug_reports', - id: 1, - body: { - title: 'Results are not sorted correctly.', - labels: { - priority: 'urgent', - release: [ - 'v1.2.5', - 'v1.3.0' - ], - timestamp: { - created: 1_541_458_026, - closed: 1_541_457_010 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8b07372a21a10a16b52e70fc0c87ad4e.asciidoc b/docs/examples/guide/8b07372a21a10a16b52e70fc0c87ad4e.asciidoc deleted file mode 100644 index 91f1e63dcc..0000000000 --- a/docs/examples/guide/8b07372a21a10a16b52e70fc0c87ad4e.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - region: 'US', - manager: { - age: 30, - name: { - first: 'John', - last: 'Smith' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8b301122cbf42be6eafeda714a36559e.asciidoc b/docs/examples/guide/8b301122cbf42be6eafeda714a36559e.asciidoc deleted file mode 100644 index ad59d2c541..0000000000 --- a/docs/examples/guide/8b301122cbf42be6eafeda714a36559e.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.logstash.put_pipeline( - id: 'my_pipeline', - body: { - description: 'Sample pipeline for illustration purposes', - last_modified: '2021-01-02T02:50:51.250Z', - pipeline_metadata: { - type: 'logstash_pipeline', - version: '1' - }, - username: 'elastic', - pipeline: "input {}\n filter { grok {} }\n output {}", - pipeline_settings: { - 'pipeline.workers' => 1, - 'pipeline.batch.size' => 125, - 'pipeline.batch.delay' => 50, - 'queue.type' => 'memory', - 'queue.max_bytes' => '1gb', - 'queue.checkpoint.writes' => 1024 - } - } -) -puts response ----- diff --git a/docs/examples/guide/8b5bc6e217b0d33e4c88d84f5c1a0712.asciidoc b/docs/examples/guide/8b5bc6e217b0d33e4c88d84f5c1a0712.asciidoc deleted file mode 100644 index 1747ab46ab..0000000000 --- a/docs/examples/guide/8b5bc6e217b0d33e4c88d84f5c1a0712.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - products_without_a_price: { - missing: { - field: 'price' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8b7956a2b88fd798a895d3466d671b58.asciidoc b/docs/examples/guide/8b7956a2b88fd798a895d3466d671b58.asciidoc deleted file mode 100644 index 031541c239..0000000000 --- a/docs/examples/guide/8b7956a2b88fd798a895d3466d671b58.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'http.tracer.include' => '*', - 'http.tracer.exclude' => '' - } - } -) -puts response ----- diff --git a/docs/examples/guide/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc b/docs/examples/guide/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc deleted file mode 100644 index ba63948337..0000000000 --- a/docs/examples/guide/8bf1e7a6d529547906ba8b1d6501fa0c.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.connector.sync_job_error( - connector_sync_job_id: 'my-connector-sync-job', - body: { - error: 'some-error' - } -) -puts response ----- diff --git a/docs/examples/guide/8bf51fd50195b46bacbf872f460ebec2.asciidoc b/docs/examples/guide/8bf51fd50195b46bacbf872f460ebec2.asciidoc deleted file mode 100644 index 4adf0a798e..0000000000 --- a/docs/examples/guide/8bf51fd50195b46bacbf872f460ebec2.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - versions: { - type: 'version' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - versions: [ - '8.0.0-beta1', - '8.5.0', - '0.90.12', - '2.6.1', - '1.3.4', - '1.3.4' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/8c5d48252cd6d1ee26a2bb817f89c78e.asciidoc b/docs/examples/guide/8c5d48252cd6d1ee26a2bb817f89c78e.asciidoc deleted file mode 100644 index 13c9a54af9..0000000000 --- a/docs/examples/guide/8c5d48252cd6d1ee26a2bb817f89c78e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_filter( - filter_id: 'safe_domains' -) -puts response ----- diff --git a/docs/examples/guide/8c619666488927dac6ecb7dcebca44c2.asciidoc b/docs/examples/guide/8c619666488927dac6ecb7dcebca44c2.asciidoc deleted file mode 100644 index 623878106b..0000000000 --- a/docs/examples/guide/8c619666488927dac6ecb7dcebca44c2.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'cohere-embeddings', - body: { - mappings: { - properties: { - content_embedding: { - type: 'dense_vector', - dims: 1024, - element_type: 'byte' - }, - content: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8c693e057f6e85fbf2b56ca442719362.asciidoc b/docs/examples/guide/8c693e057f6e85fbf2b56ca442719362.asciidoc deleted file mode 100644 index e97dab74b4..0000000000 --- a/docs/examples/guide/8c693e057f6e85fbf2b56ca442719362.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'stats-index', - size: 0, - body: { - aggregations: { - metric_min: { - min: { - field: 'agg_metric' - } - }, - metric_max: { - max: { - field: 'agg_metric' - } - }, - metric_value_count: { - value_count: { - field: 'agg_metric' - } - }, - metric_sum: { - sum: { - field: 'agg_metric' - } - }, - metric_avg: { - avg: { - field: 'agg_metric' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8c8b5224befab7804461c7e7b6086d9a.asciidoc b/docs/examples/guide/8c8b5224befab7804461c7e7b6086d9a.asciidoc deleted file mode 100644 index 11d13be511..0000000000 --- a/docs/examples/guide/8c8b5224befab7804461c7e7b6086d9a.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - text: 'Document with ID 1' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - refresh: true, - body: { - text: 'Document with ID 2' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - terms: { - _id: [ - '1', - '2' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8c9081dc738d1290fd76071b283fcaec.asciidoc b/docs/examples/guide/8c9081dc738d1290fd76071b283fcaec.asciidoc deleted file mode 100644 index 85c47f4ea1..0000000000 --- a/docs/examples/guide/8c9081dc738d1290fd76071b283fcaec.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'my-index-000001', - id: 2, - routing: 'user1' -) -puts response ----- diff --git a/docs/examples/guide/8c92c5e87facbae8dc4f58376ec21815.asciidoc b/docs/examples/guide/8c92c5e87facbae8dc4f58376ec21815.asciidoc deleted file mode 100644 index bfb9ab9498..0000000000 --- a/docs/examples/guide/8c92c5e87facbae8dc4f58376ec21815.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - fields: [ - 'voltage_corrected', - 'node' - ], - size: 2 - } -) -puts response ----- diff --git a/docs/examples/guide/8cbf9b46ce3ccc966c4902d2e0c56317.asciidoc b/docs/examples/guide/8cbf9b46ce3ccc966c4902d2e0c56317.asciidoc deleted file mode 100644 index ac1f2b9f0c..0000000000 --- a/docs/examples/guide/8cbf9b46ce3ccc966c4902d2e0c56317.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'keyword_repeat', - 'stemmer' - ], - text: 'fox running and jumping', - explain: true, - attributes: 'keyword' - } -) -puts response ----- diff --git a/docs/examples/guide/8cd00a3aba7c3c158277bc032aac2830.asciidoc b/docs/examples/guide/8cd00a3aba7c3c158277bc032aac2830.asciidoc deleted file mode 100644 index 24014b2841..0000000000 --- a/docs/examples/guide/8cd00a3aba7c3c158277bc032aac2830.asciidoc +++ /dev/null @@ -1,76 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - body: [ - { - update: { - _id: '1', - _index: 'index1', - retry_on_conflict: 3 - } - }, - { - doc: { - field: 'value' - } - }, - { - update: { - _id: '0', - _index: 'index1', - retry_on_conflict: 3 - } - }, - { - script: { - source: 'ctx._source.counter += params.param1', - lang: 'painless', - params: { - "param1": 1 - } - }, - upsert: { - counter: 1 - } - }, - { - update: { - _id: '2', - _index: 'index1', - retry_on_conflict: 3 - } - }, - { - doc: { - field: 'value' - }, - doc_as_upsert: true - }, - { - update: { - _id: '3', - _index: 'index1', - _source: true - } - }, - { - doc: { - field: 'value' - } - }, - { - update: { - _id: '4', - _index: 'index1' - } - }, - { - doc: { - field: 'value' - }, - _source: true - } - ] -) -puts response ----- diff --git a/docs/examples/guide/8cef2b98f3fe3a85874f1b48ebe6ec63.asciidoc b/docs/examples/guide/8cef2b98f3fe3a85874f1b48ebe6ec63.asciidoc deleted file mode 100644 index 3be50c4fbd..0000000000 --- a/docs/examples/guide/8cef2b98f3fe3a85874f1b48ebe6ec63.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'elision_case_insensitive_example', - body: { - settings: { - analysis: { - analyzer: { - default: { - tokenizer: 'whitespace', - filter: [ - 'elision_case_insensitive' - ] - } - }, - filter: { - elision_case_insensitive: { - type: 'elision', - articles: [ - 'l', - 'm', - 't', - 'qu', - 'n', - 's', - 'j' - ], - articles_case: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8d064eda2199de52e5be9ee68a5b7c68.asciidoc b/docs/examples/guide/8d064eda2199de52e5be9ee68a5b7c68.asciidoc deleted file mode 100644 index 8059cf7cea..0000000000 --- a/docs/examples/guide/8d064eda2199de52e5be9ee68a5b7c68.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-text-embeddings-pipeline', - body: { - description: 'Text embedding pipeline', - processors: [ - { - inference: { - model_id: '.elser_model_2', - input_output: [ - { - input_field: 'my_text_field', - output_field: 'my_tokens' - } - ] - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/8d421c5bec38eecce4679b219cacc9db.asciidoc b/docs/examples/guide/8d421c5bec38eecce4679b219cacc9db.asciidoc deleted file mode 100644 index b89963631f..0000000000 --- a/docs/examples/guide/8d421c5bec38eecce4679b219cacc9db.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - runtime_mappings: { - 'load_time.seconds' => { - type: 'long', - script: { - source: "emit(doc['load_time'].value / params.timeUnit)", - params: { - "timeUnit": 1000 - } - } - } - }, - aggregations: { - load_time_ranks: { - percentile_ranks: { - values: [ - 500, - 600 - ], - field: 'load_time.seconds' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8d6631b622f9bfb8fa70154f6fb8b153.asciidoc b/docs/examples/guide/8d6631b622f9bfb8fa70154f6fb8b153.asciidoc deleted file mode 100644 index 70c9bb090f..0000000000 --- a/docs/examples/guide/8d6631b622f9bfb8fa70154f6fb8b153.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'kibana_sample_data_ecommerce', - q: 'kimchy' -) -puts response ----- diff --git a/docs/examples/guide/8d7193902a353872740a3324c60c5001.asciidoc b/docs/examples/guide/8d7193902a353872740a3324c60c5001.asciidoc deleted file mode 100644 index 4d7923342e..0000000000 --- a/docs/examples/guide/8d7193902a353872740a3324c60c5001.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'events', - body: { - settings: { - index: { - 'sort.field' => 'timestamp', - 'sort.order' => 'desc' - } - }, - mappings: { - properties: { - timestamp: { - type: 'date' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8d9b04f2a97f4229dec9e620126de049.asciidoc b/docs/examples/guide/8d9b04f2a97f4229dec9e620126de049.asciidoc deleted file mode 100644 index f474f9b86f..0000000000 --- a/docs/examples/guide/8d9b04f2a97f4229dec9e620126de049.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'logger.com.amazonaws.request' => 'DEBUG' - } - } -) -puts response ----- diff --git a/docs/examples/guide/8db799543eb084ec71547980863d60b9.asciidoc b/docs/examples/guide/8db799543eb084ec71547980863d60b9.asciidoc deleted file mode 100644 index 775af41fa2..0000000000 --- a/docs/examples/guide/8db799543eb084ec71547980863d60b9.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - } - } - }, - sum_monthly_sales: { - sum_bucket: { - buckets_path: 'sales_per_month>sales' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8de6fed6ba2b94ce6a12ce076be2b4d7.asciidoc b/docs/examples/guide/8de6fed6ba2b94ce6a12ce076be2b4d7.asciidoc deleted file mode 100644 index 0199f3c873..0000000000 --- a/docs/examples/guide/8de6fed6ba2b94ce6a12ce076be2b4d7.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.segments( - v: true -) -puts response ----- diff --git a/docs/examples/guide/8e06d8b2b737c43806018eae2ca061c1.asciidoc b/docs/examples/guide/8e06d8b2b737c43806018eae2ca061c1.asciidoc deleted file mode 100644 index bd81f6dbb4..0000000000 --- a/docs/examples/guide/8e06d8b2b737c43806018eae2ca061c1.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - size: 0, - body: { - aggregations: { - message_stats: { - string_stats: { - field: 'message.keyword', - missing: '[empty message]' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8e0f43829df9af20547ea6896f4c0124.asciidoc b/docs/examples/guide/8e0f43829df9af20547ea6896f4c0124.asciidoc deleted file mode 100644 index ce25108b0b..0000000000 --- a/docs/examples/guide/8e0f43829df9af20547ea6896f4c0124.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'rollover_policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_size: '50gb' - } - } - }, - delete: { - min_age: '1d', - actions: { - delete: {} - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8e286a205a1f84f888a6d99f2620c80e.asciidoc b/docs/examples/guide/8e286a205a1f84f888a6d99f2620c80e.asciidoc deleted file mode 100644 index 59b020a4a3..0000000000 --- a/docs/examples/guide/8e286a205a1f84f888a6d99f2620c80e.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'logger.org.elasticsearch.deprecation' => 'OFF' - } - } -) -puts response ----- diff --git a/docs/examples/guide/8e2bbef535fef688d397e60e09aefa7f.asciidoc b/docs/examples/guide/8e2bbef535fef688d397e60e09aefa7f.asciidoc deleted file mode 100644 index 74e8d95005..0000000000 --- a/docs/examples/guide/8e2bbef535fef688d397e60e09aefa7f.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.stats( - metric: 'indexing,search', - level: 'shards', - human: true, - expand_wildcards: 'all' -) -puts response ----- diff --git a/docs/examples/guide/8e42a17edace2bc6e42c6a1532779937.asciidoc b/docs/examples/guide/8e42a17edace2bc6e42c6a1532779937.asciidoc deleted file mode 100644 index 8b43e86c1f..0000000000 --- a/docs/examples/guide/8e42a17edace2bc6e42c6a1532779937.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - max_price: { - max: { - field: 'price' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8e68cdfad45e7e6dff254d931eea29d4.asciidoc b/docs/examples/guide/8e68cdfad45e7e6dff254d931eea29d4.asciidoc deleted file mode 100644 index 949db7f3e7..0000000000 --- a/docs/examples/guide/8e68cdfad45e7e6dff254d931eea29d4.asciidoc +++ /dev/null @@ -1,87 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-index-000001', - refresh: true, - body: [ - { - index: {} - }, - { - "@timestamp": '2020-06-21T15:00:01-05:00', - message: '211.11.9.0 - - [2020-06-21T15:00:01-05:00] "GET /english/index.html HTTP/1.0" 304 0' - }, - { - index: {} - }, - { - "@timestamp": '2020-06-21T15:00:01-05:00', - message: '211.11.9.0 - - [2020-06-21T15:00:01-05:00] "GET /english/index.html HTTP/1.0" 304 0' - }, - { - index: {} - }, - { - "@timestamp": '2020-04-30T14:30:17-05:00', - message: '40.135.0.0 - - [2020-04-30T14:30:17-05:00] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - "@timestamp": '2020-04-30T14:30:53-05:00', - message: '232.0.0.0 - - [2020-04-30T14:30:53-05:00] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - "@timestamp": '2020-04-30T14:31:12-05:00', - message: '26.1.0.0 - - [2020-04-30T14:31:12-05:00] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - "@timestamp": '2020-04-30T14:31:19-05:00', - message: '247.37.0.0 - - [2020-04-30T14:31:19-05:00] "GET /french/splash_inet.html HTTP/1.0" 200 3781' - }, - { - index: {} - }, - { - "@timestamp": '2020-04-30T14:31:27-05:00', - message: '252.0.0.0 - - [2020-04-30T14:31:27-05:00] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - "@timestamp": '2020-04-30T14:31:29-05:00', - message: '247.37.0.0 - - [2020-04-30T14:31:29-05:00] "GET /images/hm_brdl.gif HTTP/1.0" 304 0' - }, - { - index: {} - }, - { - "@timestamp": '2020-04-30T14:31:29-05:00', - message: '247.37.0.0 - - [2020-04-30T14:31:29-05:00] "GET /images/hm_arw.gif HTTP/1.0" 304 0' - }, - { - index: {} - }, - { - "@timestamp": '2020-04-30T14:31:32-05:00', - message: '247.37.0.0 - - [2020-04-30T14:31:32-05:00] "GET /images/nav_bg_top.gif HTTP/1.0" 200 929' - }, - { - index: {} - }, - { - "@timestamp": '2020-04-30T14:31:43-05:00', - message: '247.37.0.0 - - [2020-04-30T14:31:43-05:00] "GET /french/images/nav_venue_off.gif HTTP/1.0" 304 0' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/8e89fee0be6a436c4e3d7c152659c47e.asciidoc b/docs/examples/guide/8e89fee0be6a436c4e3d7c152659c47e.asciidoc deleted file mode 100644 index 412cbd8e26..0000000000 --- a/docs/examples/guide/8e89fee0be6a436c4e3d7c152659c47e.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_scheduling( - connector_id: 'my-connector', - body: { - scheduling: { - access_control: { - enabled: true, - interval: '0 10 0 * * ?' - }, - full: { - enabled: true, - interval: '0 20 0 * * ?' - }, - incremental: { - enabled: false, - interval: '0 30 0 * * ?' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8e92b10ebcfedc76562ab52d0e46b916.asciidoc b/docs/examples/guide/8e92b10ebcfedc76562ab52d0e46b916.asciidoc deleted file mode 100644 index cd842afced..0000000000 --- a/docs/examples/guide/8e92b10ebcfedc76562ab52d0e46b916.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.delete_script( - id: 'my-search-template' -) -puts response ----- diff --git a/docs/examples/guide/8e9e7dc5fad2b2b8e74ab4dc225d9c53.asciidoc b/docs/examples/guide/8e9e7dc5fad2b2b8e74ab4dc225d9c53.asciidoc deleted file mode 100644 index 4587768bc9..0000000000 --- a/docs/examples/guide/8e9e7dc5fad2b2b8e74ab4dc225d9c53.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ml.set_upgrade_mode( - enabled: false, - timeout: '10m' -) -puts response ----- diff --git a/docs/examples/guide/8e9f7261af6264c92d0eb4d586a176f9.asciidoc b/docs/examples/guide/8e9f7261af6264c92d0eb4d586a176f9.asciidoc deleted file mode 100644 index 9b8a959f5b..0000000000 --- a/docs/examples/guide/8e9f7261af6264c92d0eb4d586a176f9.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'lowercase_example', - body: { - settings: { - analysis: { - analyzer: { - whitespace_lowercase: { - tokenizer: 'whitespace', - filter: [ - 'lowercase' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8eac28d2e9b6482b413d61817456a14f.asciidoc b/docs/examples/guide/8eac28d2e9b6482b413d61817456a14f.asciidoc deleted file mode 100644 index 900c60017c..0000000000 --- a/docs/examples/guide/8eac28d2e9b6482b413d61817456a14f.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - genres: { - terms: { - field: 'genre', - order: { - max_play_count: 'desc' - } - }, - aggregations: { - max_play_count: { - max: { - field: 'play_count' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8ecefdcf8f153cf91588e9fdde8f3e6b.asciidoc b/docs/examples/guide/8ecefdcf8f153cf91588e9fdde8f3e6b.asciidoc deleted file mode 100644 index 0c29d6e39d..0000000000 --- a/docs/examples/guide/8ecefdcf8f153cf91588e9fdde8f3e6b.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - fields: [ - 'content', - 'name^5' - ], - query: 'this AND that OR thus', - tie_breaker: 0 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8ed31628081db2b6e9106d61d1e142be.asciidoc b/docs/examples/guide/8ed31628081db2b6e9106d61d1e142be.asciidoc deleted file mode 100644 index a8d78efc3b..0000000000 --- a/docs/examples/guide/8ed31628081db2b6e9106d61d1e142be.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - simple_query_string: { - query: 'ny city', - auto_generate_synonyms_phrase_query: false - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8ee9521f57661a050efb614f02b4a090.asciidoc b/docs/examples/guide/8ee9521f57661a050efb614f02b4a090.asciidoc deleted file mode 100644 index 2a1a63d77c..0000000000 --- a/docs/examples/guide/8ee9521f57661a050efb614f02b4a090.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - genres: { - terms: { - field: 'genre' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8f0c5c81cdb902c136db821947ee70a1.asciidoc b/docs/examples/guide/8f0c5c81cdb902c136db821947ee70a1.asciidoc deleted file mode 100644 index 29f8328a5c..0000000000 --- a/docs/examples/guide/8f0c5c81cdb902c136db821947ee70a1.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - runtime_mappings: { - 'price.adjusted' => { - type: 'double', - script: "\n double price = doc['price'].value;\n if (doc['promoted'].value) {\n price *= 0.8;\n }\n emit(price);\n " - } - }, - aggregations: { - min_price: { - min: { - field: 'price.adjusted' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8f4a7f68f2ca3698abdf20026a2d8c5f.asciidoc b/docs/examples/guide/8f4a7f68f2ca3698abdf20026a2d8c5f.asciidoc deleted file mode 100644 index d50c7c3cbf..0000000000 --- a/docs/examples/guide/8f4a7f68f2ca3698abdf20026a2d8c5f.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.tasks.list( - actions: '*search', - detailed: true -) -puts response ----- diff --git a/docs/examples/guide/8f7936f219500305e5b2518dbbf949ea.asciidoc b/docs/examples/guide/8f7936f219500305e5b2518dbbf949ea.asciidoc deleted file mode 100644 index 8eb8cd85ab..0000000000 --- a/docs/examples/guide/8f7936f219500305e5b2518dbbf949ea.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.async_search.status( - id: 'FmpwbThueVB4UkRDeUxqb1l4akIza3cbWEJyeVBPQldTV3FGZGdIeUVabXBldzoyMDIw' -) -puts response ----- diff --git a/docs/examples/guide/8f9a3fcd17a111f63caa3bef6e5f00f2.asciidoc b/docs/examples/guide/8f9a3fcd17a111f63caa3bef6e5f00f2.asciidoc deleted file mode 100644 index 6cec726fe4..0000000000 --- a/docs/examples/guide/8f9a3fcd17a111f63caa3bef6e5f00f2.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - tags: { - terms: { - field: 'tags', - execution_hint: 'map' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8f9f88cf9a27c1138226efb94ac09e73.asciidoc b/docs/examples/guide/8f9f88cf9a27c1138226efb94ac09e73.asciidoc deleted file mode 100644 index 90ff54e0b1..0000000000 --- a/docs/examples/guide/8f9f88cf9a27c1138226efb94ac09e73.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - term: { - ip_addr: '192.168.0.0/16' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8fe128323a944765f525c76d85af7a2f.asciidoc b/docs/examples/guide/8fe128323a944765f525c76d85af7a2f.asciidoc deleted file mode 100644 index 7074a0e18c..0000000000 --- a/docs/examples/guide/8fe128323a944765f525c76d85af7a2f.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'kibana_sample_data_ecommerce', - size: 0, - track_total_hits: false, - body: { - aggregations: { - sampling: { - random_sampler: { - probability: 0.1 - }, - aggregations: { - price_percentiles: { - percentiles: { - field: 'taxful_total_price' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/8fec06a98d0151c1d717a01491d0b8f0.asciidoc b/docs/examples/guide/8fec06a98d0151c1d717a01491d0b8f0.asciidoc deleted file mode 100644 index 6626475dae..0000000000 --- a/docs/examples/guide/8fec06a98d0151c1d717a01491d0b8f0.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'dsl-data-stream', - body: { - "@timestamp": '2023-10-18T16:21:15.000Z', - message: '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736' - } -) -puts response ----- diff --git a/docs/examples/guide/90083d93e46fad2524755b8d4d1306fc.asciidoc b/docs/examples/guide/90083d93e46fad2524755b8d4d1306fc.asciidoc deleted file mode 100644 index 06608f987c..0000000000 --- a/docs/examples/guide/90083d93e46fad2524755b8d4d1306fc.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.connector.sync_job_update_stats( - connector_sync_job_id: 'my-connector-sync-job', - body: { - deleted_document_count: 10, - indexed_document_count: 20, - indexed_document_volume: 1000, - total_document_count: 2000, - last_seen: '2023-01-02T10:00:00Z' - } -) -puts response ----- diff --git a/docs/examples/guide/901d66919e584515717bf78ab5ca2cbb.asciidoc b/docs/examples/guide/901d66919e584515717bf78ab5ca2cbb.asciidoc deleted file mode 100644 index fcb8e99ef8..0000000000 --- a/docs/examples/guide/901d66919e584515717bf78ab5ca2cbb.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - range: { - date_range: { - field: 'date', - time_zone: 'CET', - ranges: [ - { - to: '2016/02/01' - }, - { - from: '2016/02/01', - to: 'now/d' - }, - { - from: 'now/d' - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/902cfd5aeec2f65b3adf55f5e38b21f0.asciidoc b/docs/examples/guide/902cfd5aeec2f65b3adf55f5e38b21f0.asciidoc deleted file mode 100644 index 31de8448f8..0000000000 --- a/docs/examples/guide/902cfd5aeec2f65b3adf55f5e38b21f0.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'kibana_sample_data_ecommerce2', - body: { - user: 'kimchy' - } -) -puts response ----- diff --git a/docs/examples/guide/9054187cbab5c9e1c4ca2a4dba6a5db0.asciidoc b/docs/examples/guide/9054187cbab5c9e1c4ca2a4dba6a5db0.asciidoc deleted file mode 100644 index c713f3d9cb..0000000000 --- a/docs/examples/guide/9054187cbab5c9e1c4ca2a4dba6a5db0.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.xpack.info -puts response ----- diff --git a/docs/examples/guide/90631797c7fbda43902abf2cc0ea8304.asciidoc b/docs/examples/guide/90631797c7fbda43902abf2cc0ea8304.asciidoc deleted file mode 100644 index 4dc5c243a1..0000000000 --- a/docs/examples/guide/90631797c7fbda43902abf2cc0ea8304.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - metric: 'indices', - index_metric: 'request_cache', - human: true -) -puts response ----- diff --git a/docs/examples/guide/909a032a9c1f7095b798444705b09ad6.asciidoc b/docs/examples/guide/909a032a9c1f7095b798444705b09ad6.asciidoc deleted file mode 100644 index 48852d5949..0000000000 --- a/docs/examples/guide/909a032a9c1f7095b798444705b09ad6.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'GEOMETRYCOLLECTION (POINT (100.0 0.0), LINESTRING (101.0 0.0, 102.0 1.0))' - } -) -puts response ----- diff --git a/docs/examples/guide/90e06d5ec5e454832d8fbd2e73ec2248.asciidoc b/docs/examples/guide/90e06d5ec5e454832d8fbd2e73ec2248.asciidoc deleted file mode 100644 index 38d5e86a28..0000000000 --- a/docs/examples/guide/90e06d5ec5e454832d8fbd2e73ec2248.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.autoscaling.delete_autoscaling_policy( - name: '*' -) -puts response ----- diff --git a/docs/examples/guide/911c56114e50ce7440eb83efc91d28b8.asciidoc b/docs/examples/guide/911c56114e50ce7440eb83efc91d28b8.asciidoc deleted file mode 100644 index aedbbf8c93..0000000000 --- a/docs/examples/guide/911c56114e50ce7440eb83efc91d28b8.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-data-stream', - body: { - properties: { - host: { - properties: { - ip: { - type: 'ip', - ignore_malformed: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9120b6a49ec39a1571339fddf8e1a26f.asciidoc b/docs/examples/guide/9120b6a49ec39a1571339fddf8e1a26f.asciidoc deleted file mode 100644 index 4296aea0a8..0000000000 --- a/docs/examples/guide/9120b6a49ec39a1571339fddf8e1a26f.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - processors: [ - { - set: { - field: 'my-long-field', - value: 10 - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/91270cef57ac455547ffd47839420887.asciidoc b/docs/examples/guide/91270cef57ac455547ffd47839420887.asciidoc deleted file mode 100644 index a4f244fecc..0000000000 --- a/docs/examples/guide/91270cef57ac455547ffd47839420887.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - filter_path: 'aggregations', - size: 0, - body: { - aggregations: { - buckets: { - composite: { - sources: [ - { - month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - } - } - }, - { - type: { - terms: { - field: 'type' - } - } - } - ] - }, - aggregations: { - avg_price: { - rate: { - field: 'price', - unit: 'day' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9129dec88d35571b3166c6677297f03b.asciidoc b/docs/examples/guide/9129dec88d35571b3166c6677297f03b.asciidoc deleted file mode 100644 index 92d476bbb1..0000000000 --- a/docs/examples/guide/9129dec88d35571b3166c6677297f03b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.transform.get_transform( - transform_id: 'ecommerce_transform1' -) -puts response ----- diff --git a/docs/examples/guide/9138550002cb26ab64918cce427963b8.asciidoc b/docs/examples/guide/9138550002cb26ab64918cce427963b8.asciidoc deleted file mode 100644 index 4d6f04e9d3..0000000000 --- a/docs/examples/guide/9138550002cb26ab64918cce427963b8.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'template_1', - body: { - index_patterns: [ - 'foo', - 'bar' - ], - priority: 0, - template: { - settings: { - number_of_shards: 1 - } - }, - version: 123 - } -) -puts response ----- diff --git a/docs/examples/guide/913c163c197802078a8af72150178061.asciidoc b/docs/examples/guide/913c163c197802078a8af72150178061.asciidoc deleted file mode 100644 index b820343407..0000000000 --- a/docs/examples/guide/913c163c197802078a8af72150178061.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - }, - sales_deriv: { - derivative: { - buckets_path: 'sales' - } - }, - "sales_2nd_deriv": { - derivative: { - buckets_path: 'sales_deriv' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/91750571c195718f0ff246e058e4bc63.asciidoc b/docs/examples/guide/91750571c195718f0ff246e058e4bc63.asciidoc deleted file mode 100644 index b04976e473..0000000000 --- a/docs/examples/guide/91750571c195718f0ff246e058e4bc63.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'twitter', - body: { - query: { - match: { - title: 'elasticsearch' - } - }, - sort: [ - { - date: 'asc' - }, - { - tie_breaker_id: 'asc' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/91c01fcad9bf341d039a15dfc593dcd7.asciidoc b/docs/examples/guide/91c01fcad9bf341d039a15dfc593dcd7.asciidoc deleted file mode 100644 index 5ce14befac..0000000000 --- a/docs/examples/guide/91c01fcad9bf341d039a15dfc593dcd7.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.field_caps( - index: 'my-index-*', - fields: 'rating', - body: { - index_filter: { - range: { - "@timestamp": { - gte: '2018' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/91cbeeda86b4e4e393fc79d4e3a4a781.asciidoc b/docs/examples/guide/91cbeeda86b4e4e393fc79d4e3a4a781.asciidoc deleted file mode 100644 index a36988c8f4..0000000000 --- a/docs/examples/guide/91cbeeda86b4e4e393fc79d4e3a4a781.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'stackoverflow', - size: 0, - body: { - query: { - query_string: { - query: 'tags:kibana OR tags:javascript' - } - }, - aggregations: { - low_quality_keywords: { - significant_terms: { - field: 'tags', - size: 3, - exclude: [ - 'kibana', - 'javascript' - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9200ed8d5f798a158def4c526e41269e.asciidoc b/docs/examples/guide/9200ed8d5f798a158def4c526e41269e.asciidoc deleted file mode 100644 index 5666db073e..0000000000 --- a/docs/examples/guide/9200ed8d5f798a158def4c526e41269e.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.field_caps( - index: 'my-index-000001', - fields: 'rating' -) -puts response ----- diff --git a/docs/examples/guide/92035a2a62d01a511662af65606d5fc6.asciidoc b/docs/examples/guide/92035a2a62d01a511662af65606d5fc6.asciidoc deleted file mode 100644 index fcb48e6eef..0000000000 --- a/docs/examples/guide/92035a2a62d01a511662af65606d5fc6.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - bucket_truncate: { - bucket_sort: { - from: 1, - size: 1 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9216e8e544e6d193eda1f59e9160a225.asciidoc b/docs/examples/guide/9216e8e544e6d193eda1f59e9160a225.asciidoc deleted file mode 100644 index 82ca9620b1..0000000000 --- a/docs/examples/guide/9216e8e544e6d193eda1f59e9160a225.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - span_near: { - clauses: [ - { - span_term: { - field: 'value1' - } - }, - { - span_term: { - field: 'value2' - } - }, - { - span_term: { - field: 'value3' - } - } - ], - slop: 12, - in_order: false - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/922529276f87cb9d116be2468d108466.asciidoc b/docs/examples/guide/922529276f87cb9d116be2468d108466.asciidoc deleted file mode 100644 index b00ec9f14d..0000000000 --- a/docs/examples/guide/922529276f87cb9d116be2468d108466.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - default: { - type: 'simple' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9225841fdcddaf83ebdb90c2b0399e20.asciidoc b/docs/examples/guide/9225841fdcddaf83ebdb90c2b0399e20.asciidoc deleted file mode 100644 index e4eff28279..0000000000 --- a/docs/examples/guide/9225841fdcddaf83ebdb90c2b0399e20.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_trained_models_stats -puts response ----- diff --git a/docs/examples/guide/92284d24bbb80ce6943f2ddcbf74b833.asciidoc b/docs/examples/guide/92284d24bbb80ce6943f2ddcbf74b833.asciidoc deleted file mode 100644 index ede540f512..0000000000 --- a/docs/examples/guide/92284d24bbb80ce6943f2ddcbf74b833.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - flattened_field: { - type: 'flattened' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - flattened_field: { - subfield: 'value' - } - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - fields: [ - 'flattened_field.subfield' - ], - _source: false - } -) -puts response ----- diff --git a/docs/examples/guide/923aee95078219ee6eb321a252e1121b.asciidoc b/docs/examples/guide/923aee95078219ee6eb321a252e1121b.asciidoc deleted file mode 100644 index 8e2236a4f8..0000000000 --- a/docs/examples/guide/923aee95078219ee6eb321a252e1121b.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'ngram_example', - body: { - settings: { - analysis: { - analyzer: { - standard_ngram: { - tokenizer: 'standard', - filter: [ - 'ngram' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/926c0134aeaad53bd0f3bdad9c430217.asciidoc b/docs/examples/guide/926c0134aeaad53bd0f3bdad9c430217.asciidoc deleted file mode 100644 index 0b0cb865aa..0000000000 --- a/docs/examples/guide/926c0134aeaad53bd0f3bdad9c430217.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - text: 'words words', - flag: 'foo' - } -) -puts response ----- diff --git a/docs/examples/guide/9270964d35d172ea5b193c5fc7a473dd.asciidoc b/docs/examples/guide/9270964d35d172ea5b193c5fc7a473dd.asciidoc deleted file mode 100644 index a7deac2363..0000000000 --- a/docs/examples/guide/9270964d35d172ea5b193c5fc7a473dd.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.templates( - name: 'my-template-*', - v: true, - s: 'name' -) -puts response ----- diff --git a/docs/examples/guide/9298aaf8232a819e79b3bf8471245e98.asciidoc b/docs/examples/guide/9298aaf8232a819e79b3bf8471245e98.asciidoc deleted file mode 100644 index 82a2849e88..0000000000 --- a/docs/examples/guide/9298aaf8232a819e79b3bf8471245e98.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_job_stats( - job_id: 'low_request_rate' -) -puts response ----- diff --git a/docs/examples/guide/92d0c12d53a900308150d572c3f2f82f.asciidoc b/docs/examples/guide/92d0c12d53a900308150d572c3f2f82f.asciidoc deleted file mode 100644 index e96ca08e82..0000000000 --- a/docs/examples/guide/92d0c12d53a900308150d572c3f2f82f.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_templates: [ - { - strings_as_keywords: { - match_mapping_type: 'string', - mapping: { - type: 'keyword' - } - } - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/92d343eb755971c44a939d0660bf5ac2.asciidoc b/docs/examples/guide/92d343eb755971c44a939d0660bf5ac2.asciidoc deleted file mode 100644 index 2810b67022..0000000000 --- a/docs/examples/guide/92d343eb755971c44a939d0660bf5ac2.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'test', - id: 1, - refresh: true, - body: { - test: 'test' - } -) -puts response - -response = client.index( - index: 'test', - id: 2, - refresh: true, - body: { - test: 'test' - } -) -puts response ----- diff --git a/docs/examples/guide/92f073762634a4b2274f71002494192e.asciidoc b/docs/examples/guide/92f073762634a4b2274f71002494192e.asciidoc deleted file mode 100644 index 6b01055ce4..0000000000 --- a/docs/examples/guide/92f073762634a4b2274f71002494192e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.state( - filter_path: 'metadata.cluster_coordination.voting_config_exclusions' -) -puts response ----- diff --git a/docs/examples/guide/92fe53019958ba466d1272da0834cf53.asciidoc b/docs/examples/guide/92fe53019958ba466d1272da0834cf53.asciidoc deleted file mode 100644 index 8ef73919ad..0000000000 --- a/docs/examples/guide/92fe53019958ba466d1272da0834cf53.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.stats( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/930ba37af73dd5ff0342ecfe6c60a4e9.asciidoc b/docs/examples/guide/930ba37af73dd5ff0342ecfe6c60a4e9.asciidoc deleted file mode 100644 index 15ca6a0d77..0000000000 --- a/docs/examples/guide/930ba37af73dd5ff0342ecfe6c60a4e9.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'exams', - body: { - size: 0, - aggregations: { - grades_stats: { - extended_stats: { - field: 'grade' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/931da02a06953a768f4ad3fecfd7b2df.asciidoc b/docs/examples/guide/931da02a06953a768f4ad3fecfd7b2df.asciidoc deleted file mode 100644 index 2091af3bb6..0000000000 --- a/docs/examples/guide/931da02a06953a768f4ad3fecfd7b2df.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_settings( - index: 'my-index-000001', - name: 'index.routing.allocation.total_shards_per_node', - flat_settings: true -) -puts response ----- diff --git a/docs/examples/guide/9334ccd09548b585cd637d7c66c5ae65.asciidoc b/docs/examples/guide/9334ccd09548b585cd637d7c66c5ae65.asciidoc deleted file mode 100644 index 37cf1eb00b..0000000000 --- a/docs/examples/guide/9334ccd09548b585cd637d7c66c5ae65.asciidoc +++ /dev/null @@ -1,48 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - message: { - operator: 'or', - query: 'the quick brown' - } - } - }, - rescore: [ - { - window_size: 100, - query: { - rescore_query: { - match_phrase: { - message: { - query: 'the quick brown', - slop: 2 - } - } - }, - query_weight: 0.7, - rescore_query_weight: 1.2 - } - }, - { - window_size: 10, - query: { - score_mode: 'multiply', - rescore_query: { - function_score: { - script_score: { - script: { - source: 'Math.log10(doc.count.value + 2)' - } - } - } - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/93429d2bfbc0a9b7a4854b27e34658cf.asciidoc b/docs/examples/guide/93429d2bfbc0a9b7a4854b27e34658cf.asciidoc deleted file mode 100644 index c1270d8096..0000000000 --- a/docs/examples/guide/93429d2bfbc0a9b7a4854b27e34658cf.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - message: { - type: 'text' - }, - query: { - type: 'percolator' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/93444b445446c1a6033347d6267253d6.asciidoc b/docs/examples/guide/93444b445446c1a6033347d6267253d6.asciidoc deleted file mode 100644 index ed9ba13fd1..0000000000 --- a/docs/examples/guide/93444b445446c1a6033347d6267253d6.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match_phrase_prefix: { - message: { - query: 'quick brown f' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/934aa38c3adcc4cf74ea40cd8736876c.asciidoc b/docs/examples/guide/934aa38c3adcc4cf74ea40cd8736876c.asciidoc deleted file mode 100644 index 00f44c06a3..0000000000 --- a/docs/examples/guide/934aa38c3adcc4cf74ea40cd8736876c.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - settings: { - number_of_shards: 1 - }, - mappings: { - properties: { - "field1": { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/934ced0998552cc95a28e48554147e8b.asciidoc b/docs/examples/guide/934ced0998552cc95a28e48554147e8b.asciidoc deleted file mode 100644 index db10fed87d..0000000000 --- a/docs/examples/guide/934ced0998552cc95a28e48554147e8b.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.cluster.allocation_explain( - body: { - index: 'my-index', - shard: 0, - primary: false, - current_node: 'my-node' - } -) -puts response ----- diff --git a/docs/examples/guide/935ee7c1b86ba9592604834bb673c7a3.asciidoc b/docs/examples/guide/935ee7c1b86ba9592604834bb673c7a3.asciidoc deleted file mode 100644 index f7d408c250..0000000000 --- a/docs/examples/guide/935ee7c1b86ba9592604834bb673c7a3.asciidoc +++ /dev/null @@ -1,94 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'museums', - body: { - mappings: { - properties: { - location: { - type: 'geo_point' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'museums', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - location: 'POINT (4.912350 52.374081)', - name: 'NEMO Science Museum' - }, - { - index: { - _id: 2 - } - }, - { - location: 'POINT (4.901618 52.369219)', - name: 'Museum Het Rembrandthuis' - }, - { - index: { - _id: 3 - } - }, - { - location: 'POINT (4.914722 52.371667)', - name: 'Nederlands Scheepvaartmuseum' - }, - { - index: { - _id: 4 - } - }, - { - location: 'POINT (4.405200 51.222900)', - name: 'Letterenhuis' - }, - { - index: { - _id: 5 - } - }, - { - location: 'POINT (2.336389 48.861111)', - name: 'Musée du Louvre' - }, - { - index: { - _id: 6 - } - }, - { - location: 'POINT (2.327000 48.860000)', - name: "Musée d'Orsay" - } - ] -) -puts response - -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - "large-grid": { - geotile_grid: { - field: 'location', - precision: 8 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/936d809c848f8b77d5b55f57f0aab89a.asciidoc b/docs/examples/guide/936d809c848f8b77d5b55f57f0aab89a.asciidoc deleted file mode 100644 index a972ed9f77..0000000000 --- a/docs/examples/guide/936d809c848f8b77d5b55f57f0aab89a.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - date_detection: false - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - create_date: '2015/09/02' - } -) -puts response ----- diff --git a/docs/examples/guide/9370e4935ab6678571d3227973b8c830.asciidoc b/docs/examples/guide/9370e4935ab6678571d3227973b8c830.asciidoc deleted file mode 100644 index 37864bbb7b..0000000000 --- a/docs/examples/guide/9370e4935ab6678571d3227973b8c830.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get( - index: '_all', - filter_path: '*.aliases' -) -puts response ----- diff --git a/docs/examples/guide/937ffc65cbb20505a8aba25b37a796a5.asciidoc b/docs/examples/guide/937ffc65cbb20505a8aba25b37a796a5.asciidoc deleted file mode 100644 index 605eef3936..0000000000 --- a/docs/examples/guide/937ffc65cbb20505a8aba25b37a796a5.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - is_published: { - type: 'boolean' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - is_published: 'true' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - term: { - is_published: true - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9382f022086c692ba05efb0acae65946.asciidoc b/docs/examples/guide/9382f022086c692ba05efb0acae65946.asciidoc deleted file mode 100644 index 77df089cfb..0000000000 --- a/docs/examples/guide/9382f022086c692ba05efb0acae65946.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'idx', - id: 1, - body: { - foo: [ - { - bar: 1 - }, - { - bar: 2 - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/9399cbbd133ec2b7aad2820fa617ae3a.asciidoc b/docs/examples/guide/9399cbbd133ec2b7aad2820fa617ae3a.asciidoc deleted file mode 100644 index e6cf505466..0000000000 --- a/docs/examples/guide/9399cbbd133ec2b7aad2820fa617ae3a.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'child_example', - body: { - mappings: { - properties: { - join: { - type: 'join', - relations: { - question: 'answer' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/93bd651aff81daa2b86f9f2089e6d088.asciidoc b/docs/examples/guide/93bd651aff81daa2b86f9f2089e6d088.asciidoc deleted file mode 100644 index 058c32ae08..0000000000 --- a/docs/examples/guide/93bd651aff81daa2b86f9f2089e6d088.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - my_id: '1', - text: 'This is a question', - my_join_field: { - name: 'question' - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - refresh: true, - body: { - my_id: '2', - text: 'This is another question', - my_join_field: { - name: 'question' - } - } -) -puts response ----- diff --git a/docs/examples/guide/93cca1eb4d9ee4c65ab259e18469d9d6.asciidoc b/docs/examples/guide/93cca1eb4d9ee4c65ab259e18469d9d6.asciidoc deleted file mode 100644 index 10d98fe292..0000000000 --- a/docs/examples/guide/93cca1eb4d9ee4c65ab259e18469d9d6.asciidoc +++ /dev/null @@ -1,91 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'example-index', - body: { - mappings: { - properties: { - text: { - type: 'text' - }, - vector: { - type: 'dense_vector', - dims: 1, - index: true, - similarity: 'l2_norm' - }, - integer: { - type: 'integer' - } - } - } - } -) -puts response - -response = client.index( - index: 'example-index', - id: 1, - body: { - text: 'rrf', - vector: [ - 5 - ], - integer: 1 - } -) -puts response - -response = client.index( - index: 'example-index', - id: 2, - body: { - text: 'rrf rrf', - vector: [ - 4 - ], - integer: 2 - } -) -puts response - -response = client.index( - index: 'example-index', - id: 3, - body: { - text: 'rrf rrf rrf', - vector: [ - 3 - ], - integer: 1 - } -) -puts response - -response = client.index( - index: 'example-index', - id: 4, - body: { - text: 'rrf rrf rrf rrf', - integer: 2 - } -) -puts response - -response = client.index( - index: 'example-index', - id: 5, - body: { - vector: [ - 0 - ], - integer: 1 - } -) -puts response - -response = client.indices.refresh( - index: 'example-index' -) -puts response ----- diff --git a/docs/examples/guide/93cd0fdd5ca22838db06aa1cabdbe8bd.asciidoc b/docs/examples/guide/93cd0fdd5ca22838db06aa1cabdbe8bd.asciidoc deleted file mode 100644 index 6c8e28514c..0000000000 --- a/docs/examples/guide/93cd0fdd5ca22838db06aa1cabdbe8bd.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'hugging-face-embeddings', - body: { - knn: { - field: 'content_embedding', - query_vector_builder: { - text_embedding: { - model_id: 'hugging_face_embeddings', - model_text: "What's margin of error?" - } - }, - k: 10, - num_candidates: 100 - }, - _source: [ - 'id', - 'content' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/93d7ba4130722cae04f9690e52a8f54f.asciidoc b/docs/examples/guide/93d7ba4130722cae04f9690e52a8f54f.asciidoc deleted file mode 100644 index fc118e7869..0000000000 --- a/docs/examples/guide/93d7ba4130722cae04f9690e52a8f54f.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'envelope', - coordinates: [ - [ - 100, - 1 - ], - [ - 101, - 0 - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/93fb59d3204f37af952198b331fb6bb7.asciidoc b/docs/examples/guide/93fb59d3204f37af952198b331fb6bb7.asciidoc deleted file mode 100644 index 1e71d6a6bd..0000000000 --- a/docs/examples/guide/93fb59d3204f37af952198b331fb6bb7.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.tasks.get( - task_id: 'oTUltX4IQMOUUVeiohTt8A:12345', - wait_for_completion: true, - timeout: '10s' -) -puts response ----- diff --git a/docs/examples/guide/9403764e6eccad7b321b65e9a10c5727.asciidoc b/docs/examples/guide/9403764e6eccad7b321b65e9a10c5727.asciidoc deleted file mode 100644 index 2d68ca059e..0000000000 --- a/docs/examples/guide/9403764e6eccad7b321b65e9a10c5727.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - tags: { - terms: { - field: 'tags', - include: '.*sport.*', - exclude: 'water_.*' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/940e8c2c7ff92d71f489bdb7183c1ce6.asciidoc b/docs/examples/guide/940e8c2c7ff92d71f489bdb7183c1ce6.asciidoc deleted file mode 100644 index 24a1f23f37..0000000000 --- a/docs/examples/guide/940e8c2c7ff92d71f489bdb7183c1ce6.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.segments( - index: 'test' -) -puts response ----- diff --git a/docs/examples/guide/941c8d05486200e835d97642e4ee05d5.asciidoc b/docs/examples/guide/941c8d05486200e835d97642e4ee05d5.asciidoc deleted file mode 100644 index d6fb7774a5..0000000000 --- a/docs/examples/guide/941c8d05486200e835d97642e4ee05d5.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - text: { - type: 'text', - term_vector: 'with_positions_offsets_payloads', - store: true, - analyzer: 'fulltext_analyzer' - }, - fullname: { - type: 'text', - term_vector: 'with_positions_offsets_payloads', - analyzer: 'fulltext_analyzer' - } - } - }, - settings: { - index: { - number_of_shards: 1, - number_of_replicas: 0 - }, - analysis: { - analyzer: { - fulltext_analyzer: { - type: 'custom', - tokenizer: 'whitespace', - filter: [ - 'lowercase', - 'type_as_payload' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/94246f45025ed394cd6415ed8d7a0588.asciidoc b/docs/examples/guide/94246f45025ed394cd6415ed8d7a0588.asciidoc deleted file mode 100644 index 42e7b47f60..0000000000 --- a/docs/examples/guide/94246f45025ed394cd6415ed8d7a0588.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.rollup.delete_job( - id: 'sensor' -) -puts response ----- diff --git a/docs/examples/guide/944806221eb89f5af2298ccdf2902277.asciidoc b/docs/examples/guide/944806221eb89f5af2298ccdf2902277.asciidoc deleted file mode 100644 index 5a1d010baf..0000000000 --- a/docs/examples/guide/944806221eb89f5af2298ccdf2902277.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.rollup.get_rollup_caps( - id: '_all' -) -puts response ----- diff --git a/docs/examples/guide/944a2dc22dae2a8503299926326a9c18.asciidoc b/docs/examples/guide/944a2dc22dae2a8503299926326a9c18.asciidoc deleted file mode 100644 index b78ee56bc4..0000000000 --- a/docs/examples/guide/944a2dc22dae2a8503299926326a9c18.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - ip_addr: { - type: 'ip' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - ip_addr: '192.168.1.1' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - term: { - ip_addr: '192.168.0.0/16' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/946522c26d02bebf5c527ba28e55c724.asciidoc b/docs/examples/guide/946522c26d02bebf5c527ba28e55c724.asciidoc deleted file mode 100644 index 281a29f442..0000000000 --- a/docs/examples/guide/946522c26d02bebf5c527ba28e55c724.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'my-index-000001', - routing: 1 -) -puts response ----- diff --git a/docs/examples/guide/9467e52087a13b63b02d78c35ff6f798.asciidoc b/docs/examples/guide/9467e52087a13b63b02d78c35ff6f798.asciidoc deleted file mode 100644 index 446b678ff0..0000000000 --- a/docs/examples/guide/9467e52087a13b63b02d78c35ff6f798.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match_phrase: { - message: 'this is a test' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/94cd66bf93f99881c1bda547283a0357.asciidoc b/docs/examples/guide/94cd66bf93f99881c1bda547283a0357.asciidoc deleted file mode 100644 index 2373173148..0000000000 --- a/docs/examples/guide/94cd66bf93f99881c1bda547283a0357.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'quantized-image-index', - refresh: true, - body: [ - { - index: { - _id: '1' - } - }, - { - "image-vector": [ - 0.1, - -2 - ], - title: 'moose family' - }, - { - index: { - _id: '2' - } - }, - { - "image-vector": [ - 0.75, - -1 - ], - title: 'alpine lake' - }, - { - index: { - _id: '3' - } - }, - { - "image-vector": [ - 1.2, - 0.1 - ], - title: 'full moon' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/9501e6c8e95c21838653ea15b9b7ed5f.asciidoc b/docs/examples/guide/9501e6c8e95c21838653ea15b9b7ed5f.asciidoc deleted file mode 100644 index b8bf89c539..0000000000 --- a/docs/examples/guide/9501e6c8e95c21838653ea15b9b7ed5f.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - term: { - 'query.extraction_result' => 'failed' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/950f1230536422567f99a205ff4165ec.asciidoc b/docs/examples/guide/950f1230536422567f99a205ff4165ec.asciidoc deleted file mode 100644 index e2dd3d5620..0000000000 --- a/docs/examples/guide/950f1230536422567f99a205ff4165ec.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.rollover( - alias: 'my-write-alias', - body: { - conditions: { - max_age: '7d', - max_docs: 1000, - max_primary_shard_size: '50gb', - max_primary_shard_docs: '2000' - } - } -) -puts response ----- diff --git a/docs/examples/guide/95414139c7b1203e3c2d99a354415801.asciidoc b/docs/examples/guide/95414139c7b1203e3c2d99a354415801.asciidoc deleted file mode 100644 index c04106447e..0000000000 --- a/docs/examples/guide/95414139c7b1203e3c2d99a354415801.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.recovery( - v: true -) -puts response ----- diff --git a/docs/examples/guide/9559de0c2190f99fcc344887fc7b232a.asciidoc b/docs/examples/guide/9559de0c2190f99fcc344887fc7b232a.asciidoc deleted file mode 100644 index d7e9360c5c..0000000000 --- a/docs/examples/guide/9559de0c2190f99fcc344887fc7b232a.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'bicycles', - body: { - mappings: { - properties: { - cycle_type: { - type: 'constant_keyword', - value: 'bicycle' - }, - name: { - type: 'text' - } - } - } - } -) -puts response - -response = client.indices.create( - index: 'other_cycles', - body: { - mappings: { - properties: { - cycle_type: { - type: 'keyword' - }, - name: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/956cb470258024af964cd2dabbaf7c7c.asciidoc b/docs/examples/guide/956cb470258024af964cd2dabbaf7c7c.asciidoc deleted file mode 100644 index 97b8b27b64..0000000000 --- a/docs/examples/guide/956cb470258024af964cd2dabbaf7c7c.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index', - body: { - 'index.routing.allocation.require.data' => nil, - 'index.routing.allocation.include._tier_preference' => 'data_warm,data_hot' - } -) -puts response ----- diff --git a/docs/examples/guide/957d2e6ddbb9a9b16549c5e67b93b41b.asciidoc b/docs/examples/guide/957d2e6ddbb9a9b16549c5e67b93b41b.asciidoc deleted file mode 100644 index a58086240b..0000000000 --- a/docs/examples/guide/957d2e6ddbb9a9b16549c5e67b93b41b.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - fields: [ - 'content', - 'name' - ], - query: 'this AND that' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/95b3f53f2065737bbeba6199e8a12df3.asciidoc b/docs/examples/guide/95b3f53f2065737bbeba6199e8a12df3.asciidoc deleted file mode 100644 index 770917a30a..0000000000 --- a/docs/examples/guide/95b3f53f2065737bbeba6199e8a12df3.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - color: [ - 'blue', - 'green' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/95c03bdef4faf6bef039c986f4cb3aba.asciidoc b/docs/examples/guide/95c03bdef4faf6bef039c986f4cb3aba.asciidoc deleted file mode 100644 index 89264f02cf..0000000000 --- a/docs/examples/guide/95c03bdef4faf6bef039c986f4cb3aba.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: '.watcher-history*', - pretty: true, - body: { - query: { - match: { - 'result.condition.met' => true - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9606c271921cb800d5ea395b16d6ceaf.asciidoc b/docs/examples/guide/9606c271921cb800d5ea395b16d6ceaf.asciidoc deleted file mode 100644 index f2dc07a7df..0000000000 --- a/docs/examples/guide/9606c271921cb800d5ea395b16d6ceaf.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'galician_example', - body: { - settings: { - analysis: { - filter: { - galician_stop: { - type: 'stop', - stopwords: '_galician_' - }, - galician_keywords: { - type: 'keyword_marker', - keywords: [ - 'exemplo' - ] - }, - galician_stemmer: { - type: 'stemmer', - language: 'galician' - } - }, - analyzer: { - rebuilt_galician: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'galician_stop', - 'galician_keywords', - 'galician_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/966ff3a4c5b61ed1a36d44c17ce06157.asciidoc b/docs/examples/guide/966ff3a4c5b61ed1a36d44c17ce06157.asciidoc deleted file mode 100644 index 3cdc6e9f09..0000000000 --- a/docs/examples/guide/966ff3a4c5b61ed1a36d44c17ce06157.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index', - body: { - settings: { - analysis: { - char_filter: { - quote: { - type: 'mapping', - mappings: [ - '« => "', - '» => "' - ] - } - }, - normalizer: { - my_normalizer: { - type: 'custom', - char_filter: [ - 'quote' - ], - filter: [ - 'lowercase', - 'asciifolding' - ] - } - } - } - }, - mappings: { - properties: { - foo: { - type: 'keyword', - normalizer: 'my_normalizer' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/96b9289c3c4c6b135ab3386562c4ee8d.asciidoc b/docs/examples/guide/96b9289c3c4c6b135ab3386562c4ee8d.asciidoc deleted file mode 100644 index 7f7016e5c3..0000000000 --- a/docs/examples/guide/96b9289c3c4c6b135ab3386562c4ee8d.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.max_shards_per_node' => 1200 - } - } -) -puts response ----- diff --git a/docs/examples/guide/96e137e42d12c180e2c702db30714a9e.asciidoc b/docs/examples/guide/96e137e42d12c180e2c702db30714a9e.asciidoc deleted file mode 100644 index b4792bf26b..0000000000 --- a/docs/examples/guide/96e137e42d12c180e2c702db30714a9e.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - full_name: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/96ea0e80323d6d2d99964625c004a44d.asciidoc b/docs/examples/guide/96ea0e80323d6d2d99964625c004a44d.asciidoc deleted file mode 100644 index 3d89ed2f22..0000000000 --- a/docs/examples/guide/96ea0e80323d6d2d99964625c004a44d.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_data_lifecycle( - name: 'dsl-data-stream', - body: { - data_retention: '7d', - enabled: false - } -) -puts response ----- diff --git a/docs/examples/guide/971c7a36ee79f2b3aa82c64ea338de70.asciidoc b/docs/examples/guide/971c7a36ee79f2b3aa82c64ea338de70.asciidoc deleted file mode 100644 index 9157097eea..0000000000 --- a/docs/examples/guide/971c7a36ee79f2b3aa82c64ea338de70.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index', - body: { - mappings: { - properties: { - foo: { - type: 'keyword', - eager_global_ordinals: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc b/docs/examples/guide/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc deleted file mode 100644 index a26d9fc341..0000000000 --- a/docs/examples/guide/973a3ff47fc4ce036ecd9bd363fef9f7.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'metricbeat-*' - }, - dest: { - index: 'metricbeat' - }, - script: { - lang: 'painless', - source: "ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'" - } - } -) -puts response ----- diff --git a/docs/examples/guide/975b4b92464d52068516aa2f0f955cc1.asciidoc b/docs/examples/guide/975b4b92464d52068516aa2f0f955cc1.asciidoc deleted file mode 100644 index 7a2de8caa1..0000000000 --- a/docs/examples/guide/975b4b92464d52068516aa2f0f955cc1.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.segments( - index: 'test1,test2' -) -puts response ----- diff --git a/docs/examples/guide/97916243f245478b735471a9e37f33d1.asciidoc b/docs/examples/guide/97916243f245478b735471a9e37f33d1.asciidoc deleted file mode 100644 index 177c007531..0000000000 --- a/docs/examples/guide/97916243f245478b735471a9e37f33d1.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'ip_addresses', - body: { - size: 10, - aggregations: { - ip_ranges: { - ip_range: { - field: 'ip', - ranges: [ - { - to: '10.0.0.5' - }, - { - from: '10.0.0.5' - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/97ae2b62aa372a955278be6f660356ba.asciidoc b/docs/examples/guide/97ae2b62aa372a955278be6f660356ba.asciidoc deleted file mode 100644 index 56c15c520b..0000000000 --- a/docs/examples/guide/97ae2b62aa372a955278be6f660356ba.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - combined_fields: { - query: 'distributed consensus', - fields: [ - 'title^2', - 'body' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/97babc8d19ef0866774576716eb6d19e.asciidoc b/docs/examples/guide/97babc8d19ef0866774576716eb6d19e.asciidoc deleted file mode 100644 index fdcbfb63e9..0000000000 --- a/docs/examples/guide/97babc8d19ef0866774576716eb6d19e.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'test', - refresh: true, - conflicts: 'proceed' -) -puts response - -response = client.search( - index: 'test', - filter_path: 'hits.total', - body: { - query: { - match: { - flag: 'foo' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/97da68c09c9f1a97a21780fd404e213a.asciidoc b/docs/examples/guide/97da68c09c9f1a97a21780fd404e213a.asciidoc deleted file mode 100644 index 1d65666717..0000000000 --- a/docs/examples/guide/97da68c09c9f1a97a21780fd404e213a.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'network-traffic', - body: { - size: 0, - aggregations: { - "ipv4-subnets": { - ip_prefix: { - field: 'ipv4', - prefix_length: 24, - append_prefix_length: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/97ea5ab17213cb1faaf6f3ea13607098.asciidoc b/docs/examples/guide/97ea5ab17213cb1faaf6f3ea13607098.asciidoc deleted file mode 100644 index b0c7c5d323..0000000000 --- a/docs/examples/guide/97ea5ab17213cb1faaf6f3ea13607098.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.watcher.start -puts response ----- diff --git a/docs/examples/guide/97f260817b60f3deb7f7034d7dee7e12.asciidoc b/docs/examples/guide/97f260817b60f3deb7f7034d7dee7e12.asciidoc deleted file mode 100644 index a95a997c8d..0000000000 --- a/docs/examples/guide/97f260817b60f3deb7f7034d7dee7e12.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - agg_metric: { - type: 'aggregate_metric_double', - metrics: [ - 'min', - 'max', - 'sum', - 'value_count' - ], - default_metric: 'max' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - agg_metric: { - min: -302.5, - max: 702.3, - sum: 200, - value_count: 25 - } - } -) -puts response ----- diff --git a/docs/examples/guide/97f5df84efec655f479fad78bc392d4d.asciidoc b/docs/examples/guide/97f5df84efec655f479fad78bc392d4d.asciidoc deleted file mode 100644 index e8d52a980f..0000000000 --- a/docs/examples/guide/97f5df84efec655f479fad78bc392d4d.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - profile: true, - query: { - term: { - 'user.id' => { - value: 'elkbee' - } - } - }, - aggregations: { - my_scoped_agg: { - terms: { - field: 'http.response.status_code' - } - }, - my_global_agg: { - global: {}, - aggregations: { - my_level_agg: { - terms: { - field: 'http.response.status_code' - } - } - } - } - }, - post_filter: { - match: { - message: 'search' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/983a867c90e63e070518f2f709f659ee.asciidoc b/docs/examples/guide/983a867c90e63e070518f2f709f659ee.asciidoc deleted file mode 100644 index 5a63bb619b..0000000000 --- a/docs/examples/guide/983a867c90e63e070518f2f709f659ee.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - card: { - type: 'wildcard' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - card: [ - 'king', - 'ace', - 'ace', - 'jack' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/983fbb78e57e8fe98db38cf2d217e943.asciidoc b/docs/examples/guide/983fbb78e57e8fe98db38cf2d217e943.asciidoc deleted file mode 100644 index 41a31c1d5d..0000000000 --- a/docs/examples/guide/983fbb78e57e8fe98db38cf2d217e943.asciidoc +++ /dev/null @@ -1,59 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - mappings: { - properties: { - comments: { - type: 'nested' - } - } - } - } -) -puts response - -response = client.index( - index: 'test', - id: 1, - refresh: true, - body: { - title: 'Test title', - comments: [ - { - author: 'kimchy', - text: 'comment text' - }, - { - author: 'nik9000', - text: 'words words words' - } - ] - } -) -puts response - -response = client.search( - index: 'test', - body: { - query: { - nested: { - path: 'comments', - query: { - match: { - 'comments.text' => 'words' - } - }, - inner_hits: { - _source: false, - docvalue_fields: [ - 'comments.text.keyword' - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9851f5225150bc032fb3b195cd447f4f.asciidoc b/docs/examples/guide/9851f5225150bc032fb3b195cd447f4f.asciidoc deleted file mode 100644 index 23b37172d7..0000000000 --- a/docs/examples/guide/9851f5225150bc032fb3b195cd447f4f.asciidoc +++ /dev/null @@ -1,46 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'byte-image-index', - refresh: true, - body: [ - { - index: { - _id: '1' - } - }, - { - "byte-image-vector": [ - 5, - -20 - ], - title: 'moose family' - }, - { - index: { - _id: '2' - } - }, - { - "byte-image-vector": [ - 8, - -15 - ], - title: 'alpine lake' - }, - { - index: { - _id: '3' - } - }, - { - "byte-image-vector": [ - 11, - 23 - ], - title: 'full moon' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/98574a419b6be603a0af8f7f22a92d23.asciidoc b/docs/examples/guide/98574a419b6be603a0af8f7f22a92d23.asciidoc deleted file mode 100644 index 0801b89181..0000000000 --- a/docs/examples/guide/98574a419b6be603a0af8f7f22a92d23.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ingest.processor_grok -puts response ----- diff --git a/docs/examples/guide/98855f4bda8726d5d123aeebf7869e47.asciidoc b/docs/examples/guide/98855f4bda8726d5d123aeebf7869e47.asciidoc deleted file mode 100644 index 48e839897b..0000000000 --- a/docs/examples/guide/98855f4bda8726d5d123aeebf7869e47.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodeattrs( - v: true -) -puts response ----- diff --git a/docs/examples/guide/9887f65af249bbf09190b1153ea2597b.asciidoc b/docs/examples/guide/9887f65af249bbf09190b1153ea2597b.asciidoc deleted file mode 100644 index da4e87579b..0000000000 --- a/docs/examples/guide/9887f65af249bbf09190b1153ea2597b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.sql.get_async_status( - id: 'FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=' -) -puts response ----- diff --git a/docs/examples/guide/98b403c356a9b14544e9b9f646845e9f.asciidoc b/docs/examples/guide/98b403c356a9b14544e9b9f646845e9f.asciidoc deleted file mode 100644 index a113257b59..0000000000 --- a/docs/examples/guide/98b403c356a9b14544e9b9f646845e9f.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.put_script( - id: 'my-search-template', - body: { - script: { - lang: 'mustache', - source: { - query: { - multi_match: { - query: '{{query_string}}', - fields: '[{{#text_fields}}{{user_name}}{{^last}},{{/last}}{{/text_fields}}]' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/98c1080d8630d3a18d564312300d020f.asciidoc b/docs/examples/guide/98c1080d8630d3a18d564312300d020f.asciidoc deleted file mode 100644 index e90672f650..0000000000 --- a/docs/examples/guide/98c1080d8630d3a18d564312300d020f.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - processors: [ - { - network_direction: { - internal_networks: [ - 'private' - ] - } - } - ] - }, - docs: [ - { - _source: { - source: { - ip: '128.232.110.120' - }, - destination: { - ip: '192.168.1.1' - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/98f43710cedd28a464e8abf4b09bcc9a.asciidoc b/docs/examples/guide/98f43710cedd28a464e8abf4b09bcc9a.asciidoc deleted file mode 100644 index fdd2ee6ef3..0000000000 --- a/docs/examples/guide/98f43710cedd28a464e8abf4b09bcc9a.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - range: { - "@timestamp": { - gte: 'now-1d/d', - lt: 'now/d' - } - } - }, - aggregations: { - "my-agg-name": { - terms: { - field: 'my-field' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/990c0d794ed6f05d1620b5d49f7aff6e.asciidoc b/docs/examples/guide/990c0d794ed6f05d1620b5d49f7aff6e.asciidoc deleted file mode 100644 index 1a8323c1ee..0000000000 --- a/docs/examples/guide/990c0d794ed6f05d1620b5d49f7aff6e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_data_lifecycle( - name: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/99160b7c3c3fc1fac98aeb426dbcb3cb.asciidoc b/docs/examples/guide/99160b7c3c3fc1fac98aeb426dbcb3cb.asciidoc deleted file mode 100644 index 200d68b55f..0000000000 --- a/docs/examples/guide/99160b7c3c3fc1fac98aeb426dbcb3cb.asciidoc +++ /dev/null @@ -1,45 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - first_name: { - type: 'text' - }, - last_name: { - type: 'text' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - first_name: 'Barry', - last_name: 'White' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - script_fields: { - full_name: { - script: { - lang: 'painless', - source: "params._source.first_name + ' ' + params._source.last_name" - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc b/docs/examples/guide/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc deleted file mode 100644 index 90467c2fbc..0000000000 --- a/docs/examples/guide/991b9ba53f0eccec8ec5a42f8d9b655c.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - highlight: { - fields: { - body: {}, - 'blog.title' => { - number_of_fragments: 0 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/99474a7e7979816c874aeac4403be5d0.asciidoc b/docs/examples/guide/99474a7e7979816c874aeac4403be5d0.asciidoc deleted file mode 100644 index 30e56258e9..0000000000 --- a/docs/examples/guide/99474a7e7979816c874aeac4403be5d0.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - by_date: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - avg_price: { - rate: { - field: 'price', - unit: 'day' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/996f320a0f537c24b9cd0d71b5f7c1f8.asciidoc b/docs/examples/guide/996f320a0f537c24b9cd0d71b5f7c1f8.asciidoc deleted file mode 100644 index 9d103e9f6d..0000000000 --- a/docs/examples/guide/996f320a0f537c24b9cd0d71b5f7c1f8.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - function_score: { - query: { - match: { - message: 'elasticsearch' - } - }, - script_score: { - script: { - params: { - a: 5, - b: 1.2 - }, - source: "params.a / Math.pow(params.b, doc['my-int'].value)" - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/998651b98e152add530084a631a4ab5a.asciidoc b/docs/examples/guide/998651b98e152add530084a631a4ab5a.asciidoc deleted file mode 100644 index a388fcf38a..0000000000 --- a/docs/examples/guide/998651b98e152add530084a631a4ab5a.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'indices.lifecycle.poll_interval' => '1m' - } - } -) -puts response ----- diff --git a/docs/examples/guide/99a56f423df3a0e57b7f20146f0d33b5.asciidoc b/docs/examples/guide/99a56f423df3a0e57b7f20146f0d33b5.asciidoc deleted file mode 100644 index cb2ed6da42..0000000000 --- a/docs/examples/guide/99a56f423df3a0e57b7f20146f0d33b5.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'logs', - body: { - mappings: { - properties: { - "@timestamp": { - type: 'date' - }, - message: { - type: 'match_only_text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/99b617a0a83fcfbe5755ccc724a4ce62.asciidoc b/docs/examples/guide/99b617a0a83fcfbe5755ccc724a4ce62.asciidoc deleted file mode 100644 index 8970b060ad..0000000000 --- a/docs/examples/guide/99b617a0a83fcfbe5755ccc724a4ce62.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'place_path_category', - id: 1, - body: { - suggest: [ - "timmy's", - 'starbucks', - 'dunkin donuts' - ], - cat: [ - 'cafe', - 'food' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/9a02bd47c000a3d9a8911233c37c890f.asciidoc b/docs/examples/guide/9a02bd47c000a3d9a8911233c37c890f.asciidoc deleted file mode 100644 index 1492dc8936..0000000000 --- a/docs/examples/guide/9a02bd47c000a3d9a8911233c37c890f.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - date: '2015-10-01T00:30:00Z' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - refresh: true, - body: { - date: '2015-10-01T01:30:00Z' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - size: 0, - body: { - aggregations: { - by_day: { - date_histogram: { - field: 'date', - calendar_interval: 'day' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9a036a792be1d39af9fd0d1adb5f3402.asciidoc b/docs/examples/guide/9a036a792be1d39af9fd0d1adb5f3402.asciidoc deleted file mode 100644 index d039800dfa..0000000000 --- a/docs/examples/guide/9a036a792be1d39af9fd0d1adb5f3402.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - { - type: 'keep', - keep_words: [ - 'dog', - 'elephant', - 'fox' - ] - } - ], - text: 'the quick fox jumps over the lazy dog' - } -) -puts response ----- diff --git a/docs/examples/guide/9a05cc10eea1251e23b82a4549913536.asciidoc b/docs/examples/guide/9a05cc10eea1251e23b82a4549913536.asciidoc deleted file mode 100644 index f089a33c3d..0000000000 --- a/docs/examples/guide/9a05cc10eea1251e23b82a4549913536.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.allocation( - v: true, - s: 'node', - h: 'node,shards,disk.percent,disk.indices,disk.used' -) -puts response ----- diff --git a/docs/examples/guide/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc b/docs/examples/guide/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc deleted file mode 100644 index 70760c333e..0000000000 --- a/docs/examples/guide/9a4d5e41c52c20635d1fd9c6e13f6c7a.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'metricbeat-2016.05.30', - id: 1, - refresh: true, - body: { - 'system.cpu.idle.pct' => 0.908 - } -) -puts response - -response = client.index( - index: 'metricbeat-2016.05.31', - id: 1, - refresh: true, - body: { - 'system.cpu.idle.pct' => 0.105 - } -) -puts response ----- diff --git a/docs/examples/guide/9a743b6575c6fe5acdf46024a7fda8a1.asciidoc b/docs/examples/guide/9a743b6575c6fe5acdf46024a7fda8a1.asciidoc deleted file mode 100644 index b8bea07d19..0000000000 --- a/docs/examples/guide/9a743b6575c6fe5acdf46024a7fda8a1.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_test_scores_2', - body: { - query: { - term: { - grad_year: '2099' - } - }, - sort: [ - { - total_score: { - order: 'desc' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc b/docs/examples/guide/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc deleted file mode 100644 index f0162ba4a2..0000000000 --- a/docs/examples/guide/9aa2327ae315c39f2bce2bd22e0deb1b.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: '.watcher-history*', - pretty: true, - body: { - query: { - bool: { - must: [ - { - match: { - 'result.condition.met' => true - } - }, - { - range: { - 'result.execution_time' => { - from: 'now-10s' - } - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9ab351893dae65ec97fd8cb6832950fb.asciidoc b/docs/examples/guide/9ab351893dae65ec97fd8cb6832950fb.asciidoc deleted file mode 100644 index 31a8dc6571..0000000000 --- a/docs/examples/guide/9ab351893dae65ec97fd8cb6832950fb.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'product-index', - body: { - query: { - script_score: { - query: { - bool: { - filter: { - range: { - price: { - gte: 1000 - } - } - } - } - }, - script: { - source: "cosineSimilarity(params.queryVector, 'product-vector') + 1.0", - params: { - "queryVector": [ - -0.5, - 90, - -10, - 14.8, - -156 - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9ad38ab4d9c3983e97e8c38fec611f10.asciidoc b/docs/examples/guide/9ad38ab4d9c3983e97e8c38fec611f10.asciidoc deleted file mode 100644 index 6cb4381211..0000000000 --- a/docs/examples/guide/9ad38ab4d9c3983e97e8c38fec611f10.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - cluster: { - remote: { - leader: { - seeds: [ - '127.0.0.1:9300' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9af44592fb2e78fb17ad3e834bbef7a7.asciidoc b/docs/examples/guide/9af44592fb2e78fb17ad3e834bbef7a7.asciidoc deleted file mode 100644 index ff708d49b9..0000000000 --- a/docs/examples/guide/9af44592fb2e78fb17ad3e834bbef7a7.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ingest.geo_ip_stats -puts response ----- diff --git a/docs/examples/guide/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc b/docs/examples/guide/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc deleted file mode 100644 index bb0b6a0db3..0000000000 --- a/docs/examples/guide/9b0f34d122a4b348dc86df7410d6ebb6.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.sync_job_cancel( - connector_sync_job_id: 'my-connector-sync-job-id' -) -puts response ----- diff --git a/docs/examples/guide/9b345e0bfd45f3a37194585ec9193478.asciidoc b/docs/examples/guide/9b345e0bfd45f3a37194585ec9193478.asciidoc deleted file mode 100644 index 407f26c63b..0000000000 --- a/docs/examples/guide/9b345e0bfd45f3a37194585ec9193478.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.forcemerge( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/9b68748c061b768c0153c1f2508ce207.asciidoc b/docs/examples/guide/9b68748c061b768c0153c1f2508ce207.asciidoc deleted file mode 100644 index 7bc240d187..0000000000 --- a/docs/examples/guide/9b68748c061b768c0153c1f2508ce207.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - cluster: { - remote: { - "clusterA": { - mode: 'proxy', - skip_unavailable: 'true', - server_name: 'clustera.es.region-a.gcp.elastic-cloud.com', - proxy_socket_connections: '18', - proxy_address: 'clustera.es.region-a.gcp.elastic-cloud.com:9400' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9b92266d87170e93a84f9700596d9035.asciidoc b/docs/examples/guide/9b92266d87170e93a84f9700596d9035.asciidoc deleted file mode 100644 index 7ed9c7d307..0000000000 --- a/docs/examples/guide/9b92266d87170e93a84f9700596d9035.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'example', - body: { - mappings: { - properties: { - location: { - type: 'geo_shape' - } - } - } - } -) -puts response - -response = client.index( - index: 'example', - refresh: true, - body: { - name: 'Wind & Wetter, Berlin, Germany', - location: { - type: 'point', - coordinates: [ - 13.400544, - 52.530286 - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/9ba6f1e64c1dfff5aac26eaa1d093f48.asciidoc b/docs/examples/guide/9ba6f1e64c1dfff5aac26eaa1d093f48.asciidoc deleted file mode 100644 index 39fa487bb2..0000000000 --- a/docs/examples/guide/9ba6f1e64c1dfff5aac26eaa1d093f48.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'custom_stems', - 'porter_stem' - ] - } - }, - filter: { - custom_stems: { - type: 'stemmer_override', - rules: [ - 'running, runs => run', - 'stemmer => stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9ba868784f417a8d3679b3c8ed5939ad.asciidoc b/docs/examples/guide/9ba868784f417a8d3679b3c8ed5939ad.asciidoc deleted file mode 100644 index 0c60ee8fda..0000000000 --- a/docs/examples/guide/9ba868784f417a8d3679b3c8ed5939ad.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_size: '100gb' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9bae72e974bdeb56007d9104e73eff92.asciidoc b/docs/examples/guide/9bae72e974bdeb56007d9104e73eff92.asciidoc deleted file mode 100644 index 1c20f67f4d..0000000000 --- a/docs/examples/guide/9bae72e974bdeb56007d9104e73eff92.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'test', - id: 1, - body: { - script: "ctx._source.remove('new_field')" - } -) -puts response ----- diff --git a/docs/examples/guide/9bb24fe09e3d1c73a71d00b994ba8cfb.asciidoc b/docs/examples/guide/9bb24fe09e3d1c73a71d00b994ba8cfb.asciidoc deleted file mode 100644 index e342c8961c..0000000000 --- a/docs/examples/guide/9bb24fe09e3d1c73a71d00b994ba8cfb.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.shards( - index: 'my-index-*' -) -puts response ----- diff --git a/docs/examples/guide/9beb260834f8cfb240f6308950dbb9c2.asciidoc b/docs/examples/guide/9beb260834f8cfb240f6308950dbb9c2.asciidoc deleted file mode 100644 index 0bc4d3a406..0000000000 --- a/docs/examples/guide/9beb260834f8cfb240f6308950dbb9c2.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - sort: [ - { - _geo_distance: { - 'pin.location' => 'drm3btev3e86', - order: 'asc', - unit: 'km' - } - } - ], - query: { - term: { - user: 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9bfdda207b701028a3439e495e800c02.asciidoc b/docs/examples/guide/9bfdda207b701028a3439e495e800c02.asciidoc deleted file mode 100644 index 7cc0643a64..0000000000 --- a/docs/examples/guide/9bfdda207b701028a3439e495e800c02.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - sales_over_time: { - date_histogram: { - field: 'date', - calendar_interval: '1M', - format: 'yyyy-MM-dd' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9c4ac64e73141f6cbf2fb6da0743d9b7.asciidoc b/docs/examples/guide/9c4ac64e73141f6cbf2fb6da0743d9b7.asciidoc deleted file mode 100644 index aed2bb2e3b..0000000000 --- a/docs/examples/guide/9c4ac64e73141f6cbf2fb6da0743d9b7.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - message: { - query: 'Quick foxes', - analyzer: 'stop' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9c5cbbdbe0075ab9c2611627fe4748fb.asciidoc b/docs/examples/guide/9c5cbbdbe0075ab9c2611627fe4748fb.asciidoc deleted file mode 100644 index 3d93044ec3..0000000000 --- a/docs/examples/guide/9c5cbbdbe0075ab9c2611627fe4748fb.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'decimal_digit_example', - body: { - settings: { - analysis: { - analyzer: { - whitespace_decimal_digit: { - tokenizer: 'whitespace', - filter: [ - 'decimal_digit' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9c6ea5fe2339d6c7e5e4bf1b98990248.asciidoc b/docs/examples/guide/9c6ea5fe2339d6c7e5e4bf1b98990248.asciidoc deleted file mode 100644 index 500403be1c..0000000000 --- a/docs/examples/guide/9c6ea5fe2339d6c7e5e4bf1b98990248.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'image-index', - body: { - knn: { - field: 'image-vector', - query_vector: [ - -5, - 9, - -12 - ], - k: 10, - num_candidates: 100 - }, - fields: [ - 'title', - 'file-type' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/9cbb097e5498a9fde39e3b1d3b62a4d2.asciidoc b/docs/examples/guide/9cbb097e5498a9fde39e3b1d3b62a4d2.asciidoc deleted file mode 100644 index a75f9c53cd..0000000000 --- a/docs/examples/guide/9cbb097e5498a9fde39e3b1d3b62a4d2.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.ml.infer_trained_model( - model_id: 'model2', - body: { - docs: [ - { - text_field: 'This is a very happy person' - } - ], - inference_config: { - zero_shot_classification: { - labels: [ - 'glad', - 'sad', - 'bad', - 'rad' - ], - multi_label: false - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc b/docs/examples/guide/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc deleted file mode 100644 index cce1d3cf75..0000000000 --- a/docs/examples/guide/9cfbc41bb7b6fbdb26550dd2789c274e.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.delete_by_query( - index: 'my-index-000001', - refresh: true, - slices: 5, - body: { - query: { - range: { - 'http.response.bytes' => { - lt: 2_000_000 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9d1fb129ac783355a20097effded1845.asciidoc b/docs/examples/guide/9d1fb129ac783355a20097effded1845.asciidoc deleted file mode 100644 index 94403442e2..0000000000 --- a/docs/examples/guide/9d1fb129ac783355a20097effded1845.asciidoc +++ /dev/null @@ -1,51 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'test', - refresh: true, - body: [ - { - index: {} - }, - { - s: 1, - m: 3.1415 - }, - { - index: {} - }, - { - s: 2, - m: 1 - }, - { - index: {} - }, - { - s: 3, - m: 2.71828 - } - ] -) -puts response - -response = client.search( - index: 'test', - filter_path: 'aggregations', - body: { - aggregations: { - tm: { - top_metrics: { - metrics: { - field: 'm' - }, - sort: { - s: 'desc' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9d31c7eaf8c6b56cee2fdfdde8a442bb.asciidoc b/docs/examples/guide/9d31c7eaf8c6b56cee2fdfdde8a442bb.asciidoc deleted file mode 100644 index 6c3878405a..0000000000 --- a/docs/examples/guide/9d31c7eaf8c6b56cee2fdfdde8a442bb.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - warm: { - actions: { - shrink: { - max_primary_shard_size: '50gb' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9d461ae140ddc018efd2650559800cd1.asciidoc b/docs/examples/guide/9d461ae140ddc018efd2650559800cd1.asciidoc deleted file mode 100644 index 8ad935f1fb..0000000000 --- a/docs/examples/guide/9d461ae140ddc018efd2650559800cd1.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - warm: { - actions: { - allocate: { - number_of_replicas: 1, - require: { - box_type: 'cold' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9d662fc9f943c287b7144f5e4e2ae358.asciidoc b/docs/examples/guide/9d662fc9f943c287b7144f5e4e2ae358.asciidoc deleted file mode 100644 index 0c99551b1c..0000000000 --- a/docs/examples/guide/9d662fc9f943c287b7144f5e4e2ae358.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'reviews', - body: { - size: 0, - aggregations: { - review_variability: { - median_absolute_deviation: { - field: 'rating', - compression: 100 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9d79645ab3a9da3f63c54a1516214a5a.asciidoc b/docs/examples/guide/9d79645ab3a9da3f63c54a1516214a5a.asciidoc deleted file mode 100644 index 1062ea0fa8..0000000000 --- a/docs/examples/guide/9d79645ab3a9da3f63c54a1516214a5a.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.health_report -puts response ----- diff --git a/docs/examples/guide/9d9c8d715b72ce336e604c2c8a2b540e.asciidoc b/docs/examples/guide/9d9c8d715b72ce336e604c2c8a2b540e.asciidoc deleted file mode 100644 index 3969396a5d..0000000000 --- a/docs/examples/guide/9d9c8d715b72ce336e604c2c8a2b540e.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - total_sales: { - sum: { - field: 'price' - } - }, - sales_bucket_sort: { - bucket_sort: { - sort: [ - { - total_sales: { - order: 'desc' - } - } - ], - size: 3 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9de10a59a5f56dd0906be627896cc789.asciidoc b/docs/examples/guide/9de10a59a5f56dd0906be627896cc789.asciidoc deleted file mode 100644 index edbdb6bdcc..0000000000 --- a/docs/examples/guide/9de10a59a5f56dd0906be627896cc789.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'bicycles,other_cycles', - body: { - query: { - match: { - description: 'dutch' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9e0e3ce27967f164f4585c5231ba9c75.asciidoc b/docs/examples/guide/9e0e3ce27967f164f4585c5231ba9c75.asciidoc deleted file mode 100644 index 9f4aadd7f3..0000000000 --- a/docs/examples/guide/9e0e3ce27967f164f4585c5231ba9c75.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - my_field: 'quick brown fox jump lazy dog' - } -) -puts response ----- diff --git a/docs/examples/guide/9e563b8d5a7845f644db8d5bbf453eb6.asciidoc b/docs/examples/guide/9e563b8d5a7845f644db8d5bbf453eb6.asciidoc deleted file mode 100644 index 232e0d5c9d..0000000000 --- a/docs/examples/guide/9e563b8d5a7845f644db8d5bbf453eb6.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.synonyms.put_synonym( - id: 'my-synonyms-set', - body: { - synonyms_set: [ - { - id: 'test-1', - synonyms: 'hello, hi' - }, - { - synonyms: 'bye, goodbye' - }, - { - id: 'test-2', - synonyms: 'test => check' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/9e5ae957fd0663662bfbed9d1effe99e.asciidoc b/docs/examples/guide/9e5ae957fd0663662bfbed9d1effe99e.asciidoc deleted file mode 100644 index 3e5e4c3c53..0000000000 --- a/docs/examples/guide/9e5ae957fd0663662bfbed9d1effe99e.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - processors: [ - { - set: { - description: "Set '_routing' to 'geoip.country_iso_code' value", - field: '_routing', - value: '{{{geoip.country_iso_code}}}' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/9e962baf1fb407c21d6c47dcd37cec29.asciidoc b/docs/examples/guide/9e962baf1fb407c21d6c47dcd37cec29.asciidoc deleted file mode 100644 index fe49cfd75f..0000000000 --- a/docs/examples/guide/9e962baf1fb407c21d6c47dcd37cec29.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: { - query: { - match: { - message: '{{query_string}}' - } - }, - from: '{{from}}{{^from}}0{{/from}}', - size: '{{size}}{{^size}}10{{/size}}' - }, - params: { - query_string: 'hello world' - } - } -) -puts response ----- diff --git a/docs/examples/guide/9e9717d9108ae1425bfacf71c7c44539.asciidoc b/docs/examples/guide/9e9717d9108ae1425bfacf71c7c44539.asciidoc deleted file mode 100644 index 911c494ac5..0000000000 --- a/docs/examples/guide/9e9717d9108ae1425bfacf71c7c44539.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.indices( - bytes: 'b', - s: 'store.size:desc,index:asc', - v: true -) -puts response ----- diff --git a/docs/examples/guide/9f04cc1a0c6cdb3ed2247f1399713767.asciidoc b/docs/examples/guide/9f04cc1a0c6cdb3ed2247f1399713767.asciidoc deleted file mode 100644 index 2643e0a279..0000000000 --- a/docs/examples/guide/9f04cc1a0c6cdb3ed2247f1399713767.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - tags: { - type: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9f0a0029982d9b3423a2a3de1f1b5136.asciidoc b/docs/examples/guide/9f0a0029982d9b3423a2a3de1f1b5136.asciidoc deleted file mode 100644 index 613b1b0318..0000000000 --- a/docs/examples/guide/9f0a0029982d9b3423a2a3de1f1b5136.asciidoc +++ /dev/null @@ -1,99 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'museums', - body: { - mappings: { - properties: { - location: { - type: 'point' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'museums', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - location: 'POINT (491.2350 5237.4081)', - city: 'Amsterdam', - name: 'NEMO Science Museum' - }, - { - index: { - _id: 2 - } - }, - { - location: 'POINT (490.1618 5236.9219)', - city: 'Amsterdam', - name: 'Museum Het Rembrandthuis' - }, - { - index: { - _id: 3 - } - }, - { - location: 'POINT (491.4722 5237.1667)', - city: 'Amsterdam', - name: 'Nederlands Scheepvaartmuseum' - }, - { - index: { - _id: 4 - } - }, - { - location: 'POINT (440.5200 5122.2900)', - city: 'Antwerp', - name: 'Letterenhuis' - }, - { - index: { - _id: 5 - } - }, - { - location: 'POINT (233.6389 4886.1111)', - city: 'Paris', - name: 'Musée du Louvre' - }, - { - index: { - _id: 6 - } - }, - { - location: 'POINT (232.7000 4886.0000)', - city: 'Paris', - name: "Musée d'Orsay" - } - ] -) -puts response - -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - centroid: { - cartesian_centroid: { - field: 'location' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9f22a0920cc763eefa233ced963d9624.asciidoc b/docs/examples/guide/9f22a0920cc763eefa233ced963d9624.asciidoc deleted file mode 100644 index fe31c4fb37..0000000000 --- a/docs/examples/guide/9f22a0920cc763eefa233ced963d9624.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - span_term: { - 'user.id' => { - term: 'kimchy', - boost: 2 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9f286416f1b18940f13cb27ab5c8458e.asciidoc b/docs/examples/guide/9f286416f1b18940f13cb27ab5c8458e.asciidoc deleted file mode 100644 index 565a406c3b..0000000000 --- a/docs/examples/guide/9f286416f1b18940f13cb27ab5c8458e.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'keyword', - filter: [ - 'my_pattern_replace_filter' - ] - } - }, - filter: { - my_pattern_replace_filter: { - type: 'pattern_replace', - pattern: '[£|€]', - replacement: '', - all: false - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9f3341489fefd38c4e439c29f6dcb86c.asciidoc b/docs/examples/guide/9f3341489fefd38c4e439c29f6dcb86c.asciidoc deleted file mode 100644 index 2d77f22778..0000000000 --- a/docs/examples/guide/9f3341489fefd38c4e439c29f6dcb86c.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'job-candidates', - body: { - query: { - terms_set: { - programming_languages: { - terms: [ - 'c++', - 'java', - 'php' - ], - minimum_should_match_script: { - source: "Math.min(params.num_terms, doc['required_matches'].value)" - }, - boost: 1 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9f7671119236423e0e40801ef6485af1.asciidoc b/docs/examples/guide/9f7671119236423e0e40801ef6485af1.asciidoc deleted file mode 100644 index 5a4ce92dcd..0000000000 --- a/docs/examples/guide/9f7671119236423e0e40801ef6485af1.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'uppercase' - ], - text: 'the Quick FoX JUMPs' - } -) -puts response ----- diff --git a/docs/examples/guide/9fa55fc76ec4bd81f372e9389f1da851.asciidoc b/docs/examples/guide/9fa55fc76ec4bd81f372e9389f1da851.asciidoc deleted file mode 100644 index 3d6a8fa605..0000000000 --- a/docs/examples/guide/9fa55fc76ec4bd81f372e9389f1da851.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-data-stream', - body: { - index: { - refresh_interval: '30s' - } - } -) -puts response ----- diff --git a/docs/examples/guide/9fda516a5dc60ba477b970eaad4429db.asciidoc b/docs/examples/guide/9fda516a5dc60ba477b970eaad4429db.asciidoc deleted file mode 100644 index 93df58bc6d..0000000000 --- a/docs/examples/guide/9fda516a5dc60ba477b970eaad4429db.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_data_lifecycle( - name: 'my-data-stream*' -) -puts response ----- diff --git a/docs/examples/guide/9feff356f302ea4915347ab71cc4887a.asciidoc b/docs/examples/guide/9feff356f302ea4915347ab71cc4887a.asciidoc deleted file mode 100644 index b8df274c04..0000000000 --- a/docs/examples/guide/9feff356f302ea4915347ab71cc4887a.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.simulate_template( - body: { - index_patterns: [ - 'my-index-*' - ], - composed_of: [ - 'ct2' - ], - priority: 10, - template: { - settings: { - 'index.number_of_replicas' => 1 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/9ff9b2a73419a6c82f17a358b4991499.asciidoc b/docs/examples/guide/9ff9b2a73419a6c82f17a358b4991499.asciidoc deleted file mode 100644 index 02b3a36646..0000000000 --- a/docs/examples/guide/9ff9b2a73419a6c82f17a358b4991499.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.close_point_in_time( - body: { - id: '46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==' - } -) -puts response ----- diff --git a/docs/examples/guide/9ffe41322c095af1b6ea45a79b640a6f.asciidoc b/docs/examples/guide/9ffe41322c095af1b6ea45a79b640a6f.asciidoc deleted file mode 100644 index 2b77efcbb3..0000000000 --- a/docs/examples/guide/9ffe41322c095af1b6ea45a79b640a6f.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - span_within: { - little: { - span_term: { - "field1": 'foo' - } - }, - big: { - span_near: { - clauses: [ - { - span_term: { - "field1": 'bar' - } - }, - { - span_term: { - "field1": 'baz' - } - } - ], - slop: 5, - in_order: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a00311843b5f8f3e9f7d511334a828b1.asciidoc b/docs/examples/guide/a00311843b5f8f3e9f7d511334a828b1.asciidoc deleted file mode 100644 index 9ebf066331..0000000000 --- a/docs/examples/guide/a00311843b5f8f3e9f7d511334a828b1.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.rollup.get_rollup_caps( - id: 'sensor-*' -) -puts response ----- diff --git a/docs/examples/guide/a008f42379930edc354b4074e0a33344.asciidoc b/docs/examples/guide/a008f42379930edc354b4074e0a33344.asciidoc deleted file mode 100644 index 5e5432dfa6..0000000000 --- a/docs/examples/guide/a008f42379930edc354b4074e0a33344.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'index', - id: 1, - body: { - designation: 'spoon', - price: 13 - } -) -puts response ----- diff --git a/docs/examples/guide/a01753fa7b4ba6dc19054f4f42d91cd9.asciidoc b/docs/examples/guide/a01753fa7b4ba6dc19054f4f42d91cd9.asciidoc deleted file mode 100644 index 21545fdae2..0000000000 --- a/docs/examples/guide/a01753fa7b4ba6dc19054f4f42d91cd9.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: '{ "query": { "bool": { "filter": [ { "range": { "@timestamp": { "gte": {{#year_scope}} "now-1y/d" {{/year_scope}} {{^year_scope}} "now-1d/d" {{/year_scope}} , "lt": "now/d" }}}, { "term": { "user.id": "{{user_id}}" }}]}}}', - params: { - year_scope: true, - user_id: 'kimchy' - } - } -) -puts response ----- diff --git a/docs/examples/guide/a037beb3d02296e1d36dd43ef5c935dd.asciidoc b/docs/examples/guide/a037beb3d02296e1d36dd43ef5c935dd.asciidoc deleted file mode 100644 index 705d8ffcaa..0000000000 --- a/docs/examples/guide/a037beb3d02296e1d36dd43ef5c935dd.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'keyword_repeat' - ], - text: 'fox running and jumping', - explain: true, - attributes: 'keyword' - } -) -puts response ----- diff --git a/docs/examples/guide/a0497157fdefecd04e597edb800a1a95.asciidoc b/docs/examples/guide/a0497157fdefecd04e597edb800a1a95.asciidoc deleted file mode 100644 index 35c9f3782d..0000000000 --- a/docs/examples/guide/a0497157fdefecd04e597edb800a1a95.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - _source: 'obj.*', - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a04a8d90f8245ff5f30a9983909faa1d.asciidoc b/docs/examples/guide/a04a8d90f8245ff5f30a9983909faa1d.asciidoc deleted file mode 100644 index 1e5ac51074..0000000000 --- a/docs/examples/guide/a04a8d90f8245ff5f30a9983909faa1d.asciidoc +++ /dev/null @@ -1,47 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my_queries1', - body: { - settings: { - analysis: { - analyzer: { - wildcard_prefix: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'lowercase', - 'wildcard_edge_ngram' - ] - } - }, - filter: { - wildcard_edge_ngram: { - type: 'edge_ngram', - min_gram: 1, - max_gram: 32 - } - } - } - }, - mappings: { - properties: { - query: { - type: 'percolator' - }, - my_field: { - type: 'text', - fields: { - prefix: { - type: 'text', - analyzer: 'wildcard_prefix', - search_analyzer: 'standard' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a0871be90badeecd2f8d8ec90230e248.asciidoc b/docs/examples/guide/a0871be90badeecd2f8d8ec90230e248.asciidoc deleted file mode 100644 index 1ce17f60fc..0000000000 --- a/docs/examples/guide/a0871be90badeecd2f8d8ec90230e248.asciidoc +++ /dev/null @@ -1,48 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'standard', - char_filter: [ - 'my_char_filter' - ], - filter: [ - 'lowercase' - ] - } - }, - char_filter: { - my_char_filter: { - type: 'pattern_replace', - pattern: '(?<=\\p{Lower})(?=\\p{Upper})', - replacement: ' ' - } - } - } - }, - mappings: { - properties: { - text: { - type: 'text', - analyzer: 'my_analyzer' - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_analyzer', - text: 'The fooBarBaz method' - } -) -puts response ----- diff --git a/docs/examples/guide/a0a7557bb7e2aff7918557cd648f41af.asciidoc b/docs/examples/guide/a0a7557bb7e2aff7918557cd648f41af.asciidoc deleted file mode 100644 index c2780c3739..0000000000 --- a/docs/examples/guide/a0a7557bb7e2aff7918557cd648f41af.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'index', - body: { - aggregations: { - price_ranges: { - range: { - field: 'price', - ranges: [ - { - to: 10 - }, - { - from: 10, - to: 100 - }, - { - from: 100 - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a0c64894f14d28b7e0c902add71d2e9a.asciidoc b/docs/examples/guide/a0c64894f14d28b7e0c902add71d2e9a.asciidoc deleted file mode 100644 index 9af8726e17..0000000000 --- a/docs/examples/guide/a0c64894f14d28b7e0c902add71d2e9a.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'xpack.profiling.templates.enabled' => true - } - } -) -puts response ----- diff --git a/docs/examples/guide/a0c868282c0514a342ad04998cdc2175.asciidoc b/docs/examples/guide/a0c868282c0514a342ad04998cdc2175.asciidoc deleted file mode 100644 index 5275a2800a..0000000000 --- a/docs/examples/guide/a0c868282c0514a342ad04998cdc2175.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.delete_by_query( - index: 'my-index-000001', - conflicts: 'proceed', - body: { - query: { - match_all: {} - } - } -) -puts response ----- diff --git a/docs/examples/guide/a0d53dcb3df938fc0a01d248571a41e4.asciidoc b/docs/examples/guide/a0d53dcb3df938fc0a01d248571a41e4.asciidoc deleted file mode 100644 index a01190e805..0000000000 --- a/docs/examples/guide/a0d53dcb3df938fc0a01d248571a41e4.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - runtime_mappings: { - 'price.discounted' => { - type: 'double', - script: "\n double price = doc['price'].value;\n if (doc['product'].value == 'mad max') {\n price *= 0.8;\n }\n emit(price);\n " - } - }, - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - price: { - histogram: { - interval: 5, - field: 'price.discounted' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a0f4e902d18460337684d74ea932fbe9.asciidoc b/docs/examples/guide/a0f4e902d18460337684d74ea932fbe9.asciidoc deleted file mode 100644 index 79f6569782..0000000000 --- a/docs/examples/guide/a0f4e902d18460337684d74ea932fbe9.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'test', - id: 1, - body: { - doc: { - name: 'new_name' - } - } -) -puts response ----- diff --git a/docs/examples/guide/a1070cf2f5969d42d71cda057223f152.asciidoc b/docs/examples/guide/a1070cf2f5969d42d71cda057223f152.asciidoc deleted file mode 100644 index 019427780d..0000000000 --- a/docs/examples/guide/a1070cf2f5969d42d71cda057223f152.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.shards( - v: true -) -puts response ----- diff --git a/docs/examples/guide/a1377b32d7fe3680079ae0df73009b0e.asciidoc b/docs/examples/guide/a1377b32d7fe3680079ae0df73009b0e.asciidoc deleted file mode 100644 index 67855dc025..0000000000 --- a/docs/examples/guide/a1377b32d7fe3680079ae0df73009b0e.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - query: { - term: { - tags: 'car' - } - }, - aggregations: { - by_sale: { - nested: { - path: 'comments' - }, - aggregations: { - by_user: { - terms: { - field: 'comments.username', - size: 1 - }, - aggregations: { - by_nested: { - top_hits: {} - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a1490f71d705053951870fd2d3bceb39.asciidoc b/docs/examples/guide/a1490f71d705053951870fd2d3bceb39.asciidoc deleted file mode 100644 index d9e7abc489..0000000000 --- a/docs/examples/guide/a1490f71d705053951870fd2d3bceb39.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - session_data: { - type: 'object', - enabled: false - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'session_1', - body: { - session_data: 'foo bar' - } -) -puts response ----- diff --git a/docs/examples/guide/a159143bb578403bb9c7ff37d635d7ad.asciidoc b/docs/examples/guide/a159143bb578403bb9c7ff37d635d7ad.asciidoc deleted file mode 100644 index f8c0b32bc4..0000000000 --- a/docs/examples/guide/a159143bb578403bb9c7ff37d635d7ad.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - { - type: 'predicate_token_filter', - script: { - source: "\n token.term.length() > 3\n " - } - } - ], - text: 'the fox jumps the lazy dog' - } -) -puts response ----- diff --git a/docs/examples/guide/a159e1ce0cba7a35ce44db9bebad22f3.asciidoc b/docs/examples/guide/a159e1ce0cba7a35ce44db9bebad22f3.asciidoc deleted file mode 100644 index a26f808cec..0000000000 --- a/docs/examples/guide/a159e1ce0cba7a35ce44db9bebad22f3.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.slm.get_lifecycle -puts response ----- diff --git a/docs/examples/guide/a1879930c1dac36a57d7f094a680420b.asciidoc b/docs/examples/guide/a1879930c1dac36a57d7f094a680420b.asciidoc deleted file mode 100644 index 5b2e9fa3eb..0000000000 --- a/docs/examples/guide/a1879930c1dac36a57d7f094a680420b.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - "zoomed-in": { - filter: { - geo_bounding_box: { - location: { - top_left: 'u17', - bottom_right: 'u17' - } - } - }, - aggregations: { - "zoom1": { - geohash_grid: { - field: 'location', - precision: 8 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a197076e0e74951ea88f20309ec257e2.asciidoc b/docs/examples/guide/a197076e0e74951ea88f20309ec257e2.asciidoc deleted file mode 100644 index 33e098c9ec..0000000000 --- a/docs/examples/guide/a197076e0e74951ea88f20309ec257e2.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'palindrome_list', - body: { - settings: { - analysis: { - analyzer: { - whitespace_reverse_first_token: { - tokenizer: 'whitespace', - filter: [ - 'reverse_first_token' - ] - } - }, - filter: { - reverse_first_token: { - type: 'condition', - filter: [ - 'reverse' - ], - script: { - source: 'token.getPosition() === 0' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a1ccd51eef37e43c935a047b0ee15daa.asciidoc b/docs/examples/guide/a1ccd51eef37e43c935a047b0ee15daa.asciidoc deleted file mode 100644 index 94b430e817..0000000000 --- a/docs/examples/guide/a1ccd51eef37e43c935a047b0ee15daa.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.rollover( - alias: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/a1d0603b24a5b048f0959975d8057534.asciidoc b/docs/examples/guide/a1d0603b24a5b048f0959975d8057534.asciidoc deleted file mode 100644 index 52db2aacca..0000000000 --- a/docs/examples/guide/a1d0603b24a5b048f0959975d8057534.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.termvectors( - index: 'my-index-000001', - body: { - doc: { - fullname: 'John Doe', - text: 'test test test' - }, - fields: [ - 'fullname' - ], - per_field_analyzer: { - fullname: 'keyword' - } - } -) -puts response ----- diff --git a/docs/examples/guide/a1dcc6668d13271c8207ff5ff1d35492.asciidoc b/docs/examples/guide/a1dcc6668d13271c8207ff5ff1d35492.asciidoc deleted file mode 100644 index e6cfbd6e77..0000000000 --- a/docs/examples/guide/a1dcc6668d13271c8207ff5ff1d35492.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get( - index: 'my-index-000001,my-index-000002' -) -puts response ----- diff --git a/docs/examples/guide/a1e5884051755b5a5f4d7549f319f4c7.asciidoc b/docs/examples/guide/a1e5884051755b5a5f4d7549f319f4c7.asciidoc deleted file mode 100644 index 77eb24fe46..0000000000 --- a/docs/examples/guide/a1e5884051755b5a5f4d7549f319f4c7.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'products', - body: { - mappings: { - properties: { - resellers: { - type: 'nested', - properties: { - reseller: { - type: 'keyword' - }, - price: { - type: 'double' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a1e5f3956f9a697e79478fc9a6e30e1f.asciidoc b/docs/examples/guide/a1e5f3956f9a697e79478fc9a6e30e1f.asciidoc deleted file mode 100644 index c576fb8b66..0000000000 --- a/docs/examples/guide/a1e5f3956f9a697e79478fc9a6e30e1f.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'thai', - text: 'การที่ได้ต้องแสดงว่างานดี' - } -) -puts response ----- diff --git a/docs/examples/guide/a1f70bc71b763b58206814c40a7440e7.asciidoc b/docs/examples/guide/a1f70bc71b763b58206814c40a7440e7.asciidoc deleted file mode 100644 index 273dbddda4..0000000000 --- a/docs/examples/guide/a1f70bc71b763b58206814c40a7440e7.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.watcher.update_settings( - body: { - 'index.auto_expand_replicas' => '0-4' - } -) -puts response ----- diff --git a/docs/examples/guide/a21319c9eff1ac47d7fe7490f1ef2efa.asciidoc b/docs/examples/guide/a21319c9eff1ac47d7fe7490f1ef2efa.asciidoc deleted file mode 100644 index d804cf579f..0000000000 --- a/docs/examples/guide/a21319c9eff1ac47d7fe7490f1ef2efa.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'decimal_digit' - ], - text: '१-one two-२ ३' - } -) -puts response ----- diff --git a/docs/examples/guide/a21a7bf052b41f5b996dc58f7b69770f.asciidoc b/docs/examples/guide/a21a7bf052b41f5b996dc58f7b69770f.asciidoc deleted file mode 100644 index 507465d79f..0000000000 --- a/docs/examples/guide/a21a7bf052b41f5b996dc58f7b69770f.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.set_upgrade_mode( - enabled: true -) -puts response ----- diff --git a/docs/examples/guide/a253a1712953f7292bdd646c48ec7fd2.asciidoc b/docs/examples/guide/a253a1712953f7292bdd646c48ec7fd2.asciidoc deleted file mode 100644 index eb23bb0429..0000000000 --- a/docs/examples/guide/a253a1712953f7292bdd646c48ec7fd2.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - sort: '@timestamp:desc', - size: 1 -) -puts response ----- diff --git a/docs/examples/guide/a28111cdd9b5aaea96c779cbfbf38780.asciidoc b/docs/examples/guide/a28111cdd9b5aaea96c779cbfbf38780.asciidoc deleted file mode 100644 index 8bf7ab9153..0000000000 --- a/docs/examples/guide/a28111cdd9b5aaea96c779cbfbf38780.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'czech_example', - body: { - settings: { - analysis: { - filter: { - czech_stop: { - type: 'stop', - stopwords: '_czech_' - }, - czech_keywords: { - type: 'keyword_marker', - keywords: [ - 'příklad' - ] - }, - czech_stemmer: { - type: 'stemmer', - language: 'czech' - } - }, - analyzer: { - rebuilt_czech: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'czech_stop', - 'czech_keywords', - 'czech_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a2b2ce031120dac49b5120b26eea8758.asciidoc b/docs/examples/guide/a2b2ce031120dac49b5120b26eea8758.asciidoc deleted file mode 100644 index c22eeaf880..0000000000 --- a/docs/examples/guide/a2b2ce031120dac49b5120b26eea8758.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.indices( - index: 'my-index-*', - v: true, - s: 'index' -) -puts response ----- diff --git a/docs/examples/guide/a2bd0782aadfd0a902d7f590ee7f49fe.asciidoc b/docs/examples/guide/a2bd0782aadfd0a902d7f590ee7f49fe.asciidoc deleted file mode 100644 index d285e699fc..0000000000 --- a/docs/examples/guide/a2bd0782aadfd0a902d7f590ee7f49fe.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index', - body: { - mappings: { - properties: { - content_embedding: { - type: 'sparse_vector' - }, - content: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a2c3e284354e8d49cf51bb8dd5ef3613.asciidoc b/docs/examples/guide/a2c3e284354e8d49cf51bb8dd5ef3613.asciidoc deleted file mode 100644 index 755c080f98..0000000000 --- a/docs/examples/guide/a2c3e284354e8d49cf51bb8dd5ef3613.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.transform.upgrade_transforms -puts response ----- diff --git a/docs/examples/guide/a2dabdcbb661e7690166ae6d0de27e46.asciidoc b/docs/examples/guide/a2dabdcbb661e7690166ae6d0de27e46.asciidoc deleted file mode 100644 index 589d3046e7..0000000000 --- a/docs/examples/guide/a2dabdcbb661e7690166ae6d0de27e46.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.field_caps( - index: 'trips', - fields: 'route_*,transit_mode' -) -puts response ----- diff --git a/docs/examples/guide/a34d70d7022eb4ba48909d440c80390f.asciidoc b/docs/examples/guide/a34d70d7022eb4ba48909d440c80390f.asciidoc deleted file mode 100644 index 840ae0f9b2..0000000000 --- a/docs/examples/guide/a34d70d7022eb4ba48909d440c80390f.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: ',,', - body: { - query: { - match: { - test: 'data' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a34e758e019f563d323ca90ad9fd6e3e.asciidoc b/docs/examples/guide/a34e758e019f563d323ca90ad9fd6e3e.asciidoc deleted file mode 100644 index 6600ce7194..0000000000 --- a/docs/examples/guide/a34e758e019f563d323ca90ad9fd6e3e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_alias( - index: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/a38f29375eabd0103f8d7c00b17bb0ab.asciidoc b/docs/examples/guide/a38f29375eabd0103f8d7c00b17bb0ab.asciidoc deleted file mode 100644 index dded4541a7..0000000000 --- a/docs/examples/guide/a38f29375eabd0103f8d7c00b17bb0ab.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.cluster.health -puts response ----- diff --git a/docs/examples/guide/a3a14f7f0e80725f695a901a7e1d579d.asciidoc b/docs/examples/guide/a3a14f7f0e80725f695a901a7e1d579d.asciidoc deleted file mode 100644 index d61a69e6ad..0000000000 --- a/docs/examples/guide/a3a14f7f0e80725f695a901a7e1d579d.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'keyword', - filter: [ - 'trim' - ], - text: ' fox ' - } -) -puts response ----- diff --git a/docs/examples/guide/a3a64d568fe93a22b042a8b31b9905b0.asciidoc b/docs/examples/guide/a3a64d568fe93a22b042a8b31b9905b0.asciidoc deleted file mode 100644 index c8be4daf97..0000000000 --- a/docs/examples/guide/a3a64d568fe93a22b042a8b31b9905b0.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - verbose: true, - body: { - pipeline: { - description: '_description', - processors: [ - { - set: { - field: 'field2', - value: '_value2' - } - }, - { - set: { - field: 'field3', - value: '_value3' - } - } - ] - }, - docs: [ - { - _index: 'index', - _id: 'id', - _source: { - foo: 'bar' - } - }, - { - _index: 'index', - _id: 'id', - _source: { - foo: 'rab' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/a3ce0cfe2176f3d8a36959a5916995f0.asciidoc b/docs/examples/guide/a3ce0cfe2176f3d8a36959a5916995f0.asciidoc deleted file mode 100644 index 569875ab7b..0000000000 --- a/docs/examples/guide/a3ce0cfe2176f3d8a36959a5916995f0.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.tasks.list( - group_by: 'none' -) -puts response ----- diff --git a/docs/examples/guide/a3cfd350c73a104b99a998c6be931408.asciidoc b/docs/examples/guide/a3cfd350c73a104b99a998c6be931408.asciidoc deleted file mode 100644 index a0254b2644..0000000000 --- a/docs/examples/guide/a3cfd350c73a104b99a998c6be931408.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.state( - metric: 'blocks' -) -puts response ----- diff --git a/docs/examples/guide/a3d13833714f9bb918e5e0f62a49bd0e.asciidoc b/docs/examples/guide/a3d13833714f9bb918e5e0f62a49bd0e.asciidoc deleted file mode 100644 index dab5e7f854..0000000000 --- a/docs/examples/guide/a3d13833714f9bb918e5e0f62a49bd0e.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'ip_addresses', - body: { - size: 0, - aggregations: { - ip_ranges: { - ip_range: { - field: 'ip', - ranges: [ - { - to: '10.0.0.5' - }, - { - from: '10.0.0.5' - } - ], - keyed: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a3e79d6c626a490341c5b731acbb4a5d.asciidoc b/docs/examples/guide/a3e79d6c626a490341c5b731acbb4a5d.asciidoc deleted file mode 100644 index 874d92e89c..0000000000 --- a/docs/examples/guide/a3e79d6c626a490341c5b731acbb4a5d.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.exists_source( - index: 'my-index-000001', - id: 1 -) -puts response ----- diff --git a/docs/examples/guide/a3f19f3787cb331f230cdac67ff578e8.asciidoc b/docs/examples/guide/a3f19f3787cb331f230cdac67ff578e8.asciidoc deleted file mode 100644 index 69b09860d5..0000000000 --- a/docs/examples/guide/a3f19f3787cb331f230cdac67ff578e8.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - tags: { - significant_terms: { - field: 'tags', - execution_hint: 'map' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a3f3c1f3f31dbd225da5fd14633bc4a0.asciidoc b/docs/examples/guide/a3f3c1f3f31dbd225da5fd14633bc4a0.asciidoc deleted file mode 100644 index f6acaa003c..0000000000 --- a/docs/examples/guide/a3f3c1f3f31dbd225da5fd14633bc4a0.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'users', - id: 0 -) -puts response ----- diff --git a/docs/examples/guide/a3f56fa16c6cc67c2db31a4ba9ca11a7.asciidoc b/docs/examples/guide/a3f56fa16c6cc67c2db31a4ba9ca11a7.asciidoc deleted file mode 100644 index 1c895f4755..0000000000 --- a/docs/examples/guide/a3f56fa16c6cc67c2db31a4ba9ca11a7.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.enrich.put_policy( - name: 'networks-policy', - body: { - range: { - indices: 'networks', - match_field: 'range', - enrich_fields: [ - 'name', - 'department' - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/a3f66deb467df86edbf66e1dca31da51.asciidoc b/docs/examples/guide/a3f66deb467df86edbf66e1dca31da51.asciidoc deleted file mode 100644 index b706317ce9..0000000000 --- a/docs/examples/guide/a3f66deb467df86edbf66e1dca31da51.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'music', - body: { - _source: 'suggest', - suggest: { - "song-suggest": { - prefix: 'nir', - completion: { - field: 'suggest', - size: 5 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a425fcab60f603504becee7d001f0a4b.asciidoc b/docs/examples/guide/a425fcab60f603504becee7d001f0a4b.asciidoc deleted file mode 100644 index c2fe7ecb23..0000000000 --- a/docs/examples/guide/a425fcab60f603504becee7d001f0a4b.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'index_4', - body: { - 'index.priority' => 1 - } -) -puts response ----- diff --git a/docs/examples/guide/a428d518162918733d49261ffd65cfc1.asciidoc b/docs/examples/guide/a428d518162918733d49261ffd65cfc1.asciidoc deleted file mode 100644 index a6df44c2ad..0000000000 --- a/docs/examples/guide/a428d518162918733d49261ffd65cfc1.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'custom_unique_example', - body: { - settings: { - analysis: { - analyzer: { - standard_truncate: { - tokenizer: 'standard', - filter: [ - 'unique' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a45244aa3adbf3c793fede100786d1f5.asciidoc b/docs/examples/guide/a45244aa3adbf3c793fede100786d1f5.asciidoc deleted file mode 100644 index 419b9b30bf..0000000000 --- a/docs/examples/guide/a45244aa3adbf3c793fede100786d1f5.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - sales_over_time: { - auto_date_histogram: { - field: 'date', - buckets: 10 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a45810722dc4f468f81b1e8a451d21be.asciidoc b/docs/examples/guide/a45810722dc4f468f81b1e8a451d21be.asciidoc deleted file mode 100644 index 9e390b0daf..0000000000 --- a/docs/examples/guide/a45810722dc4f468f81b1e8a451d21be.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - "logger.org.elasticsearch.http.HttpTracer": 'TRACE' - } - } -) -puts response ----- diff --git a/docs/examples/guide/a45d80a3fdba70c1b1ba493e51652c8a.asciidoc b/docs/examples/guide/a45d80a3fdba70c1b1ba493e51652c8a.asciidoc deleted file mode 100644 index 823884c927..0000000000 --- a/docs/examples/guide/a45d80a3fdba70c1b1ba493e51652c8a.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'multipoint', - coordinates: [ - [ - 1002, - 1002 - ], - [ - 1003, - 2000 - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/a49acb27f56fe799a9b1342f85cba0f3.asciidoc b/docs/examples/guide/a49acb27f56fe799a9b1342f85cba0f3.asciidoc deleted file mode 100644 index c2345dd2d9..0000000000 --- a/docs/examples/guide/a49acb27f56fe799a9b1342f85cba0f3.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'keyword', - filter: [ - 'word_delimiter_graph' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a4a3c3cd09efa75168dab90105afb2e9.asciidoc b/docs/examples/guide/a4a3c3cd09efa75168dab90105afb2e9.asciidoc deleted file mode 100644 index e6a4f843ab..0000000000 --- a/docs/examples/guide/a4a3c3cd09efa75168dab90105afb2e9.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.inference.get_model( - task_type: 'sparse_embedding', - inference_id: 'my-elser-model' -) -puts response ----- diff --git a/docs/examples/guide/a4bae4d956bc0a663f42cfec36bf8e0b.asciidoc b/docs/examples/guide/a4bae4d956bc0a663f42cfec36bf8e0b.asciidoc deleted file mode 100644 index b76e5b8b0a..0000000000 --- a/docs/examples/guide/a4bae4d956bc0a663f42cfec36bf8e0b.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index', - body: { - mappings: { - properties: { - price_range: { - type: 'keyword' - } - } - } - } -) -puts response - -response = client.index( - index: 'index', - id: 1, - body: { - designation: 'spoon', - price: 13, - price_range: '10-100' - } -) -puts response ----- diff --git a/docs/examples/guide/a4bd9bf52b4f098838d12bcb8dfc3482.asciidoc b/docs/examples/guide/a4bd9bf52b4f098838d12bcb8dfc3482.asciidoc deleted file mode 100644 index 0772aec372..0000000000 --- a/docs/examples/guide/a4bd9bf52b4f098838d12bcb8dfc3482.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - } - } - }, - min_monthly_sales: { - min_bucket: { - buckets_path: 'sales_per_month>sales' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a4e510aa9145ccedae151c4a6634f0a4.asciidoc b/docs/examples/guide/a4e510aa9145ccedae151c4a6634f0a4.asciidoc deleted file mode 100644 index a17979aa23..0000000000 --- a/docs/examples/guide/a4e510aa9145ccedae151c4a6634f0a4.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'stemmer' - ], - text: 'the foxes jumping quickly' - } -) -puts response ----- diff --git a/docs/examples/guide/a4ec42130f3c75fc9d1d5f7cb6222cd5.asciidoc b/docs/examples/guide/a4ec42130f3c75fc9d1d5f7cb6222cd5.asciidoc deleted file mode 100644 index eb6405d99f..0000000000 --- a/docs/examples/guide/a4ec42130f3c75fc9d1d5f7cb6222cd5.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - query: { - constant_score: { - filter: { - range: { - price: { - to: '500' - } - } - } - } - }, - aggregations: { - prices: { - histogram: { - field: 'price', - interval: 50, - extended_bounds: { - min: 0, - max: 500 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a4f259522b4dc10a0323aff58236c2c2.asciidoc b/docs/examples/guide/a4f259522b4dc10a0323aff58236c2c2.asciidoc deleted file mode 100644 index f72d60cf07..0000000000 --- a/docs/examples/guide/a4f259522b4dc10a0323aff58236c2c2.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'music', - id: 1, - refresh: true, - body: { - suggest: { - input: [ - 'Nevermind', - 'Nirvana' - ], - weight: 34 - } - } -) -puts response ----- diff --git a/docs/examples/guide/a512e4dd8880ce0395937db1bab1d205.asciidoc b/docs/examples/guide/a512e4dd8880ce0395937db1bab1d205.asciidoc deleted file mode 100644 index 6c0f7e2645..0000000000 --- a/docs/examples/guide/a512e4dd8880ce0395937db1bab1d205.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'edge_ngram', - text: 'Quick Fox' - } -) -puts response ----- diff --git a/docs/examples/guide/a520168c1c8b454a8f102d6a13027c73.asciidoc b/docs/examples/guide/a520168c1c8b454a8f102d6a13027c73.asciidoc deleted file mode 100644 index 019ee5f7a9..0000000000 --- a/docs/examples/guide/a520168c1c8b454a8f102d6a13027c73.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ccr.follow_info( - index: 'follower_index' -) -puts response ----- diff --git a/docs/examples/guide/a5217a93efabceee9be19949e484f930.asciidoc b/docs/examples/guide/a5217a93efabceee9be19949e484f930.asciidoc deleted file mode 100644 index ab21d52747..0000000000 --- a/docs/examples/guide/a5217a93efabceee9be19949e484f930.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'music', - id: 1, - refresh: true, - body: { - suggest: [ - { - input: 'Nevermind', - weight: 10 - }, - { - input: 'Nirvana', - weight: 3 - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/a53ff77d83222c0e76453e630d64787e.asciidoc b/docs/examples/guide/a53ff77d83222c0e76453e630d64787e.asciidoc deleted file mode 100644 index 446177b2b5..0000000000 --- a/docs/examples/guide/a53ff77d83222c0e76453e630d64787e.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'openai_embeddings', - body: { - processors: [ - { - inference: { - model_id: 'openai_embeddings', - input_output: { - input_field: 'content', - output_field: 'content_embedding' - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/a547bb926c25f670078b98fbe67de3cc.asciidoc b/docs/examples/guide/a547bb926c25f670078b98fbe67de3cc.asciidoc deleted file mode 100644 index d7ebbe1cb7..0000000000 --- a/docs/examples/guide/a547bb926c25f670078b98fbe67de3cc.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.synonyms.delete_synonym_rule( - set_id: 'my-synonyms-set', - rule_id: 'test-1' -) -puts response ----- diff --git a/docs/examples/guide/a5a58e8ad66afe831bc295500e3e8739.asciidoc b/docs/examples/guide/a5a58e8ad66afe831bc295500e3e8739.asciidoc deleted file mode 100644 index 4a277f7aae..0000000000 --- a/docs/examples/guide/a5a58e8ad66afe831bc295500e3e8739.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - hot: { - actions: { - unfollow: {} - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a5e6ccfb6019238e6db602373b9af147.asciidoc b/docs/examples/guide/a5e6ccfb6019238e6db602373b9af147.asciidoc deleted file mode 100644 index ea47306dc2..0000000000 --- a/docs/examples/guide/a5e6ccfb6019238e6db602373b9af147.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_data_lifecycle( - name: 'my-data-stream', - body: {} -) -puts response ----- diff --git a/docs/examples/guide/a5e793d82a4455cf4105dac82a156617.asciidoc b/docs/examples/guide/a5e793d82a4455cf4105dac82a156617.asciidoc deleted file mode 100644 index f30e07e6a9..0000000000 --- a/docs/examples/guide/a5e793d82a4455cf4105dac82a156617.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.validate_query( - index: 'my-index-000001', - rewrite: true, - body: { - query: { - more_like_this: { - like: { - _id: '2' - }, - boost_terms: 1 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a5ebcd70c34d1ece77a4fb27cc050917.asciidoc b/docs/examples/guide/a5ebcd70c34d1ece77a4fb27cc050917.asciidoc deleted file mode 100644 index 5ea014e00e..0000000000 --- a/docs/examples/guide/a5ebcd70c34d1ece77a4fb27cc050917.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_ranks: { - percentile_ranks: { - field: 'load_time', - values: [ - 500, - 600 - ], - keyed: false - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a5f9eb40087921e67d820775acf71522.asciidoc b/docs/examples/guide/a5f9eb40087921e67d820775acf71522.asciidoc deleted file mode 100644 index 51c6555267..0000000000 --- a/docs/examples/guide/a5f9eb40087921e67d820775acf71522.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - city: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a6169bc057ce8654bd306ff4b062081b.asciidoc b/docs/examples/guide/a6169bc057ce8654bd306ff4b062081b.asciidoc deleted file mode 100644 index 7ed20a070e..0000000000 --- a/docs/examples/guide/a6169bc057ce8654bd306ff4b062081b.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'music', - pretty: true, - body: { - suggest: { - "song-suggest": { - prefix: 'nor', - completion: { - field: 'suggest', - skip_duplicates: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a62833baf15f2c9ac094a9289e56a012.asciidoc b/docs/examples/guide/a62833baf15f2c9ac094a9289e56a012.asciidoc deleted file mode 100644 index 721e75a76e..0000000000 --- a/docs/examples/guide/a62833baf15f2c9ac094a9289e56a012.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'timeseries', - body: { - message: 'logged the request', - "@timestamp": '1591890611' - } -) -puts response ----- diff --git a/docs/examples/guide/a63e0d0504e0c9313814b7f4e2641353.asciidoc b/docs/examples/guide/a63e0d0504e0c9313814b7f4e2641353.asciidoc deleted file mode 100644 index 4c99bb36fe..0000000000 --- a/docs/examples/guide/a63e0d0504e0c9313814b7f4e2641353.asciidoc +++ /dev/null @@ -1,107 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'metrics_index', - body: { - mappings: { - properties: { - network: { - properties: { - name: { - type: 'keyword' - } - } - }, - latency_histo: { - type: 'histogram' - } - } - } - } -) -puts response - -response = client.index( - index: 'metrics_index', - id: 1, - refresh: true, - body: { - 'network.name' => 'net-1', - latency_histo: { - values: [ - 1, - 3, - 8, - 12, - 15 - ], - counts: [ - 3, - 7, - 23, - 12, - 6 - ] - } - } -) -puts response - -response = client.index( - index: 'metrics_index', - id: 2, - refresh: true, - body: { - 'network.name' => 'net-2', - latency_histo: { - values: [ - 1, - 6, - 8, - 12, - 14 - ], - counts: [ - 8, - 17, - 8, - 7, - 6 - ] - } - } -) -puts response - -response = client.search( - index: 'metrics_index', - size: 0, - filter_path: 'aggregations', - body: { - aggregations: { - latency_ranges: { - range: { - field: 'latency_histo', - ranges: [ - { - to: 2 - }, - { - from: 2, - to: 3 - }, - { - from: 3, - to: 10 - }, - { - from: 10 - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a669e9d56e34c95ef4c780e92ed307f1.asciidoc b/docs/examples/guide/a669e9d56e34c95ef4c780e92ed307f1.asciidoc deleted file mode 100644 index 8535dd967c..0000000000 --- a/docs/examples/guide/a669e9d56e34c95ef4c780e92ed307f1.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.eql.get( - id: 'FjlmbndxNmJjU0RPdExBTGg0elNOOEEaQk9xSjJBQzBRMldZa1VVQ2pPa01YUToxMDY=' -) -puts response ----- diff --git a/docs/examples/guide/a692b4c0ca7825c467880b346841f5a5.asciidoc b/docs/examples/guide/a692b4c0ca7825c467880b346841f5a5.asciidoc deleted file mode 100644 index 91fbca4735..0000000000 --- a/docs/examples/guide/a692b4c0ca7825c467880b346841f5a5.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - name: { - properties: { - first: { - type: 'text' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a699189c8d1a7573beeaea768f2fc618.asciidoc b/docs/examples/guide/a699189c8d1a7573beeaea768f2fc618.asciidoc deleted file mode 100644 index 5e4a67a850..0000000000 --- a/docs/examples/guide/a699189c8d1a7573beeaea768f2fc618.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.restore( - repository: 'my_repository', - snapshot: 'snapshot-20200617', - body: { - indices: 'kibana_sample_data_flights,.ds-my-data-stream-2022.06.17-000001', - include_aliases: true - } -) -puts response ----- diff --git a/docs/examples/guide/a69b1ce5cc9528fb3639185eaf241ae3.asciidoc b/docs/examples/guide/a69b1ce5cc9528fb3639185eaf241ae3.asciidoc deleted file mode 100644 index be36ce35fb..0000000000 --- a/docs/examples/guide/a69b1ce5cc9528fb3639185eaf241ae3.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.clear_scroll( - body: { - scroll_id: 'DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==' - } -) -puts response ----- diff --git a/docs/examples/guide/a6b2815d54df34b6b8d00226e9a1af0c.asciidoc b/docs/examples/guide/a6b2815d54df34b6b8d00226e9a1af0c.asciidoc deleted file mode 100644 index d57dc991c2..0000000000 --- a/docs/examples/guide/a6b2815d54df34b6b8d00226e9a1af0c.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index', - body: { - mappings: { - properties: { - 'my_embeddings.predicted_value' => { - type: 'dense_vector', - dims: 384 - }, - my_text_field: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a6bb306ca250cf651f19cae808b97012.asciidoc b/docs/examples/guide/a6bb306ca250cf651f19cae808b97012.asciidoc deleted file mode 100644 index 66f725d995..0000000000 --- a/docs/examples/guide/a6bb306ca250cf651f19cae808b97012.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/a6be6c1cb4a556866fdccb0dee2f1dea.asciidoc b/docs/examples/guide/a6be6c1cb4a556866fdccb0dee2f1dea.asciidoc deleted file mode 100644 index 7c525efd39..0000000000 --- a/docs/examples/guide/a6be6c1cb4a556866fdccb0dee2f1dea.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.exists_template( - name: 'template_1' -) -puts response ----- diff --git a/docs/examples/guide/a6ccac9f80c5e5efdaab992f3a32d919.asciidoc b/docs/examples/guide/a6ccac9f80c5e5efdaab992f3a32d919.asciidoc deleted file mode 100644 index 657939dede..0000000000 --- a/docs/examples/guide/a6ccac9f80c5e5efdaab992f3a32d919.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_data_stream( - name: 'dsl-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/a6ef8cd8c8218d547727ffc5485bfbd7.asciidoc b/docs/examples/guide/a6ef8cd8c8218d547727ffc5485bfbd7.asciidoc deleted file mode 100644 index 9f4d3a3a6d..0000000000 --- a/docs/examples/guide/a6ef8cd8c8218d547727ffc5485bfbd7.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - range: { - date_range: { - field: 'date', - missing: '1976/11/30', - ranges: [ - { - key: 'Older', - to: '2016/02/01' - }, - { - key: 'Newer', - from: '2016/02/01', - to: 'now/d' - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a6fdd0100cd362df54af6c95d1055c96.asciidoc b/docs/examples/guide/a6fdd0100cd362df54af6c95d1055c96.asciidoc deleted file mode 100644 index adee29f2d5..0000000000 --- a/docs/examples/guide/a6fdd0100cd362df54af6c95d1055c96.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_mapping( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/a72613de3774571ba24def4b495161b5.asciidoc b/docs/examples/guide/a72613de3774571ba24def4b495161b5.asciidoc deleted file mode 100644 index c0e8cfd7ec..0000000000 --- a/docs/examples/guide/a72613de3774571ba24def4b495161b5.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - properties: { - user_id: { - type: 'alias', - path: 'user_identifier' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a735081e715d385b4d471eea0f2b57da.asciidoc b/docs/examples/guide/a735081e715d385b4d471eea0f2b57da.asciidoc deleted file mode 100644 index a53ca0b4b8..0000000000 --- a/docs/examples/guide/a735081e715d385b4d471eea0f2b57da.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'slm.retention_schedule' => '0 30 1 * * ?' - } - } -) -puts response ----- diff --git a/docs/examples/guide/a73a9a6f19516b8ead63182a9ae5b540.asciidoc b/docs/examples/guide/a73a9a6f19516b8ead63182a9ae5b540.asciidoc deleted file mode 100644 index 4572bd40b9..0000000000 --- a/docs/examples/guide/a73a9a6f19516b8ead63182a9ae5b540.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'MULTILINESTRING ((1002.0 200.0, 1003.0 200.0, 1003.0 300.0, 1002.0 300.0), (1000.0 100.0, 1001.0 100.0, 1001.0 100.0, 1000.0 100.0), (1000.2 0.2, 1000.8 100.2, 1000.8 100.8, 1000.2 100.8))' - } -) -puts response ----- diff --git a/docs/examples/guide/a78dfb844d385405d4b0fb0e09b4a5a4.asciidoc b/docs/examples/guide/a78dfb844d385405d4b0fb0e09b4a5a4.asciidoc deleted file mode 100644 index da41779cb7..0000000000 --- a/docs/examples/guide/a78dfb844d385405d4b0fb0e09b4a5a4.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'test', - id: 1, - body: { - script: "ctx._source['my-object'].remove('my-subfield')" - } -) -puts response ----- diff --git a/docs/examples/guide/a799477dff04578b200788a63f9cff71.asciidoc b/docs/examples/guide/a799477dff04578b200788a63f9cff71.asciidoc deleted file mode 100644 index 6d631c2898..0000000000 --- a/docs/examples/guide/a799477dff04578b200788a63f9cff71.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'ip_addresses', - body: { - size: 0, - aggregations: { - ip_ranges: { - ip_range: { - field: 'ip', - ranges: [ - { - key: 'infinity', - to: '10.0.0.5' - }, - { - key: 'and-beyond', - from: '10.0.0.5' - } - ], - keyed: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a7cf31f4b907e4c00132aca75f55790c.asciidoc b/docs/examples/guide/a7cf31f4b907e4c00132aca75f55790c.asciidoc deleted file mode 100644 index 509798ce86..0000000000 --- a/docs/examples/guide/a7cf31f4b907e4c00132aca75f55790c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ingest.delete_pipeline( - id: 'pipeline-one' -) -puts response ----- diff --git a/docs/examples/guide/a7e58d4dc477a84c1306fd5749aafd8b.asciidoc b/docs/examples/guide/a7e58d4dc477a84c1306fd5749aafd8b.asciidoc deleted file mode 100644 index 4b3b4e0453..0000000000 --- a/docs/examples/guide/a7e58d4dc477a84c1306fd5749aafd8b.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - age: { - type: 'integer' - }, - email: { - type: 'keyword' - }, - name: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a8019280dab5b04211ae3b21e5e08223.asciidoc b/docs/examples/guide/a8019280dab5b04211ae3b21e5e08223.asciidoc deleted file mode 100644 index 356620442d..0000000000 --- a/docs/examples/guide/a8019280dab5b04211ae3b21e5e08223.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.create_repository( - repository: 'my_fs_backup', - body: { - type: 'fs', - settings: { - location: 'My_fs_backup_location' - } - } -) -puts response ----- diff --git a/docs/examples/guide/a810da963d3b28d79dcd17be829bb271.asciidoc b/docs/examples/guide/a810da963d3b28d79dcd17be829bb271.asciidoc deleted file mode 100644 index 41aab2f2eb..0000000000 --- a/docs/examples/guide/a810da963d3b28d79dcd17be829bb271.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - docvalue_fields: [ - 'user.id', - 'http.response.*', - { - field: 'date', - format: 'epoch_millis' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/a811b82ba4632bdd9065829085188bc9.asciidoc b/docs/examples/guide/a811b82ba4632bdd9065829085188bc9.asciidoc deleted file mode 100644 index cdee362147..0000000000 --- a/docs/examples/guide/a811b82ba4632bdd9065829085188bc9.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get( - repository: 'my_repository', - snapshot: 'my_snapshot' -) -puts response ----- diff --git a/docs/examples/guide/a861a89f52008610e813b9f073951c58.asciidoc b/docs/examples/guide/a861a89f52008610e813b9f073951c58.asciidoc deleted file mode 100644 index 60e91bb966..0000000000 --- a/docs/examples/guide/a861a89f52008610e813b9f073951c58.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.stats( - metric: 'merge,refresh' -) -puts response ----- diff --git a/docs/examples/guide/a89052bcdfe40e604a98d12be6ae59d2.asciidoc b/docs/examples/guide/a89052bcdfe40e604a98d12be6ae59d2.asciidoc deleted file mode 100644 index 8e362dc364..0000000000 --- a/docs/examples/guide/a89052bcdfe40e604a98d12be6ae59d2.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'BBOX (100.0, 102.0, 2.0, 0.0)' - } -) -puts response ----- diff --git a/docs/examples/guide/a8add749c3f41ad1308a45308df14103.asciidoc b/docs/examples/guide/a8add749c3f41ad1308a45308df14103.asciidoc deleted file mode 100644 index fc67c30409..0000000000 --- a/docs/examples/guide/a8add749c3f41ad1308a45308df14103.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'sales', - id: 1, - refresh: true, - body: { - tags: [ - 'car', - 'auto' - ], - comments: [ - { - username: 'baddriver007', - comment: 'This car could have better brakes' - }, - { - username: 'dr_who', - comment: "Where's the autopilot? Can't find it" - }, - { - username: 'ilovemotorbikes', - comment: 'This car has two extra wheels' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/a941fd568f2e20e13df909ab24506073.asciidoc b/docs/examples/guide/a941fd568f2e20e13df909ab24506073.asciidoc deleted file mode 100644 index f8027fdd08..0000000000 --- a/docs/examples/guide/a941fd568f2e20e13df909ab24506073.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_settings -puts response - -response = client.cluster.put_settings( - body: { - persistent: { - 'xpack.monitoring.collection.enabled' => false - } - } -) -puts response ----- diff --git a/docs/examples/guide/a9554396506888e392a1aee0ca28e6fc.asciidoc b/docs/examples/guide/a9554396506888e392a1aee0ca28e6fc.asciidoc deleted file mode 100644 index 9c77b62780..0000000000 --- a/docs/examples/guide/a9554396506888e392a1aee0ca28e6fc.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.indices.update_aliases( - body: { - actions: [ - { - add: { - index: 'my-index-2099.05.06-000001', - alias: 'my-alias', - filter: { - bool: { - filter: [ - { - range: { - "@timestamp": { - gte: 'now-1d/d', - lt: 'now/d' - } - } - }, - { - term: { - 'user.id' => 'kimchy' - } - } - ] - } - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/a95a123b9f862e52ab1e8f875961c852.asciidoc b/docs/examples/guide/a95a123b9f862e52ab1e8f875961c852.asciidoc deleted file mode 100644 index 9d8987a371..0000000000 --- a/docs/examples/guide/a95a123b9f862e52ab1e8f875961c852.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - indices_boost: [ - { - "my-index-000001": 1.4 - }, - { - "my-index-000002": 1.3 - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/a960b43e720b4934edb74ab4b085ca77.asciidoc b/docs/examples/guide/a960b43e720b4934edb74ab4b085ca77.asciidoc deleted file mode 100644 index 124637796e..0000000000 --- a/docs/examples/guide/a960b43e720b4934edb74ab4b085ca77.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.connector.list -puts response ----- diff --git a/docs/examples/guide/a97aace57c6442bbb90e1e14effbcda3.asciidoc b/docs/examples/guide/a97aace57c6442bbb90e1e14effbcda3.asciidoc deleted file mode 100644 index 5cfc5c27ac..0000000000 --- a/docs/examples/guide/a97aace57c6442bbb90e1e14effbcda3.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'csv', - body: { - query: 'SELECT * FROM library ORDER BY page_count DESC', - fetch_size: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/a97f984c01fa1d96e6d33a0e8e2cb90f.asciidoc b/docs/examples/guide/a97f984c01fa1d96e6d33a0e8e2cb90f.asciidoc deleted file mode 100644 index 1582522828..0000000000 --- a/docs/examples/guide/a97f984c01fa1d96e6d33a0e8e2cb90f.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - query: { - type: 'percolator' - }, - field: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a985e6b7b2ead9c3f30a9bc97d8b598e.asciidoc b/docs/examples/guide/a985e6b7b2ead9c3f30a9bc97d8b598e.asciidoc deleted file mode 100644 index 876560f28e..0000000000 --- a/docs/examples/guide/a985e6b7b2ead9c3f30a9bc97d8b598e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.field_caps( - fields: 'rating,title' -) -puts response ----- diff --git a/docs/examples/guide/a98692a565904ec0783884d81a7b71fc.asciidoc b/docs/examples/guide/a98692a565904ec0783884d81a7b71fc.asciidoc deleted file mode 100644 index 401f4a079c..0000000000 --- a/docs/examples/guide/a98692a565904ec0783884d81a7b71fc.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.health( - v: true -) -puts response ----- diff --git a/docs/examples/guide/a999b5661bebb802bbbfe04faacf1971.asciidoc b/docs/examples/guide/a999b5661bebb802bbbfe04faacf1971.asciidoc deleted file mode 100644 index 39201c1a45..0000000000 --- a/docs/examples/guide/a999b5661bebb802bbbfe04faacf1971.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'my-index-2099.10.*' - }, - dest: { - index: 'my-index-2099.10' - } - } -) -puts response ----- diff --git a/docs/examples/guide/a99bc141066ef673e35f306157750ec9.asciidoc b/docs/examples/guide/a99bc141066ef673e35f306157750ec9.asciidoc deleted file mode 100644 index 13e22637c9..0000000000 --- a/docs/examples/guide/a99bc141066ef673e35f306157750ec9.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'lowercase', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/a99bf70ae38bdf1c6f350140b25e0422.asciidoc b/docs/examples/guide/a99bf70ae38bdf1c6f350140b25e0422.asciidoc deleted file mode 100644 index 270145cd97..0000000000 --- a/docs/examples/guide/a99bf70ae38bdf1c6f350140b25e0422.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - routing: 'my-routing-value', - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/a9c08023354aa9b9023807962df71d13.asciidoc b/docs/examples/guide/a9c08023354aa9b9023807962df71d13.asciidoc deleted file mode 100644 index 7aad60c2c4..0000000000 --- a/docs/examples/guide/a9c08023354aa9b9023807962df71d13.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.forcemerge( - index: 'my-index-000001,my-index-000002' -) -puts response ----- diff --git a/docs/examples/guide/a9fe70387d9c96a07830e1859c57efbb.asciidoc b/docs/examples/guide/a9fe70387d9c96a07830e1859c57efbb.asciidoc deleted file mode 100644 index e9bc891c0d..0000000000 --- a/docs/examples/guide/a9fe70387d9c96a07830e1859c57efbb.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - number_of_shards: 3, - number_of_replicas: 2 - } - } -) -puts response ----- diff --git a/docs/examples/guide/aa1771b702f4b771491ba4ab743a9197.asciidoc b/docs/examples/guide/aa1771b702f4b771491ba4ab743a9197.asciidoc deleted file mode 100644 index 2ebf888f66..0000000000 --- a/docs/examples/guide/aa1771b702f4b771491ba4ab743a9197.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_settings( - index: 'my-index-000001', - name: 'index.number_of_replicas' -) -puts response ----- diff --git a/docs/examples/guide/aa3284717241ed79d3d1d3bdbbdce598.asciidoc b/docs/examples/guide/aa3284717241ed79d3d1d3bdbbdce598.asciidoc deleted file mode 100644 index 6f81cce74e..0000000000 --- a/docs/examples/guide/aa3284717241ed79d3d1d3bdbbdce598.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'lowercase' - ], - text: 'THE Quick FoX JUMPs' - } -) -puts response ----- diff --git a/docs/examples/guide/aa5fbb68d3a8e0d0c894791cb6cf0b13.asciidoc b/docs/examples/guide/aa5fbb68d3a8e0d0c894791cb6cf0b13.asciidoc deleted file mode 100644 index f848523dc9..0000000000 --- a/docs/examples/guide/aa5fbb68d3a8e0d0c894791cb6cf0b13.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'reverse_example', - body: { - settings: { - analysis: { - analyzer: { - whitespace_reverse: { - tokenizer: 'whitespace', - filter: [ - 'reverse' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/aa699ff3234f54d091575a38e859a627.asciidoc b/docs/examples/guide/aa699ff3234f54d091575a38e859a627.asciidoc deleted file mode 100644 index b19a1bb88c..0000000000 --- a/docs/examples/guide/aa699ff3234f54d091575a38e859a627.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - typed_keys: true, - body: { - aggregations: { - "my-agg-name": { - histogram: { - field: 'my-field', - interval: 1000 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/aa7f62279b487989440d423c1ed4a1c0.asciidoc b/docs/examples/guide/aa7f62279b487989440d423c1ed4a1c0.asciidoc deleted file mode 100644 index 5ced48af6e..0000000000 --- a/docs/examples/guide/aa7f62279b487989440d423c1ed4a1c0.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_index_template( - name: '*', - filter_path: 'index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream' -) -puts response ----- diff --git a/docs/examples/guide/aaa7a61b07861235fb6e489b946c705c.asciidoc b/docs/examples/guide/aaa7a61b07861235fb6e489b946c705c.asciidoc deleted file mode 100644 index efa625ba9d..0000000000 --- a/docs/examples/guide/aaa7a61b07861235fb6e489b946c705c.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - version: 2, - version_type: 'external', - body: { - user: { - id: 'elkbee' - } - } -) -puts response ----- diff --git a/docs/examples/guide/aab3de5a8a3fefbe012fc2ed50dfe4d6.asciidoc b/docs/examples/guide/aab3de5a8a3fefbe012fc2ed50dfe4d6.asciidoc deleted file mode 100644 index a807259156..0000000000 --- a/docs/examples/guide/aab3de5a8a3fefbe012fc2ed50dfe4d6.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.searchable_snapshots.cache_stats -puts response ----- diff --git a/docs/examples/guide/aaba346e0becdf12db13658296e0b8a1.asciidoc b/docs/examples/guide/aaba346e0becdf12db13658296e0b8a1.asciidoc deleted file mode 100644 index d085b8a838..0000000000 --- a/docs/examples/guide/aaba346e0becdf12db13658296e0b8a1.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - 'index.number_of_shards' => 2, - 'index.lifecycle.name' => 'shrink-index' - } - } -) -puts response ----- diff --git a/docs/examples/guide/ab0fd1908c9957cc7f63165c156e48cd.asciidoc b/docs/examples/guide/ab0fd1908c9957cc7f63165c156e48cd.asciidoc deleted file mode 100644 index 25241b4c24..0000000000 --- a/docs/examples/guide/ab0fd1908c9957cc7f63165c156e48cd.asciidoc +++ /dev/null @@ -1,55 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - user_id: { - type: 'keyword' - }, - last_updated: { - type: 'date' - }, - session_data: { - type: 'object', - enabled: false - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'session_1', - body: { - user_id: 'kimchy', - session_data: { - arbitrary_object: { - some_array: [ - 'foo', - 'bar', - { - baz: 2 - } - ] - } - }, - last_updated: '2015-12-06T18:20:22' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'session_2', - body: { - user_id: 'jpountz', - session_data: 'none', - last_updated: '2015-12-06T18:22:13' - } -) -puts response ----- diff --git a/docs/examples/guide/ab1372270c11bcd6f36d1a13e6c69276.asciidoc b/docs/examples/guide/ab1372270c11bcd6f36d1a13e6c69276.asciidoc deleted file mode 100644 index e3b2dbd0df..0000000000 --- a/docs/examples/guide/ab1372270c11bcd6f36d1a13e6c69276.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.async_search.submit( - index: 'my-index-000001,cluster_one:my-index-000001,cluster_two:my-index-000001', - ccs_minimize_roundtrips: true, - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - _source: [ - 'user.id', - 'message', - 'http.response.status_code' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/ab1a989958c1d345a9dc3dd36ad90c27.asciidoc b/docs/examples/guide/ab1a989958c1d345a9dc3dd36ad90c27.asciidoc deleted file mode 100644 index 8a9983834c..0000000000 --- a/docs/examples/guide/ab1a989958c1d345a9dc3dd36ad90c27.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'POLYGON ((1000.0 1000.0, 1001.0 1000.0, 1001.0 1001.0, 1000.0 1001.0, 1000.0 1000.0), (1000.2 1000.2, 1000.8 1000.2, 1000.8 1000.8, 1000.2 1000.8, 1000.2 1000.2))' - } -) -puts response ----- diff --git a/docs/examples/guide/ab24bfdfd8c1c7b3044b21a3b4684370.asciidoc b/docs/examples/guide/ab24bfdfd8c1c7b3044b21a3b4684370.asciidoc deleted file mode 100644 index 29cf846cdb..0000000000 --- a/docs/examples/guide/ab24bfdfd8c1c7b3044b21a3b4684370.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - cost_price: 100 - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - script_fields: { - sales_price: { - script: { - lang: 'expression', - source: "doc['cost_price'] * markup", - params: { - markup: 0.2 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ab29bfbd35ee482cf54052b03d62cd31.asciidoc b/docs/examples/guide/ab29bfbd35ee482cf54052b03d62cd31.asciidoc deleted file mode 100644 index 28b99c7be6..0000000000 --- a/docs/examples/guide/ab29bfbd35ee482cf54052b03d62cd31.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - rings: { - geo_distance: { - field: 'location', - origin: 'POINT (4.894 52.3760)', - unit: 'km', - ranges: [ - { - to: 100 - }, - { - from: 100, - to: 300 - }, - { - from: 300 - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ab317aa09c4bd44abbf02517141e37ef.asciidoc b/docs/examples/guide/ab317aa09c4bd44abbf02517141e37ef.asciidoc deleted file mode 100644 index 7d7df46a39..0000000000 --- a/docs/examples/guide/ab317aa09c4bd44abbf02517141e37ef.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - text: { - type: 'text', - term_vector: 'with_positions_offsets' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - text: 'Quick brown fox' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - text: 'brown fox' - } - }, - highlight: { - fields: { - text: {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ab3c36b70459093beafbfd3a7ae75b9b.asciidoc b/docs/examples/guide/ab3c36b70459093beafbfd3a7ae75b9b.asciidoc deleted file mode 100644 index 37e63bea61..0000000000 --- a/docs/examples/guide/ab3c36b70459093beafbfd3a7ae75b9b.asciidoc +++ /dev/null @@ -1,48 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - date: '2015-10-01T05:30:00Z' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - refresh: true, - body: { - date: '2015-10-01T06:30:00Z' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - size: 0, - body: { - aggregations: { - my_buckets: { - composite: { - sources: [ - { - date: { - date_histogram: { - field: 'date', - calendar_interval: 'day', - offset: '+6h', - format: 'iso8601' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ab8b4537fad80107bc88f633d4039a52.asciidoc b/docs/examples/guide/ab8b4537fad80107bc88f633d4039a52.asciidoc deleted file mode 100644 index ccae805366..0000000000 --- a/docs/examples/guide/ab8b4537fad80107bc88f633d4039a52.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'logs', - body: { - aliases: { - "": {} - } - } -) -puts response ----- diff --git a/docs/examples/guide/ab8de34fcfc0277901cb39618ecfc9d5.asciidoc b/docs/examples/guide/ab8de34fcfc0277901cb39618ecfc9d5.asciidoc deleted file mode 100644 index 506d8fd8d2..0000000000 --- a/docs/examples/guide/ab8de34fcfc0277901cb39618ecfc9d5.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.allocation_explain( - body: { - index: 'my-index-000001', - shard: 0, - primary: true - } -) -puts response ----- diff --git a/docs/examples/guide/abb4a58089574211d434946a923e5725.asciidoc b/docs/examples/guide/abb4a58089574211d434946a923e5725.asciidoc deleted file mode 100644 index 8dd4c99a41..0000000000 --- a/docs/examples/guide/abb4a58089574211d434946a923e5725.asciidoc +++ /dev/null @@ -1,88 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'kibana_sample_data_logs', - body: { - size: 0, - aggregations: { - client_ip: { - composite: { - sources: [ - { - client_ip: { - terms: { - field: 'clientip' - } - } - } - ] - }, - aggregations: { - url_dc: { - cardinality: { - field: 'url.keyword' - } - }, - bytes_sum: { - sum: { - field: 'bytes' - } - }, - geo_src_dc: { - cardinality: { - field: 'geo.src' - } - }, - geo_dest_dc: { - cardinality: { - field: 'geo.dest' - } - }, - responses_total: { - value_count: { - field: 'timestamp' - } - }, - success: { - filter: { - term: { - response: '200' - } - } - }, - "error404": { - filter: { - term: { - response: '404' - } - } - }, - "error503": { - filter: { - term: { - response: '503' - } - } - }, - malicious_client_ip: { - inference: { - model_id: 'malicious_clients_model', - buckets_path: { - response_count: 'responses_total', - url_dc: 'url_dc', - bytes_sum: 'bytes_sum', - geo_src_dc: 'geo_src_dc', - geo_dest_dc: 'geo_dest_dc', - success: 'success._count', - "error404": 'error404._count', - "error503": 'error503._count' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/abc280775734daa6cf2c28868e155d10.asciidoc b/docs/examples/guide/abc280775734daa6cf2c28868e155d10.asciidoc deleted file mode 100644 index ca0d30938f..0000000000 --- a/docs/examples/guide/abc280775734daa6cf2c28868e155d10.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'exams', - refresh: true, - body: { - grade: [ - 1, - 2, - 3 - ], - weight: 2 - } -) -puts response - -response = client.search( - index: 'exams', - body: { - size: 0, - aggregations: { - weighted_grade: { - weighted_avg: { - value: { - field: 'grade' - }, - weight: { - field: 'weight' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/abc496de5fd013099a134db369b34a8b.asciidoc b/docs/examples/guide/abc496de5fd013099a134db369b34a8b.asciidoc deleted file mode 100644 index c8b9f1e61e..0000000000 --- a/docs/examples/guide/abc496de5fd013099a134db369b34a8b.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - query: { - constant_score: { - filter: { - match: { - type: 'hat' - } - } - } - }, - aggregations: { - hat_prices: { - sum: { - field: 'price', - missing: 100 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/abc7a670a47516b58b6b07d7497b140c.asciidoc b/docs/examples/guide/abc7a670a47516b58b6b07d7497b140c.asciidoc deleted file mode 100644 index 6880d77fc0..0000000000 --- a/docs/examples/guide/abc7a670a47516b58b6b07d7497b140c.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'index', - body: { - query: { - constant_score: { - filter: { - bool: { - should: [ - { - range: { - my_date: { - gte: 'now-1h', - lte: 'now-1h/m' - } - } - }, - { - range: { - my_date: { - gt: 'now-1h/m', - lt: 'now/m' - } - } - }, - { - range: { - my_date: { - gte: 'now/m', - lte: 'now' - } - } - } - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc b/docs/examples/guide/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc deleted file mode 100644 index a4704ebae7..0000000000 --- a/docs/examples/guide/abd4fc3ce7784413a56fe2dcfe2809b5.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'test', - filter_path: 'hits.total', - body: { - query: { - match: { - flag: 'foo' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ac366b9dda7040e743dee85335354094.asciidoc b/docs/examples/guide/ac366b9dda7040e743dee85335354094.asciidoc deleted file mode 100644 index e7e5ce2ead..0000000000 --- a/docs/examples/guide/ac366b9dda7040e743dee85335354094.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - { - type: 'shingle', - min_shingle_size: 2, - max_shingle_size: 3 - } - ], - text: 'quick brown fox jumps' - } -) -puts response ----- diff --git a/docs/examples/guide/ac483996d479946d57c374c3a86b2621.asciidoc b/docs/examples/guide/ac483996d479946d57c374c3a86b2621.asciidoc deleted file mode 100644 index 0c5fa993ee..0000000000 --- a/docs/examples/guide/ac483996d479946d57c374c3a86b2621.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - my_field: { - type: 'search_as_you_type' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ac497917ef707538198a8458ae3d5c6b.asciidoc b/docs/examples/guide/ac497917ef707538198a8458ae3d5c6b.asciidoc deleted file mode 100644 index 16d0319bca..0000000000 --- a/docs/examples/guide/ac497917ef707538198a8458ae3d5c6b.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - message: 'this is a test' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc b/docs/examples/guide/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc deleted file mode 100644 index 33b2a00167..0000000000 --- a/docs/examples/guide/ac73895ca1882cd1ac65b1facfbb5c63.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.delete_by_query( - index: 'my-index-000001', - body: { - query: { - match: { - 'user.id' => 'elkbee' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ac8328bc51fd396b3ce5f7ef3e1e73df.asciidoc b/docs/examples/guide/ac8328bc51fd396b3ce5f7ef3e1e73df.asciidoc deleted file mode 100644 index d0c6c5a66a..0000000000 --- a/docs/examples/guide/ac8328bc51fd396b3ce5f7ef3e1e73df.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get_repository -puts response ----- diff --git a/docs/examples/guide/ac85e05c0bf2fd5099fbcb9c492f447e.asciidoc b/docs/examples/guide/ac85e05c0bf2fd5099fbcb9c492f447e.asciidoc deleted file mode 100644 index 7b7834d1f7..0000000000 --- a/docs/examples/guide/ac85e05c0bf2fd5099fbcb9c492f447e.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - flat_settings: true, - body: { - transient: { - 'indices.recovery.max_bytes_per_sec' => '20mb' - } - } -) -puts response ----- diff --git a/docs/examples/guide/ac9fe9b64891095bcf84066f719b3dc4.asciidoc b/docs/examples/guide/ac9fe9b64891095bcf84066f719b3dc4.asciidoc deleted file mode 100644 index e3315bf501..0000000000 --- a/docs/examples/guide/ac9fe9b64891095bcf84066f719b3dc4.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.create_repository( - repository: 'my_src_only_repository', - body: { - type: 'source', - settings: { - delegate_type: 'fs', - location: 'my_backup_repository' - } - } -) -puts response ----- diff --git a/docs/examples/guide/acb10091ad335ddd15d71021aaf23c62.asciidoc b/docs/examples/guide/acb10091ad335ddd15d71021aaf23c62.asciidoc deleted file mode 100644 index b16d810899..0000000000 --- a/docs/examples/guide/acb10091ad335ddd15d71021aaf23c62.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - track_scores: true, - sort: [ - { - post_date: { - order: 'desc' - } - }, - { - name: 'desc' - }, - { - age: 'desc' - } - ], - query: { - term: { - user: 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/acb850c08f51226eadb75be09e336076.asciidoc b/docs/examples/guide/acb850c08f51226eadb75be09e336076.asciidoc deleted file mode 100644 index 9a96141db6..0000000000 --- a/docs/examples/guide/acb850c08f51226eadb75be09e336076.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.async_search.status( - id: 'FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=' -) -puts response ----- diff --git a/docs/examples/guide/acc52da725a996ae696b00d9f818dfde.asciidoc b/docs/examples/guide/acc52da725a996ae696b00d9f818dfde.asciidoc deleted file mode 100644 index 970fbee157..0000000000 --- a/docs/examples/guide/acc52da725a996ae696b00d9f818dfde.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - index: 'file-path-test', - body: { - analyzer: 'custom_path_tree', - text: '/User/alice/photos/2017/05/16/my_photo1.jpg' - } -) -puts response - -response = client.indices.analyze( - index: 'file-path-test', - body: { - analyzer: 'custom_path_tree_reversed', - text: '/User/alice/photos/2017/05/16/my_photo1.jpg' - } -) -puts response ----- diff --git a/docs/examples/guide/acc6cd860032167e34fa5e0c043ab3b0.asciidoc b/docs/examples/guide/acc6cd860032167e34fa5e0c043ab3b0.asciidoc deleted file mode 100644 index e26791c13d..0000000000 --- a/docs/examples/guide/acc6cd860032167e34fa5e0c043ab3b0.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - query: 'city.\\*:(this AND that OR thus)' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc b/docs/examples/guide/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc deleted file mode 100644 index fd37d49c74..0000000000 --- a/docs/examples/guide/ad0dcbc7fc619e952c8825b8f307b7b2.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - multi_match: { - query: 'Jon', - type: 'cross_fields', - fields: [ - 'first', - 'first.edge', - 'last', - 'last.edge' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ad2416ca0581316cee6c63129685bca5.asciidoc b/docs/examples/guide/ad2416ca0581316cee6c63129685bca5.asciidoc deleted file mode 100644 index 61b2096634..0000000000 --- a/docs/examples/guide/ad2416ca0581316cee6c63129685bca5.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - fields: [ - 'title', - 'content' - ], - query: 'this OR that OR thus', - minimum_should_match: 2 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ad2b8aed84c67cdc295917b47a12d3dc.asciidoc b/docs/examples/guide/ad2b8aed84c67cdc295917b47a12d3dc.asciidoc deleted file mode 100644 index 1e3b94b96d..0000000000 --- a/docs/examples/guide/ad2b8aed84c67cdc295917b47a12d3dc.asciidoc +++ /dev/null @@ -1,52 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-image-index', - refresh: true, - body: [ - { - index: { - _id: '1' - } - }, - { - "image-vector": [ - 1, - 5, - -20 - ], - "file-type": 'jpg', - title: 'mountain lake' - }, - { - index: { - _id: '2' - } - }, - { - "image-vector": [ - 42, - 8, - -15 - ], - "file-type": 'png', - title: 'frozen lake' - }, - { - index: { - _id: '3' - } - }, - { - "image-vector": [ - 15, - 11, - 23 - ], - "file-type": 'jpg', - title: 'mountain lake lodge' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/ad3b159657d4bcb373623fdc61acc3bf.asciidoc b/docs/examples/guide/ad3b159657d4bcb373623fdc61acc3bf.asciidoc deleted file mode 100644 index cdeed24963..0000000000 --- a/docs/examples/guide/ad3b159657d4bcb373623fdc61acc3bf.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.count( - index: 'my-index-000001', - q: 'user:kimchy' -) -puts response ----- diff --git a/docs/examples/guide/ad57ccba0a060da4f5313692fa26a235.asciidoc b/docs/examples/guide/ad57ccba0a060da4f5313692fa26a235.asciidoc deleted file mode 100644 index 0232ddbc25..0000000000 --- a/docs/examples/guide/ad57ccba0a060da4f5313692fa26a235.asciidoc +++ /dev/null @@ -1,73 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - date: { - type: 'date_nanos' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'my-index-000001', - refresh: true, - body: [ - { - index: { - _id: '1' - } - }, - { - date: '2015-01-01' - }, - { - index: { - _id: '2' - } - }, - { - date: '2015-01-01T12:10:30.123456789Z' - }, - { - index: { - _id: '3' - } - }, - { - date: 1_420_070_400_000 - } - ] -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - sort: { - date: 'asc' - }, - runtime_mappings: { - date_has_nanos: { - type: 'boolean', - script: "emit(doc['date'].value.nano != 0)" - } - }, - fields: [ - { - field: 'date', - format: 'strict_date_optional_time_nanos' - }, - { - field: 'date_has_nanos' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/ad63eca6829a25293c9be589c1870547.asciidoc b/docs/examples/guide/ad63eca6829a25293c9be589c1870547.asciidoc deleted file mode 100644 index 3e8e135357..0000000000 --- a/docs/examples/guide/ad63eca6829a25293c9be589c1870547.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'date', - calendar_interval: '1M' - }, - aggregations: { - the_sum: { - sum: { - field: 'price' - } - }, - the_moving_sum: { - moving_fn: { - buckets_path: 'the_sum', - window: 10, - script: 'MovingFunctions.sum(values)' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ad6d81be5fad4bad87486b699454dce5.asciidoc b/docs/examples/guide/ad6d81be5fad4bad87486b699454dce5.asciidoc deleted file mode 100644 index 68709f1c2d..0000000000 --- a/docs/examples/guide/ad6d81be5fad4bad87486b699454dce5.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'node_upgrade', - body: { - size: 0, - aggregations: { - startup_time_ttest: { - t_test: { - a: { - field: 'startup_time_before' - }, - b: { - field: 'startup_time_after' - }, - type: 'paired' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ad88e46bb06739991498dee248850223.asciidoc b/docs/examples/guide/ad88e46bb06739991498dee248850223.asciidoc deleted file mode 100644 index e88b15d152..0000000000 --- a/docs/examples/guide/ad88e46bb06739991498dee248850223.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.cat.thread_pool -puts response ----- diff --git a/docs/examples/guide/ad92a1a8bb1b0f26d1536fe8ba4ffd17.asciidoc b/docs/examples/guide/ad92a1a8bb1b0f26d1536fe8ba4ffd17.asciidoc deleted file mode 100644 index ee7b33f9ea..0000000000 --- a/docs/examples/guide/ad92a1a8bb1b0f26d1536fe8ba4ffd17.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - id: 'my-search-template', - params: { - query_string: 'hello world', - from: 20, - size: 10 - } - } -) -puts response ----- diff --git a/docs/examples/guide/ada2675a9c631da2bfe627fc2618f5ed.asciidoc b/docs/examples/guide/ada2675a9c631da2bfe627fc2618f5ed.asciidoc deleted file mode 100644 index 81ca3189a8..0000000000 --- a/docs/examples/guide/ada2675a9c631da2bfe627fc2618f5ed.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - script_score: { - query: { - match: { - message: 'elasticsearch' - } - }, - script: { - source: "doc['my-int'].value / 10 " - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/adc18ca0c344d81d68ec3b9422b54ff5.asciidoc b/docs/examples/guide/adc18ca0c344d81d68ec3b9422b54ff5.asciidoc deleted file mode 100644 index 7cff204aea..0000000000 --- a/docs/examples/guide/adc18ca0c344d81d68ec3b9422b54ff5.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.msearch( - index: 'my-index-000001', - body: [ - {}, - { - query: { - match_all: {} - }, - from: 0, - size: 10 - }, - {}, - { - query: { - match_all: {} - } - }, - { - index: 'my-index-000002' - }, - { - query: { - match_all: {} - } - } - ] -) -puts response ----- diff --git a/docs/examples/guide/adf728b0c11c5c309c730205609a379d.asciidoc b/docs/examples/guide/adf728b0c11c5c309c730205609a379d.asciidoc deleted file mode 100644 index 29f31dd654..0000000000 --- a/docs/examples/guide/adf728b0c11c5c309c730205609a379d.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - processors: [ - { - set: { - description: "Set dynamic '' field to 'code' value", - field: '{{{service}}}', - value: '{{{code}}}' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/ae0d20c2ebb59278e08a26c9634d90c9.asciidoc b/docs/examples/guide/ae0d20c2ebb59278e08a26c9634d90c9.asciidoc deleted file mode 100644 index f1cf538dce..0000000000 --- a/docs/examples/guide/ae0d20c2ebb59278e08a26c9634d90c9.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.create( - repository: 'my_repository', - snapshot: '' -) -puts response ----- diff --git a/docs/examples/guide/ae398a6b6494e7982ef2549fc2cd2d8e.asciidoc b/docs/examples/guide/ae398a6b6494e7982ef2549fc2cd2d8e.asciidoc deleted file mode 100644 index eeafcaf2fb..0000000000 --- a/docs/examples/guide/ae398a6b6494e7982ef2549fc2cd2d8e.asciidoc +++ /dev/null @@ -1,57 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_templates: [ - { - full_name: { - path_match: [ - 'name.*', - 'user.name.*' - ], - path_unmatch: [ - '*.middle', - '*.midinitial' - ], - mapping: { - type: 'text', - copy_to: 'full_name' - } - } - } - ] - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - name: { - first: 'John', - middle: 'Winston', - last: 'Lennon' - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - user: { - name: { - first: 'Jane', - midinitial: 'M', - last: 'Salazar' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ae4aa368617637a390074535df86e64b.asciidoc b/docs/examples/guide/ae4aa368617637a390074535df86e64b.asciidoc deleted file mode 100644 index a247661fd9..0000000000 --- a/docs/examples/guide/ae4aa368617637a390074535df86e64b.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ml.set_upgrade_mode( - enabled: true, - timeout: '10m' -) -puts response ----- diff --git a/docs/examples/guide/ae591d49e54b838c15cdcf64a8dee9c2.asciidoc b/docs/examples/guide/ae591d49e54b838c15cdcf64a8dee9c2.asciidoc deleted file mode 100644 index 909f922682..0000000000 --- a/docs/examples/guide/ae591d49e54b838c15cdcf64a8dee9c2.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_primary_shard_docs: 10_000_000 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ae9ccfaa146731ab9176df90670db1c2.asciidoc b/docs/examples/guide/ae9ccfaa146731ab9176df90670db1c2.asciidoc deleted file mode 100644 index 42b378a740..0000000000 --- a/docs/examples/guide/ae9ccfaa146731ab9176df90670db1c2.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - body: [ - { - index: { - _index: 'test', - _id: '1' - } - }, - { - "field1": 'value1' - }, - { - delete: { - _index: 'test', - _id: '2' - } - }, - { - create: { - _index: 'test', - _id: '3' - } - }, - { - "field1": 'value3' - }, - { - update: { - _id: '1', - _index: 'test' - } - }, - { - doc: { - "field2": 'value2' - } - } - ] -) -puts response ----- diff --git a/docs/examples/guide/aeaa97939a05f5b2f3f2c43b771f35e3.asciidoc b/docs/examples/guide/aeaa97939a05f5b2f3f2c43b771f35e3.asciidoc deleted file mode 100644 index fb297e06aa..0000000000 --- a/docs/examples/guide/aeaa97939a05f5b2f3f2c43b771f35e3.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.termvectors( - index: 'my-index-000001', - id: 1, - body: { - fields: [ - 'text', - 'some_field_without_term_vectors' - ], - offsets: true, - positions: true, - term_statistics: true, - field_statistics: true - } -) -puts response ----- diff --git a/docs/examples/guide/aee26dd62fbb6d614a0798f3344c0598.asciidoc b/docs/examples/guide/aee26dd62fbb6d614a0798f3344c0598.asciidoc deleted file mode 100644 index 1652c779c0..0000000000 --- a/docs/examples/guide/aee26dd62fbb6d614a0798f3344c0598.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'issues', - body: { - query: { - match_all: {} - }, - aggregations: { - comments: { - nested: { - path: 'comments' - }, - aggregations: { - top_usernames: { - terms: { - field: 'comments.username' - }, - aggregations: { - comment_to_issue: { - reverse_nested: {}, - aggregations: { - top_tags_per_comment: { - terms: { - field: 'tags' - } - } - } - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/aee4734ee63dbbbd12a21ee886f7a829.asciidoc b/docs/examples/guide/aee4734ee63dbbbd12a21ee886f7a829.asciidoc deleted file mode 100644 index ea7e8a865b..0000000000 --- a/docs/examples/guide/aee4734ee63dbbbd12a21ee886f7a829.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - sort: [ - { - _geo_distance: { - 'pin.location' => [ - -70, - 40 - ], - order: 'asc', - unit: 'km' - } - } - ], - query: { - term: { - user: 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/af00a58d9171d32f6efe52d94e51e526.asciidoc b/docs/examples/guide/af00a58d9171d32f6efe52d94e51e526.asciidoc deleted file mode 100644 index d9aa2c5578..0000000000 --- a/docs/examples/guide/af00a58d9171d32f6efe52d94e51e526.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'hindi_example', - body: { - settings: { - analysis: { - filter: { - hindi_stop: { - type: 'stop', - stopwords: '_hindi_' - }, - hindi_keywords: { - type: 'keyword_marker', - keywords: [ - 'उदाहरण' - ] - }, - hindi_stemmer: { - type: 'stemmer', - language: 'hindi' - } - }, - analyzer: { - rebuilt_hindi: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'decimal_digit', - 'hindi_keywords', - 'indic_normalization', - 'hindi_normalization', - 'hindi_stop', - 'hindi_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/af18f5c5fb2364ae23c6a14431820aba.asciidoc b/docs/examples/guide/af18f5c5fb2364ae23c6a14431820aba.asciidoc deleted file mode 100644 index 4e0d2784af..0000000000 --- a/docs/examples/guide/af18f5c5fb2364ae23c6a14431820aba.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.enrich.get_policy( - name: 'my-policy' -) -puts response ----- diff --git a/docs/examples/guide/af44cc7fb0c435d4497c77baf904bf5e.asciidoc b/docs/examples/guide/af44cc7fb0c435d4497c77baf904bf5e.asciidoc deleted file mode 100644 index f6bc6730f3..0000000000 --- a/docs/examples/guide/af44cc7fb0c435d4497c77baf904bf5e.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - sales_over_time: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/af517b6936fa41d124d68b107b2efdc3.asciidoc b/docs/examples/guide/af517b6936fa41d124d68b107b2efdc3.asciidoc deleted file mode 100644 index bb3c214f99..0000000000 --- a/docs/examples/guide/af517b6936fa41d124d68b107b2efdc3.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ilm.delete_lifecycle( - policy: 'my_policy' -) -puts response ----- diff --git a/docs/examples/guide/af746266a49a693ff6170c88da8a8c04.asciidoc b/docs/examples/guide/af746266a49a693ff6170c88da8a8c04.asciidoc deleted file mode 100644 index 8f330a26d4..0000000000 --- a/docs/examples/guide/af746266a49a693ff6170c88da8a8c04.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - default: { - tokenizer: 'whitespace', - filter: [ - 'my_custom_stop_words_filter' - ] - } - }, - filter: { - my_custom_stop_words_filter: { - type: 'stop', - ignore_case: true, - stopwords: [ - 'and', - 'is', - 'the' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/af84b3995564a7ca84360a526a4ac896.asciidoc b/docs/examples/guide/af84b3995564a7ca84360a526a4ac896.asciidoc deleted file mode 100644 index f1a21af263..0000000000 --- a/docs/examples/guide/af84b3995564a7ca84360a526a4ac896.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: '5_char_words_example', - body: { - settings: { - analysis: { - analyzer: { - "lowercase_5_char": { - tokenizer: 'lowercase', - filter: [ - '5_char_trunc' - ] - } - }, - filter: { - "5_char_trunc": { - type: 'truncate', - length: 5 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/af85ad2551d1cc6742c6521d71c889cc.asciidoc b/docs/examples/guide/af85ad2551d1cc6742c6521d71c889cc.asciidoc deleted file mode 100644 index 4a793c4374..0000000000 --- a/docs/examples/guide/af85ad2551d1cc6742c6521d71c889cc.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - title: { - type: 'text', - analyzer: 'whitespace' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/af970eb8b93cdea52209e1256eba9d8c.asciidoc b/docs/examples/guide/af970eb8b93cdea52209e1256eba9d8c.asciidoc deleted file mode 100644 index 0aed73b1bb..0000000000 --- a/docs/examples/guide/af970eb8b93cdea52209e1256eba9d8c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.shard_stores( - index: 'test1,test2' -) -puts response ----- diff --git a/docs/examples/guide/afa11ebb493ebbfd77acbbe50d2ce6db.asciidoc b/docs/examples/guide/afa11ebb493ebbfd77acbbe50d2ce6db.asciidoc deleted file mode 100644 index e90ad10592..0000000000 --- a/docs/examples/guide/afa11ebb493ebbfd77acbbe50d2ce6db.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-data-stream', - body: { - size: 0, - aggregations: { - tsid: { - terms: { - field: '_tsid' - }, - aggregations: { - over_time: { - date_histogram: { - field: '@timestamp', - fixed_interval: '1d' - }, - aggregations: { - min: { - min: { - field: 'kubernetes.container.memory.usage.bytes' - } - }, - max: { - max: { - field: 'kubernetes.container.memory.usage.bytes' - } - }, - avg: { - avg: { - field: 'kubernetes.container.memory.usage.bytes' - } - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/afadb6bb7d0fa5a4531708af1ea8f9f8.asciidoc b/docs/examples/guide/afadb6bb7d0fa5a4531708af1ea8f9f8.asciidoc deleted file mode 100644 index c279607faa..0000000000 --- a/docs/examples/guide/afadb6bb7d0fa5a4531708af1ea8f9f8.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'mylogs-*' - }, - dest: { - index: 'mylogs', - op_type: 'create' - } - } -) -puts response ----- diff --git a/docs/examples/guide/afcacd742d18bf220e02f0bc6891526d.asciidoc b/docs/examples/guide/afcacd742d18bf220e02f0bc6891526d.asciidoc deleted file mode 100644 index b8e0feae9a..0000000000 --- a/docs/examples/guide/afcacd742d18bf220e02f0bc6891526d.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - sale_date: { - auto_date_histogram: { - field: 'date', - buckets: 10, - minimum_interval: 'minute' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/afd90d268187f995dc002abc189f818d.asciidoc b/docs/examples/guide/afd90d268187f995dc002abc189f818d.asciidoc deleted file mode 100644 index f79ad4b509..0000000000 --- a/docs/examples/guide/afd90d268187f995dc002abc189f818d.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - date: { - date_histogram: { - field: 'timestamp', - calendar_interval: '1d', - format: 'yyyy-MM-dd' - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/afdb19ad1ebb4f64e235528b640817b6.asciidoc b/docs/examples/guide/afdb19ad1ebb4f64e235528b640817b6.asciidoc deleted file mode 100644 index e36b2a8d7c..0000000000 --- a/docs/examples/guide/afdb19ad1ebb4f64e235528b640817b6.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - processors: [ - { - drop: { - description: "Drop documents with 'network.name' of 'Guest'", - if: "ctx?.network?.name == 'Guest'" - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/afe30f159937b38d74c869570cfcd369.asciidoc b/docs/examples/guide/afe30f159937b38d74c869570cfcd369.asciidoc deleted file mode 100644 index 69b89face8..0000000000 --- a/docs/examples/guide/afe30f159937b38d74c869570cfcd369.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.close( - index: 'index_1' -) -puts response - -response = client.snapshot.restore( - repository: 'my_repository', - snapshot: 'snapshot_2', - wait_for_completion: true, - body: { - indices: 'index_1' - } -) -puts response ----- diff --git a/docs/examples/guide/afe5aeb9317f0ae470b28e85a8d98274.asciidoc b/docs/examples/guide/afe5aeb9317f0ae470b28e85a8d98274.asciidoc deleted file mode 100644 index d991d5f9da..0000000000 --- a/docs/examples/guide/afe5aeb9317f0ae470b28e85a8d98274.asciidoc +++ /dev/null @@ -1,47 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - status_code: { - type: 'keyword', - nil_value: 'NULL' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - status_code: nil - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - status_code: [] - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - term: { - status_code: 'NULL' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/afe87a2850326e0328fbebbefec2e839.asciidoc b/docs/examples/guide/afe87a2850326e0328fbebbefec2e839.asciidoc deleted file mode 100644 index 2b9f57da91..0000000000 --- a/docs/examples/guide/afe87a2850326e0328fbebbefec2e839.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.search_shards( - index: 'my-index-000001', - routing: 'foo,bar' -) -puts response ----- diff --git a/docs/examples/guide/afef5cac988592b97ae289ab39c2f437.asciidoc b/docs/examples/guide/afef5cac988592b97ae289ab39c2f437.asciidoc deleted file mode 100644 index 433ef6d277..0000000000 --- a/docs/examples/guide/afef5cac988592b97ae289ab39c2f437.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - my_field: { - type: 'text', - fields: { - keyword: { - type: 'keyword' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/affc7ff234dc3acccb2bf7dc51f54813.asciidoc b/docs/examples/guide/affc7ff234dc3acccb2bf7dc51f54813.asciidoc deleted file mode 100644 index 910d01c01c..0000000000 --- a/docs/examples/guide/affc7ff234dc3acccb2bf7dc51f54813.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'keyword', - char_filter: [ - 'html_strip' - ], - text: 'I'm so happy!

' - } -) -puts response ----- diff --git a/docs/examples/guide/b00d74eed431a272c829c0f798e3a539.asciidoc b/docs/examples/guide/b00d74eed431a272c829c0f798e3a539.asciidoc deleted file mode 100644 index 661680d0c5..0000000000 --- a/docs/examples/guide/b00d74eed431a272c829c0f798e3a539.asciidoc +++ /dev/null @@ -1,85 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - mappings: { - properties: { - d: { - type: 'date' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'test', - refresh: true, - body: [ - { - index: {} - }, - { - s: 1, - m: 3.1415, - i: 1, - d: '2020-01-01T00:12:12Z', - t: 'cat' - }, - { - index: {} - }, - { - s: 2, - m: 1, - i: 6, - d: '2020-01-02T00:12:12Z', - t: 'dog' - }, - { - index: {} - }, - { - s: 3, - m: 2.71828, - i: -12, - d: '2019-12-31T00:12:12Z', - t: 'chicken' - } - ] -) -puts response - -response = client.search( - index: 'test', - filter_path: 'aggregations', - body: { - aggregations: { - tm: { - top_metrics: { - metrics: [ - { - field: 'm' - }, - { - field: 'i' - }, - { - field: 'd' - }, - { - field: 't.keyword' - } - ], - sort: { - s: 'desc' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b00f3bc0e47905aaa2124d6a025c75d4.asciidoc b/docs/examples/guide/b00f3bc0e47905aaa2124d6a025c75d4.asciidoc deleted file mode 100644 index 5c0a090142..0000000000 --- a/docs/examples/guide/b00f3bc0e47905aaa2124d6a025c75d4.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'txt', - body: { - query: 'SELECT * FROM library ORDER BY page_count DESC LIMIT 5' - } -) -puts response ----- diff --git a/docs/examples/guide/b02e4907c9936c1adc16ccce9d49900d.asciidoc b/docs/examples/guide/b02e4907c9936c1adc16ccce9d49900d.asciidoc deleted file mode 100644 index dded4541a7..0000000000 --- a/docs/examples/guide/b02e4907c9936c1adc16ccce9d49900d.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.cluster.health -puts response ----- diff --git a/docs/examples/guide/b0b1ae9582599f501f3b3ed8a42ea2af.asciidoc b/docs/examples/guide/b0b1ae9582599f501f3b3ed8a42ea2af.asciidoc deleted file mode 100644 index d8ec8aa55d..0000000000 --- a/docs/examples/guide/b0b1ae9582599f501f3b3ed8a42ea2af.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'circles', - id: 1, - pipeline: 'polygonize_circles', - body: { - circle: 'CIRCLE (30 10 40)' - } -) -puts response - -response = client.get( - index: 'circles', - id: 1 -) -puts response ----- diff --git a/docs/examples/guide/b0ce54ff4fec0b0c712506eb81e633f4.asciidoc b/docs/examples/guide/b0ce54ff4fec0b0c712506eb81e633f4.asciidoc deleted file mode 100644 index 95a7d532a1..0000000000 --- a/docs/examples/guide/b0ce54ff4fec0b0c712506eb81e633f4.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - description: 'monthly date-time index naming', - processors: [ - { - date_index_name: { - field: 'date1', - index_name_prefix: 'my-index-', - date_rounding: 'M' - } - } - ] - }, - docs: [ - { - _source: { - "date1": '2016-04-25T12:02:01.789Z' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/b0d3f839237fabf8cdc2221734c668ad.asciidoc b/docs/examples/guide/b0d3f839237fabf8cdc2221734c668ad.asciidoc deleted file mode 100644 index cea45cab9b..0000000000 --- a/docs/examples/guide/b0d3f839237fabf8cdc2221734c668ad.asciidoc +++ /dev/null @@ -1,47 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'items', - id: 1, - refresh: true, - body: { - name: 'chocolate', - production_date: '2018-02-01', - location: [ - -71.34, - 41.12 - ] - } -) -puts response - -response = client.index( - index: 'items', - id: 2, - refresh: true, - body: { - name: 'chocolate', - production_date: '2018-01-01', - location: [ - -71.3, - 41.15 - ] - } -) -puts response - -response = client.index( - index: 'items', - id: 3, - refresh: true, - body: { - name: 'chocolate', - production_date: '2017-12-01', - location: [ - -71.3, - 41.12 - ] - } -) -puts response ----- diff --git a/docs/examples/guide/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc b/docs/examples/guide/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc deleted file mode 100644 index 6bed494cb6..0000000000 --- a/docs/examples/guide/b0eaf67e5cce24ef8889bf20951ccec1.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - dis_max: { - queries: [ - { - match: { - subject: 'brown fox' - } - }, - { - match: { - message: 'brown fox' - } - } - ], - tie_breaker: 0.3 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b0fa301cd3c6b9db128e34114f0c1e8f.asciidoc b/docs/examples/guide/b0fa301cd3c6b9db128e34114f0c1e8f.asciidoc deleted file mode 100644 index 51c1dcf435..0000000000 --- a/docs/examples/guide/b0fa301cd3c6b9db128e34114f0c1e8f.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'test', - id: 1, - body: { - counter: 1, - tags: [ - 'red' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/b109d0141ec8a0aed5d3805abc349a20.asciidoc b/docs/examples/guide/b109d0141ec8a0aed5d3805abc349a20.asciidoc deleted file mode 100644 index 0ff28d590b..0000000000 --- a/docs/examples/guide/b109d0141ec8a0aed5d3805abc349a20.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'date', - calendar_interval: '1M' - }, - aggregations: { - the_sum: { - sum: { - field: 'price' - } - }, - the_movavg: { - moving_fn: { - buckets_path: 'the_sum', - window: 10, - script: 'MovingFunctions.linearWeightedAvg(values)' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b11a0675e49df0709be693297ca73a2c.asciidoc b/docs/examples/guide/b11a0675e49df0709be693297ca73a2c.asciidoc deleted file mode 100644 index fb05db13d1..0000000000 --- a/docs/examples/guide/b11a0675e49df0709be693297ca73a2c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.xpack.info( - categories: 'build,features' -) -puts response ----- diff --git a/docs/examples/guide/b14122481ae1f158f1a9a1bfbc4a41b1.asciidoc b/docs/examples/guide/b14122481ae1f158f1a9a1bfbc4a41b1.asciidoc deleted file mode 100644 index d538f40fe1..0000000000 --- a/docs/examples/guide/b14122481ae1f158f1a9a1bfbc4a41b1.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.nodes.reload_secure_settings( - body: { - secure_settings_password: 'keystore-password' - } -) -puts response ----- diff --git a/docs/examples/guide/b17143780e9904bfc1e1c53436497fa1.asciidoc b/docs/examples/guide/b17143780e9904bfc1e1c53436497fa1.asciidoc deleted file mode 100644 index 217fdb7866..0000000000 --- a/docs/examples/guide/b17143780e9904bfc1e1c53436497fa1.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'json', - body: { - wait_for_completion_timeout: '2s', - query: 'SELECT * FROM library ORDER BY page_count DESC', - fetch_size: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/b195068563b1dc0f721f5f8c8d172312.asciidoc b/docs/examples/guide/b195068563b1dc0f721f5f8c8d172312.asciidoc deleted file mode 100644 index 70bfebbe9c..0000000000 --- a/docs/examples/guide/b195068563b1dc0f721f5f8c8d172312.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'MULTIPOINT (1002.0 2000.0, 1003.0 2000.0)' - } -) -puts response ----- diff --git a/docs/examples/guide/b1ee1b0b5f7af596e5f81743cfd3755f.asciidoc b/docs/examples/guide/b1ee1b0b5f7af596e5f81743cfd3755f.asciidoc deleted file mode 100644 index a75128eb30..0000000000 --- a/docs/examples/guide/b1ee1b0b5f7af596e5f81743cfd3755f.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: ',,' -) -puts response ----- diff --git a/docs/examples/guide/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc b/docs/examples/guide/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc deleted file mode 100644 index 1c2feb675e..0000000000 --- a/docs/examples/guide/b1efa1c51a34dd5ab5511b71a399f5b1.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'source' - }, - dest: { - index: 'dest', - pipeline: 'some_ingest_pipeline' - } - } -) -puts response ----- diff --git a/docs/examples/guide/b1f7cb4157b13368373383abd7d2b8cb.asciidoc b/docs/examples/guide/b1f7cb4157b13368373383abd7d2b8cb.asciidoc deleted file mode 100644 index 43a4205f66..0000000000 --- a/docs/examples/guide/b1f7cb4157b13368373383abd7d2b8cb.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - cluster: { - remote: { - cluster_two: { - 'transport.compress' => false - }, - cluster_three: { - 'transport.compress' => true, - 'transport.ping_schedule' => '60s' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b23ed357dce8ec0014708b7b2850a8fb.asciidoc b/docs/examples/guide/b23ed357dce8ec0014708b7b2850a8fb.asciidoc deleted file mode 100644 index 46fae6e65b..0000000000 --- a/docs/examples/guide/b23ed357dce8ec0014708b7b2850a8fb.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.tasks( - v: true -) -puts response ----- diff --git a/docs/examples/guide/b24a374c0ad264abbcacb5686f5ed61c.asciidoc b/docs/examples/guide/b24a374c0ad264abbcacb5686f5ed61c.asciidoc deleted file mode 100644 index 66a978d015..0000000000 --- a/docs/examples/guide/b24a374c0ad264abbcacb5686f5ed61c.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.termvectors( - index: 'text_payloads', - id: 1, - body: { - fields: [ - 'text' - ], - payloads: true - } -) -puts response ----- diff --git a/docs/examples/guide/b25256ed615cd837461b0bfa590526b7.asciidoc b/docs/examples/guide/b25256ed615cd837461b0bfa590526b7.asciidoc deleted file mode 100644 index ba47060b14..0000000000 --- a/docs/examples/guide/b25256ed615cd837461b0bfa590526b7.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ccr.pause_auto_follow_pattern( - name: 'my_auto_follow_pattern' -) -puts response ----- diff --git a/docs/examples/guide/b2652b1763a5fd31e95c983869b433bd.asciidoc b/docs/examples/guide/b2652b1763a5fd31e95c983869b433bd.asciidoc deleted file mode 100644 index 884fb4084f..0000000000 --- a/docs/examples/guide/b2652b1763a5fd31e95c983869b433bd.asciidoc +++ /dev/null @@ -1,67 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'metrics_index', - id: 1, - body: { - 'network.name' => 'net-1', - latency_histo: { - values: [ - 0.1, - 0.2, - 0.3, - 0.4, - 0.5 - ], - counts: [ - 3, - 7, - 23, - 12, - 6 - ] - } - } -) -puts response - -response = client.index( - index: 'metrics_index', - id: 2, - body: { - 'network.name' => 'net-2', - latency_histo: { - values: [ - 0.1, - 0.2, - 0.3, - 0.4, - 0.5 - ], - counts: [ - 8, - 17, - 8, - 7, - 6 - ] - } - } -) -puts response - -response = client.search( - index: 'metrics_index', - size: 0, - body: { - aggregations: { - avg_latency: { - avg: { - field: 'latency_histo' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b26b5574438e4eaf146b2428bf537c51.asciidoc b/docs/examples/guide/b26b5574438e4eaf146b2428bf537c51.asciidoc deleted file mode 100644 index 507e054837..0000000000 --- a/docs/examples/guide/b26b5574438e4eaf146b2428bf537c51.asciidoc +++ /dev/null @@ -1,49 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'attachment', - body: { - description: 'Extract attachment information from arrays', - processors: [ - { - foreach: { - field: 'attachments', - processor: { - attachment: { - target_field: '_ingest._value.attachment', - field: '_ingest._value.data', - remove_binary: false - } - } - } - } - ] - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'my_id', - pipeline: 'attachment', - body: { - attachments: [ - { - filename: 'ipsum.txt', - data: 'dGhpcyBpcwpqdXN0IHNvbWUgdGV4dAo=' - }, - { - filename: 'test.txt', - data: 'VGhpcyBpcyBhIHRlc3QK' - } - ] - } -) -puts response - -response = client.get( - index: 'my-index-000001', - id: 'my_id' -) -puts response ----- diff --git a/docs/examples/guide/b2e1e802fc3c5fbeb4190af7d598c23e.asciidoc b/docs/examples/guide/b2e1e802fc3c5fbeb4190af7d598c23e.asciidoc deleted file mode 100644 index 25f8200aef..0000000000 --- a/docs/examples/guide/b2e1e802fc3c5fbeb4190af7d598c23e.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - body: { - "@timestamp": '2099-11-15T13:12:00', - message: 'GET /search HTTP/1.1 200 1070000', - user: { - id: 'kimchy' - } - } -) -puts response ----- diff --git a/docs/examples/guide/b2e20bca1846d7d584626b12eae9f6dc.asciidoc b/docs/examples/guide/b2e20bca1846d7d584626b12eae9f6dc.asciidoc deleted file mode 100644 index dac009a770..0000000000 --- a/docs/examples/guide/b2e20bca1846d7d584626b12eae9f6dc.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodes( - v: true, - h: 'name,node.role,disk.used_percent,disk.used,disk.avail,disk.total' -) -puts response ----- diff --git a/docs/examples/guide/b2e4f3257c0e0aa3311f7270034bbc42.asciidoc b/docs/examples/guide/b2e4f3257c0e0aa3311f7270034bbc42.asciidoc deleted file mode 100644 index f933bdc4b6..0000000000 --- a/docs/examples/guide/b2e4f3257c0e0aa3311f7270034bbc42.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index', - body: { - 'index.routing.allocation.require.data' => nil, - 'index.routing.allocation.include._tier_preference' => 'data_hot' - } -) -puts response ----- diff --git a/docs/examples/guide/b3623b8c7f3e7650f52b6fb8b050f583.asciidoc b/docs/examples/guide/b3623b8c7f3e7650f52b6fb8b050f583.asciidoc deleted file mode 100644 index 831fe8c209..0000000000 --- a/docs/examples/guide/b3623b8c7f3e7650f52b6fb8b050f583.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.features.get_features -puts response ----- diff --git a/docs/examples/guide/b3685560cb328f179d96ffe7c2668f72.asciidoc b/docs/examples/guide/b3685560cb328f179d96ffe7c2668f72.asciidoc deleted file mode 100644 index c0fe8a21e3..0000000000 --- a/docs/examples/guide/b3685560cb328f179d96ffe7c2668f72.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'date', - calendar_interval: '1M' - }, - aggregations: { - the_sum: { - sum: { - field: 'price' - } - }, - the_movavg: { - moving_fn: { - buckets_path: 'the_sum', - window: 10, - script: 'if (values.length > 5*2) {MovingFunctions.holtWinters(values, 0.3, 0.1, 0.1, 5, false)}' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b37919cc438b47477343833b4e522408.asciidoc b/docs/examples/guide/b37919cc438b47477343833b4e522408.asciidoc deleted file mode 100644 index d15814439f..0000000000 --- a/docs/examples/guide/b37919cc438b47477343833b4e522408.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.termvectors( - index: 'imdb', - body: { - doc: { - plot: 'When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil.' - }, - term_statistics: true, - field_statistics: true, - positions: false, - offsets: false, - filter: { - max_num_terms: 3, - min_term_freq: 1, - min_doc_freq: 1 - } - } -) -puts response ----- diff --git a/docs/examples/guide/b3a1c4220617ded67ed43fff2051d324.asciidoc b/docs/examples/guide/b3a1c4220617ded67ed43fff2051d324.asciidoc deleted file mode 100644 index 16974a6b9a..0000000000 --- a/docs/examples/guide/b3a1c4220617ded67ed43fff2051d324.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - properties: { - tags: { - type: 'keyword', - eager_global_ordinals: true - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b3a711c3deddcdb8a3f6623184a8b794.asciidoc b/docs/examples/guide/b3a711c3deddcdb8a3f6623184a8b794.asciidoc deleted file mode 100644 index 61c0fc3a28..0000000000 --- a/docs/examples/guide/b3a711c3deddcdb8a3f6623184a8b794.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'test', - id: 1, - body: { - script: { - source: 'ctx._source.counter += params.count', - lang: 'painless', - params: { - count: 4 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b3ed567d2c0915a280b6b15f7a37539b.asciidoc b/docs/examples/guide/b3ed567d2c0915a280b6b15f7a37539b.asciidoc deleted file mode 100644 index d969631b45..0000000000 --- a/docs/examples/guide/b3ed567d2c0915a280b6b15f7a37539b.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - } - } - }, - percentiles_monthly_sales: { - percentiles_bucket: { - buckets_path: 'sales_per_month>sales', - percents: [ - 25, - 50, - 75 - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b3fffd96fdb118cd059b5f1d67d928de.asciidoc b/docs/examples/guide/b3fffd96fdb118cd059b5f1d67d928de.asciidoc deleted file mode 100644 index 047e9266da..0000000000 --- a/docs/examples/guide/b3fffd96fdb118cd059b5f1d67d928de.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'MultiPoint', - coordinates: [ - [ - 102, - 2 - ], - [ - 103, - 2 - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/b42e7d627cd79e4c5e7a4a3cd8b19ce0.asciidoc b/docs/examples/guide/b42e7d627cd79e4c5e7a4a3cd8b19ce0.asciidoc deleted file mode 100644 index 343e4c84f2..0000000000 --- a/docs/examples/guide/b42e7d627cd79e4c5e7a4a3cd8b19ce0.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'one-pipeline-to-rule-them-all', - body: { - processors: [ - { - pipeline: { - description: "If 'service.name' is 'apache_httpd', use 'httpd_pipeline'", - if: "ctx.service?.name == 'apache_httpd'", - name: 'httpd_pipeline' - } - }, - { - pipeline: { - description: "If 'service.name' is 'syslog', use 'syslog_pipeline'", - if: "ctx.service?.name == 'syslog'", - name: 'syslog_pipeline' - } - }, - { - fail: { - description: "If 'service.name' is not 'apache_httpd' or 'syslog', return a failure message", - if: "ctx.service?.name != 'apache_httpd' && ctx.service?.name != 'syslog'", - message: 'This pipeline requires service.name to be either `syslog` or `apache_httpd`' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/b430122345d560bbd2a77826f5c475f7.asciidoc b/docs/examples/guide/b430122345d560bbd2a77826f5c475f7.asciidoc deleted file mode 100644 index a6c3130476..0000000000 --- a/docs/examples/guide/b430122345d560bbd2a77826f5c475f7.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_templates: [ - { - ip_fields: { - match: [ - 'ip_*', - '*_ip' - ], - unmatch: [ - 'one*', - '*two' - ], - mapping: { - type: 'ip' - } - } - } - ] - } - } -) -puts response - -response = client.index( - index: 'my-index', - id: 1, - body: { - one_ip: 'will not match', - ip_two: 'will not match', - three_ip: '12.12.12.12', - ip_four: '13.13.13.13' - } -) -puts response ----- diff --git a/docs/examples/guide/b45a8c6fc746e9c90fd181e69a605fad.asciidoc b/docs/examples/guide/b45a8c6fc746e9c90fd181e69a605fad.asciidoc deleted file mode 100644 index 404b498679..0000000000 --- a/docs/examples/guide/b45a8c6fc746e9c90fd181e69a605fad.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.inference.inference( - task_type: 'completion', - inference_id: 'openai_chat_completions', - body: { - input: 'What is Elastic?' - } -) -puts response ----- diff --git a/docs/examples/guide/b45c60f908b329835ab40609423f378e.asciidoc b/docs/examples/guide/b45c60f908b329835ab40609423f378e.asciidoc deleted file mode 100644 index 52f231cdb6..0000000000 --- a/docs/examples/guide/b45c60f908b329835ab40609423f378e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodes( - h: 'node.role' -) -puts response ----- diff --git a/docs/examples/guide/b468d0124dc485385a34504d5b7af82a.asciidoc b/docs/examples/guide/b468d0124dc485385a34504d5b7af82a.asciidoc deleted file mode 100644 index ba765740ff..0000000000 --- a/docs/examples/guide/b468d0124dc485385a34504d5b7af82a.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - wait_for_completion: false, - body: { - source: { - index: 'test-data', - size: 50 - }, - dest: { - index: 'hugging-face-embeddings', - pipeline: 'hugging_face_embeddings' - } - } -) -puts response ----- diff --git a/docs/examples/guide/b4693f2aa9fa65db04ab2499355c54fc.asciidoc b/docs/examples/guide/b4693f2aa9fa65db04ab2499355c54fc.asciidoc deleted file mode 100644 index 0b81c86c08..0000000000 --- a/docs/examples/guide/b4693f2aa9fa65db04ab2499355c54fc.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'cohere-embeddings', - body: { - knn: { - field: 'content_embedding', - query_vector_builder: { - text_embedding: { - model_id: 'cohere_embeddings', - model_text: 'Muscles in human body' - } - }, - k: 10, - num_candidates: 100 - }, - _source: [ - 'id', - 'content' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/b4946ecc9101b97102a1c5bcb19e5607.asciidoc b/docs/examples/guide/b4946ecc9101b97102a1c5bcb19e5607.asciidoc deleted file mode 100644 index 5c595887b8..0000000000 --- a/docs/examples/guide/b4946ecc9101b97102a1c5bcb19e5607.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: '{ "query": { "bool": { "filter": [ {{#year_scope}} { "range": { "@timestamp": { "gte": "now-1y/d", "lt": "now/d" } } }, {{/year_scope}} { "term": { "user.id": "{{user_id}}" }}]}}}', - params: { - year_scope: true, - user_id: 'kimchy' - } - } -) -puts response ----- diff --git a/docs/examples/guide/b4aec2a1d353852507c091bdb629b765.asciidoc b/docs/examples/guide/b4aec2a1d353852507c091bdb629b765.asciidoc deleted file mode 100644 index 1430ffe9f5..0000000000 --- a/docs/examples/guide/b4aec2a1d353852507c091bdb629b765.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.ml.put_filter( - filter_id: 'safe_domains', - body: { - description: 'A list of safe domains', - items: [ - '*.google.com', - 'wikipedia.org' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/b4d1fc887e40885cdf6ac2d01487cb76.asciidoc b/docs/examples/guide/b4d1fc887e40885cdf6ac2d01487cb76.asciidoc deleted file mode 100644 index dcf7020036..0000000000 --- a/docs/examples/guide/b4d1fc887e40885cdf6ac2d01487cb76.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - span_multi: { - match: { - prefix: { - 'user.id' => { - value: 'ki', - boost: 1.08 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b4d9d5017d42f27281e734e969949623.asciidoc b/docs/examples/guide/b4d9d5017d42f27281e734e969949623.asciidoc deleted file mode 100644 index 7b25807fe7..0000000000 --- a/docs/examples/guide/b4d9d5017d42f27281e734e969949623.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get_repository( - repository: 'my-repo' -) -puts response ----- diff --git a/docs/examples/guide/b4da132cb934c33d61e2b60988c6d4a3.asciidoc b/docs/examples/guide/b4da132cb934c33d61e2b60988c6d4a3.asciidoc deleted file mode 100644 index 80d79888e8..0000000000 --- a/docs/examples/guide/b4da132cb934c33d61e2b60988c6d4a3.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'timestamp', - calendar_interval: 'day' - }, - aggregations: { - the_sum: { - sum: { - field: 'lemmings' - } - }, - thirtieth_difference: { - serial_diff: { - buckets_path: 'the_sum', - lag: 30 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b4f3165e873f551fbaa03945877eb370.asciidoc b/docs/examples/guide/b4f3165e873f551fbaa03945877eb370.asciidoc deleted file mode 100644 index 119843306f..0000000000 --- a/docs/examples/guide/b4f3165e873f551fbaa03945877eb370.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_date_formats: [ - 'yyyy/MM', - 'MM/dd/yyyy' - ] - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - create_date: '09/25/2015' - } -) -puts response ----- diff --git a/docs/examples/guide/b504119238b44cddd3b5944da20a498d.asciidoc b/docs/examples/guide/b504119238b44cddd3b5944da20a498d.asciidoc deleted file mode 100644 index f85e58adbc..0000000000 --- a/docs/examples/guide/b504119238b44cddd3b5944da20a498d.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'POLYGON ((1000.0 -1001.0, 1001.0 -1001.0, 1001.0 -1000.0, 1000.0 -1000.0, 1000.0 -1001.0))' - } -) -puts response ----- diff --git a/docs/examples/guide/b515427f8685ca7d79176def672d19fa.asciidoc b/docs/examples/guide/b515427f8685ca7d79176def672d19fa.asciidoc deleted file mode 100644 index 09858ff36c..0000000000 --- a/docs/examples/guide/b515427f8685ca7d79176def672d19fa.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.refresh -puts response - -response = client.search( - index: 'my-index-000001', - size: 0, - q: 'extra:test', - filter_path: 'hits.total' -) -puts response ----- diff --git a/docs/examples/guide/b52951b78cd5fb2f9353d1c7e6d37070.asciidoc b/docs/examples/guide/b52951b78cd5fb2f9353d1c7e6d37070.asciidoc deleted file mode 100644 index 2261272f20..0000000000 --- a/docs/examples/guide/b52951b78cd5fb2f9353d1c7e6d37070.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - wildcard: { - 'user.id' => { - value: 'ki*y', - boost: 1, - rewrite: 'constant_score_blended' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b557f114e21dbc6f531d4e7621a08e8f.asciidoc b/docs/examples/guide/b557f114e21dbc6f531d4e7621a08e8f.asciidoc deleted file mode 100644 index 39e3185163..0000000000 --- a/docs/examples/guide/b557f114e21dbc6f531d4e7621a08e8f.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'logs', - body: { - mappings: { - _source: { - includes: [ - '*.count', - 'meta.*' - ], - excludes: [ - 'meta.description', - 'meta.other.*' - ] - } - } - } -) -puts response - -response = client.index( - index: 'logs', - id: 1, - body: { - requests: { - count: 10, - foo: 'bar' - }, - meta: { - name: 'Some metric', - description: 'Some metric description', - other: { - foo: 'one', - baz: 'two' - } - } - } -) -puts response - -response = client.search( - index: 'logs', - body: { - query: { - match: { - 'meta.other.foo' => 'one' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b573e893de0d5f92d67f4f5eb7f0c353.asciidoc b/docs/examples/guide/b573e893de0d5f92d67f4f5eb7f0c353.asciidoc deleted file mode 100644 index bf8689d611..0000000000 --- a/docs/examples/guide/b573e893de0d5f92d67f4f5eb7f0c353.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - } - } - }, - stats_monthly_sales: { - stats_bucket: { - buckets_path: 'sales_per_month>sales' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b577e7e7eb5ce9d16cb582356e2cc45c.asciidoc b/docs/examples/guide/b577e7e7eb5ce9d16cb582356e2cc45c.asciidoc deleted file mode 100644 index d64a16291f..0000000000 --- a/docs/examples/guide/b577e7e7eb5ce9d16cb582356e2cc45c.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'geoip', - body: { - description: 'Add geoip info', - processors: [ - { - geoip: { - field: 'ip' - } - } - ] - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'my_id', - pipeline: 'geoip', - body: { - ip: '89.160.20.128' - } -) -puts response - -response = client.get( - index: 'my-index-000001', - id: 'my_id' -) -puts response ----- diff --git a/docs/examples/guide/b583bf8d3a2f49d633aa2cfed5606418.asciidoc b/docs/examples/guide/b583bf8d3a2f49d633aa2cfed5606418.asciidoc deleted file mode 100644 index 295a10de52..0000000000 --- a/docs/examples/guide/b583bf8d3a2f49d633aa2cfed5606418.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'template_1', - body: { - template: { - settings: { - number_of_shards: 1 - }, - aliases: { - "alias1": {}, - "alias2": { - filter: { - term: { - 'user.id' => 'kimchy' - } - }, - routing: 'shard-1' - }, - "{index}-alias": {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b58b17975bbce307b2ccce5051a449e8.asciidoc b/docs/examples/guide/b58b17975bbce307b2ccce5051a449e8.asciidoc deleted file mode 100644 index bda784836c..0000000000 --- a/docs/examples/guide/b58b17975bbce307b2ccce5051a449e8.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - size: 0, - filter_path: 'hits.total', - body: { - query: { - range: { - 'http.response.bytes' => { - lt: 2_000_000 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b5e5cd4eccc40d7c5f2a1fcb654bd4a4.asciidoc b/docs/examples/guide/b5e5cd4eccc40d7c5f2a1fcb654bd4a4.asciidoc deleted file mode 100644 index 85223b9acf..0000000000 --- a/docs/examples/guide/b5e5cd4eccc40d7c5f2a1fcb654bd4a4.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'stackoverflow', - size: 0, - body: { - query: { - query_string: { - query: 'tags:elasticsearch' - } - }, - aggregations: { - my_unbiased_sample: { - diversified_sampler: { - shard_size: 200, - field: 'author' - }, - aggregations: { - keywords: { - significant_terms: { - field: 'tags', - exclude: [ - 'elasticsearch' - ] - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b601bc78fb69e15a42e0783219ddc38d.asciidoc b/docs/examples/guide/b601bc78fb69e15a42e0783219ddc38d.asciidoc deleted file mode 100644 index 74329300fe..0000000000 --- a/docs/examples/guide/b601bc78fb69e15a42e0783219ddc38d.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - } - } - }, - max_monthly_sales: { - max_bucket: { - buckets_path: 'sales_per_month>sales' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b607eea422295a3e9acd75f9ed1c8cb7.asciidoc b/docs/examples/guide/b607eea422295a3e9acd75f9ed1c8cb7.asciidoc deleted file mode 100644 index 2a7e2f0eae..0000000000 --- a/docs/examples/guide/b607eea422295a3e9acd75f9ed1c8cb7.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - sort: [ - { - price: { - missing: '_last' - } - } - ], - query: { - term: { - product: 'chocolate' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b61afb7ca29a11243232ffcc8b5a43cf.asciidoc b/docs/examples/guide/b61afb7ca29a11243232ffcc8b5a43cf.asciidoc deleted file mode 100644 index 3a5a1a7ac4..0000000000 --- a/docs/examples/guide/b61afb7ca29a11243232ffcc8b5a43cf.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_field_mapping( - index: 'publications', - fields: 'a*' -) -puts response ----- diff --git a/docs/examples/guide/b620ef4400d2f660fe2c67835938442c.asciidoc b/docs/examples/guide/b620ef4400d2f660fe2c67835938442c.asciidoc deleted file mode 100644 index cdb5fbbff4..0000000000 --- a/docs/examples/guide/b620ef4400d2f660fe2c67835938442c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.autoscaling.delete_autoscaling_policy( - name: 'my_autoscaling_policy' -) -puts response ----- diff --git a/docs/examples/guide/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc b/docs/examples/guide/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc deleted file mode 100644 index 3fecc83c71..0000000000 --- a/docs/examples/guide/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc +++ /dev/null @@ -1,191 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - refresh: true, - body: [ - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized' - }, - { - index: { - _index: 'test-logs' - } - }, - { - message: '[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...' - } - ] -) -puts response - -response = client.text_structure.find_field_structure( - index: 'test-logs', - field: 'message' -) -puts response ----- diff --git a/docs/examples/guide/b638e11d6a8a084290f8934d224abd52.asciidoc b/docs/examples/guide/b638e11d6a8a084290f8934d224abd52.asciidoc deleted file mode 100644 index eba6cdec04..0000000000 --- a/docs/examples/guide/b638e11d6a8a084290f8934d224abd52.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.max_shards_per_node.frozen' => nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/b63ce79ce4fa1bb9b99a789f4dcfef4e.asciidoc b/docs/examples/guide/b63ce79ce4fa1bb9b99a789f4dcfef4e.asciidoc deleted file mode 100644 index 164dd92c44..0000000000 --- a/docs/examples/guide/b63ce79ce4fa1bb9b99a789f4dcfef4e.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'test', - body: { - top_metrics_max_size: 100 - } -) -puts response ----- diff --git a/docs/examples/guide/b66be1daf6c220eb66d94e708b2fae39.asciidoc b/docs/examples/guide/b66be1daf6c220eb66d94e708b2fae39.asciidoc deleted file mode 100644 index 0ab67975a6..0000000000 --- a/docs/examples/guide/b66be1daf6c220eb66d94e708b2fae39.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cluster.state( - metric: 'metadata,routing_table', - index: 'foo,bar' -) -puts response ----- diff --git a/docs/examples/guide/b67fa8c560dd10a8e6f226048cd21562.asciidoc b/docs/examples/guide/b67fa8c560dd10a8e6f226048cd21562.asciidoc deleted file mode 100644 index abfb71a3f5..0000000000 --- a/docs/examples/guide/b67fa8c560dd10a8e6f226048cd21562.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: '{ "query": { "bool": { "must": {{#toJson}}clauses{{/toJson}} }}}', - params: { - clauses: [ - { - term: { - 'user.id' => 'kimchy' - } - }, - { - term: { - 'url.domain' => 'example.com' - } - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/b68ed7037042719945a2452d23e64c78.asciidoc b/docs/examples/guide/b68ed7037042719945a2452d23e64c78.asciidoc deleted file mode 100644 index 7130c1faa4..0000000000 --- a/docs/examples/guide/b68ed7037042719945a2452d23e64c78.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 3, - refresh: true, - body: { - query: { - match: { - message: 'brown fox' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b691d41f84b5b46e9051b51db22a46af.asciidoc b/docs/examples/guide/b691d41f84b5b46e9051b51db22a46af.asciidoc deleted file mode 100644 index 95681e6d41..0000000000 --- a/docs/examples/guide/b691d41f84b5b46e9051b51db22a46af.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - genres: { - rare_terms: { - field: 'genre', - include: [ - 'swing', - 'rock' - ], - exclude: [ - 'jazz' - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b6a6aa9ba20e9a019371ae268488833f.asciidoc b/docs/examples/guide/b6a6aa9ba20e9a019371ae268488833f.asciidoc deleted file mode 100644 index a4f24c10ad..0000000000 --- a/docs/examples/guide/b6a6aa9ba20e9a019371ae268488833f.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_settings( - filter_path: 'persistent.cluster.remote' -) -puts response ----- diff --git a/docs/examples/guide/b6c872d04eabb39d1947cde6b29d4ae1.asciidoc b/docs/examples/guide/b6c872d04eabb39d1947cde6b29d4ae1.asciidoc deleted file mode 100644 index 8363c74c4e..0000000000 --- a/docs/examples/guide/b6c872d04eabb39d1947cde6b29d4ae1.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - tags: { - terms: { - field: 'tags', - min_doc_count: 10 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b6e29a0e14b611d4aaafb3051220ea56.asciidoc b/docs/examples/guide/b6e29a0e14b611d4aaafb3051220ea56.asciidoc deleted file mode 100644 index 4ceb926ca7..0000000000 --- a/docs/examples/guide/b6e29a0e14b611d4aaafb3051220ea56.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - title: { - type: 'text', - analyzer: 'whitespace', - search_analyzer: 'simple' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b6e385760e036e36827f719b540d9c11.asciidoc b/docs/examples/guide/b6e385760e036e36827f719b540d9c11.asciidoc deleted file mode 100644 index 9d436ff463..0000000000 --- a/docs/examples/guide/b6e385760e036e36827f719b540d9c11.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-dfs-index', - search_type: 'dfs_query_then_fetch', - pretty: true, - size: 0, - body: { - profile: true, - query: { - term: { - "my-keyword": { - value: 'a' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b717a583b5165e5c6caafc42fdfd9086.asciidoc b/docs/examples/guide/b717a583b5165e5c6caafc42fdfd9086.asciidoc deleted file mode 100644 index cb07494b15..0000000000 --- a/docs/examples/guide/b717a583b5165e5c6caafc42fdfd9086.asciidoc +++ /dev/null @@ -1,83 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'places', - body: { - mappings: { - properties: { - geometry: { - type: 'shape' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'places', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - name: 'NEMO Science Museum', - geometry: 'POINT(491.2350 5237.4081)' - }, - { - index: { - _id: 2 - } - }, - { - name: 'Sportpark De Weeren', - geometry: { - type: 'Polygon', - coordinates: [ - [ - [ - 496.5305328369141, - 5239.347642069457 - ], - [ - 496.6979026794433, - 5239.172175893484 - ], - [ - 496.9425201416015, - 5239.238958618537 - ], - [ - 496.7944622039794, - 5239.420969150824 - ], - [ - 496.5305328369141, - 5239.347642069457 - ] - ] - ] - } - } - ] -) -puts response - -response = client.search( - index: 'places', - size: 0, - body: { - aggregations: { - viewport: { - cartesian_bounds: { - field: 'geometry' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b724f547c5d67e95bbc0a9920e47033c.asciidoc b/docs/examples/guide/b724f547c5d67e95bbc0a9920e47033c.asciidoc deleted file mode 100644 index aebebd604f..0000000000 --- a/docs/examples/guide/b724f547c5d67e95bbc0a9920e47033c.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'file-path-test', - body: { - query: { - term: { - 'file_path.tree' => '/User/alice/photos/2017/05/16' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b728d6ba226dba719aadcd8b8099cc74.asciidoc b/docs/examples/guide/b728d6ba226dba719aadcd8b8099cc74.asciidoc deleted file mode 100644 index d0356b47a4..0000000000 --- a/docs/examples/guide/b728d6ba226dba719aadcd8b8099cc74.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.allocation( - v: true, - h: 'node,shards,disk.*' -) -puts response ----- diff --git a/docs/examples/guide/b7a4f5b9a93eff44268a1ee38ee1c6d3.asciidoc b/docs/examples/guide/b7a4f5b9a93eff44268a1ee38ee1c6d3.asciidoc deleted file mode 100644 index aa311d9f27..0000000000 --- a/docs/examples/guide/b7a4f5b9a93eff44268a1ee38ee1c6d3.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'archive' - }, - dest: { - index: 'my-data-stream', - op_type: 'create' - } - } -) -puts response ----- diff --git a/docs/examples/guide/b7a9f60b3646efe3834ca8381f8aa560.asciidoc b/docs/examples/guide/b7a9f60b3646efe3834ca8381f8aa560.asciidoc deleted file mode 100644 index 3fdf15b9d7..0000000000 --- a/docs/examples/guide/b7a9f60b3646efe3834ca8381f8aa560.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'logger.org.elasticsearch.discovery' => nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/b7ad394975863a8f5ee29627c3ab738b.asciidoc b/docs/examples/guide/b7ad394975863a8f5ee29627c3ab738b.asciidoc deleted file mode 100644 index 8102f3ba87..0000000000 --- a/docs/examples/guide/b7ad394975863a8f5ee29627c3ab738b.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - prices: { - histogram: { - field: 'price', - interval: 50, - keyed: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b7bb5503e64bd869b2ac1c46c434a079.asciidoc b/docs/examples/guide/b7bb5503e64bd869b2ac1c46c434a079.asciidoc deleted file mode 100644 index e135843c5a..0000000000 --- a/docs/examples/guide/b7bb5503e64bd869b2ac1c46c434a079.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - histo: { - histogram: { - field: 'price', - interval: 5 - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b7c99eb38d4b37e22de1ffcb0e88ae4c.asciidoc b/docs/examples/guide/b7c99eb38d4b37e22de1ffcb0e88ae4c.asciidoc deleted file mode 100644 index 303e3e4f2b..0000000000 --- a/docs/examples/guide/b7c99eb38d4b37e22de1ffcb0e88ae4c.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - message: 'A new bonsai tree in the office' - } -) -puts response ----- diff --git a/docs/examples/guide/b7df0848b2dc3093f931976db5b8cfff.asciidoc b/docs/examples/guide/b7df0848b2dc3093f931976db5b8cfff.asciidoc deleted file mode 100644 index 0dc1aea7bb..0000000000 --- a/docs/examples/guide/b7df0848b2dc3093f931976db5b8cfff.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cluster.health( - filter_path: 'status,*_shards' -) -puts response ----- diff --git a/docs/examples/guide/b81a7b5f5ef19553f9cd49196f31018c.asciidoc b/docs/examples/guide/b81a7b5f5ef19553f9cd49196f31018c.asciidoc deleted file mode 100644 index 5ef8861990..0000000000 --- a/docs/examples/guide/b81a7b5f5ef19553f9cd49196f31018c.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'items', - body: { - mappings: { - properties: { - name: { - type: 'keyword' - }, - production_date: { - type: 'date' - }, - location: { - type: 'geo_point' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b82b156c7b9d1d78054577a6947a6cdd.asciidoc b/docs/examples/guide/b82b156c7b9d1d78054577a6947a6cdd.asciidoc deleted file mode 100644 index a2a67a7589..0000000000 --- a/docs/examples/guide/b82b156c7b9d1d78054577a6947a6cdd.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'geocells', - id: 1, - pipeline: 'geotile2shape', - body: { - geocell: '4/8/5' - } -) -puts response - -response = client.get( - index: 'geocells', - id: 1 -) -puts response ----- diff --git a/docs/examples/guide/b839f79a5d58506baed5714f1876ab55.asciidoc b/docs/examples/guide/b839f79a5d58506baed5714f1876ab55.asciidoc deleted file mode 100644 index ae1abbee08..0000000000 --- a/docs/examples/guide/b839f79a5d58506baed5714f1876ab55.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.eql.search( - index: 'my-data-stream', - body: { - query: "\n process where process.name == \"regsvr32.exe\"\n " - } -) -puts response ----- diff --git a/docs/examples/guide/b857abedc64e367def172bd07075e5c7.asciidoc b/docs/examples/guide/b857abedc64e367def172bd07075e5c7.asciidoc deleted file mode 100644 index efbbc8b5e8..0000000000 --- a/docs/examples/guide/b857abedc64e367def172bd07075e5c7.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_fingerprint_analyzer: { - type: 'fingerprint', - stopwords: '_english_' - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_fingerprint_analyzer', - text: 'Yes yes, Gödel said this sentence is consistent and.' - } -) -puts response ----- diff --git a/docs/examples/guide/b87438263ccd68624b1d69d8750f9432.asciidoc b/docs/examples/guide/b87438263ccd68624b1d69d8750f9432.asciidoc deleted file mode 100644 index 5d4c353379..0000000000 --- a/docs/examples/guide/b87438263ccd68624b1d69d8750f9432.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - status_code: { - type: 'long' - }, - session_id: { - type: 'long', - index: false - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b87bc8a521995051c7e7395f9c047e1c.asciidoc b/docs/examples/guide/b87bc8a521995051c7e7395f9c047e1c.asciidoc deleted file mode 100644 index 07e41799ea..0000000000 --- a/docs/examples/guide/b87bc8a521995051c7e7395f9c047e1c.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - number_one: { - type: 'integer', - ignore_malformed: true - }, - number_two: { - type: 'integer' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - text: 'Some text value', - number_one: 'foo' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - text: 'Some text value', - number_two: 'foo' - } -) -puts response ----- diff --git a/docs/examples/guide/b8c03bbd917d0cf5474a3e46ebdd7aad.asciidoc b/docs/examples/guide/b8c03bbd917d0cf5474a3e46ebdd7aad.asciidoc deleted file mode 100644 index 4a1499f76c..0000000000 --- a/docs/examples/guide/b8c03bbd917d0cf5474a3e46ebdd7aad.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'cjk_bigram' - ], - text: '東京都は、日本の首都であり' - } -) -puts response ----- diff --git a/docs/examples/guide/b8cc74a92bac837bfd8ba6d5935350ed.asciidoc b/docs/examples/guide/b8cc74a92bac837bfd8ba6d5935350ed.asciidoc deleted file mode 100644 index 5528725484..0000000000 --- a/docs/examples/guide/b8cc74a92bac837bfd8ba6d5935350ed.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - enabled: false - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - user_id: 'kimchy', - session_data: { - object: { - some_field: 'some_value' - } - } - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - fields: [ - 'user_id', - { - field: 'session_data.object.*', - include_unmapped: true - } - ], - _source: false - } -) -puts response ----- diff --git a/docs/examples/guide/b8dc3764c4467922474b2cdec74bb86b.asciidoc b/docs/examples/guide/b8dc3764c4467922474b2cdec74bb86b.asciidoc deleted file mode 100644 index 169cde9bfa..0000000000 --- a/docs/examples/guide/b8dc3764c4467922474b2cdec74bb86b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.transform.start_transform( - transform_id: 'last-log-from-clientip' -) -puts response ----- diff --git a/docs/examples/guide/b8e6e320a19936f6edfc242ccb5cde43.asciidoc b/docs/examples/guide/b8e6e320a19936f6edfc242ccb5cde43.asciidoc deleted file mode 100644 index 285cc54791..0000000000 --- a/docs/examples/guide/b8e6e320a19936f6edfc242ccb5cde43.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - names: [ - 'John Abraham', - 'Lincoln Smith' - ] - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - match_phrase: { - names: { - query: 'Abraham Lincoln' - } - } - } - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - match_phrase: { - names: { - query: 'Abraham Lincoln', - slop: 101 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b9370fa1aa18fe4bc00cf81ef0c0d45b.asciidoc b/docs/examples/guide/b9370fa1aa18fe4bc00cf81ef0c0d45b.asciidoc deleted file mode 100644 index 95cc616351..0000000000 --- a/docs/examples/guide/b9370fa1aa18fe4bc00cf81ef0c0d45b.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - fields: [ - 'city.*' - ], - query: 'this AND that OR thus' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b94cee0f74f57742b3948f9b784dfdd4.asciidoc b/docs/examples/guide/b94cee0f74f57742b3948f9b784dfdd4.asciidoc deleted file mode 100644 index e771925943..0000000000 --- a/docs/examples/guide/b94cee0f74f57742b3948f9b784dfdd4.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.clear_scroll( - scroll_id: 'DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==,DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAABFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAAAxZrUllkUVlCa1NqNmRMaUhiQlZkMWFBAAAAAAAAAAIWa1JZZFFZQmtTajZkTGlIYkJWZDFhQQAAAAAAAAAFFmtSWWRRWUJrU2o2ZExpSGJCVmQxYUEAAAAAAAAABBZrUllkUVlCa1NqNmRMaUhiQlZkMWFB' -) -puts response ----- diff --git a/docs/examples/guide/b96f465abb658fe32889c3d183f159a3.asciidoc b/docs/examples/guide/b96f465abb658fe32889c3d183f159a3.asciidoc deleted file mode 100644 index 35d14d3230..0000000000 --- a/docs/examples/guide/b96f465abb658fe32889c3d183f159a3.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'limit_example', - body: { - settings: { - analysis: { - analyzer: { - standard_one_token_limit: { - tokenizer: 'standard', - filter: [ - 'limit' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/b9a8f39ab9b1ed18c6c1db61ac4e6a9e.asciidoc b/docs/examples/guide/b9a8f39ab9b1ed18c6c1db61ac4e6a9e.asciidoc deleted file mode 100644 index 56911d26c9..0000000000 --- a/docs/examples/guide/b9a8f39ab9b1ed18c6c1db61ac4e6a9e.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get( - repository: 'my_repository', - snapshot: '_current' -) -puts response ----- diff --git a/docs/examples/guide/b9f716219359a6c973dafc50b348de33.asciidoc b/docs/examples/guide/b9f716219359a6c973dafc50b348de33.asciidoc deleted file mode 100644 index 86be8a2f17..0000000000 --- a/docs/examples/guide/b9f716219359a6c973dafc50b348de33.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - _source: { - enabled: false - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ba07330ed3291b3970f4eb01dacd8086.asciidoc b/docs/examples/guide/ba07330ed3291b3970f4eb01dacd8086.asciidoc deleted file mode 100644 index 68c71601f8..0000000000 --- a/docs/examples/guide/ba07330ed3291b3970f4eb01dacd8086.asciidoc +++ /dev/null @@ -1,106 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'museums', - body: { - mappings: { - properties: { - location: { - type: 'geo_point' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'museums', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - location: 'POINT (4.912350 52.374081)', - name: 'NEMO Science Museum' - }, - { - index: { - _id: 2 - } - }, - { - location: 'POINT (4.901618 52.369219)', - name: 'Museum Het Rembrandthuis' - }, - { - index: { - _id: 3 - } - }, - { - location: 'POINT (4.914722 52.371667)', - name: 'Nederlands Scheepvaartmuseum' - }, - { - index: { - _id: 4 - } - }, - { - location: 'POINT (4.405200 51.222900)', - name: 'Letterenhuis' - }, - { - index: { - _id: 5 - } - }, - { - location: 'POINT (2.336389 48.861111)', - name: 'Musée du Louvre' - }, - { - index: { - _id: 6 - } - }, - { - location: 'POINT (2.327000 48.860000)', - name: "Musée d'Orsay" - } - ] -) -puts response - -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - rings_around_amsterdam: { - geo_distance: { - field: 'location', - origin: 'POINT (4.894 52.3760)', - ranges: [ - { - to: 100_000 - }, - { - from: 100_000, - to: 300_000 - }, - { - from: 300_000 - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ba5dc6fb9bbe1406714da5d641462a23.asciidoc b/docs/examples/guide/ba5dc6fb9bbe1406714da5d641462a23.asciidoc deleted file mode 100644 index badccff550..0000000000 --- a/docs/examples/guide/ba5dc6fb9bbe1406714da5d641462a23.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_templates: [ - { - strings_as_ip: { - match_mapping_type: 'string', - match: 'ip*', - runtime: { - type: 'ip' - } - } - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/ba6040de55afb2c8fb9e5b24bb038820.asciidoc b/docs/examples/guide/ba6040de55afb2c8fb9e5b24bb038820.asciidoc deleted file mode 100644 index 11eb0f4fd4..0000000000 --- a/docs/examples/guide/ba6040de55afb2c8fb9e5b24bb038820.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_template( - name: 'temp*' -) -puts response ----- diff --git a/docs/examples/guide/ba66768ed04f7b87906badff40ff40ed.asciidoc b/docs/examples/guide/ba66768ed04f7b87906badff40ff40ed.asciidoc deleted file mode 100644 index 7be32bbb09..0000000000 --- a/docs/examples/guide/ba66768ed04f7b87906badff40ff40ed.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_primary_shard_size: '50gb' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ba9a5f66a6148612de0ad2491fd6c90d.asciidoc b/docs/examples/guide/ba9a5f66a6148612de0ad2491fd6c90d.asciidoc deleted file mode 100644 index e5173976a4..0000000000 --- a/docs/examples/guide/ba9a5f66a6148612de0ad2491fd6c90d.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'my_tokenizer' - } - }, - tokenizer: { - my_tokenizer: { - type: 'classic', - max_token_length: 5 - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_analyzer', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/bab4c3b22c1768fcc7153345e4096dfb.asciidoc b/docs/examples/guide/bab4c3b22c1768fcc7153345e4096dfb.asciidoc deleted file mode 100644 index 2d4dd782d6..0000000000 --- a/docs/examples/guide/bab4c3b22c1768fcc7153345e4096dfb.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'keyword_repeat', - 'stemmer', - 'remove_duplicates' - ], - text: 'jumping dog' - } -) -puts response ----- diff --git a/docs/examples/guide/bb067c049331cc850a77b18bdfff81b5.asciidoc b/docs/examples/guide/bb067c049331cc850a77b18bdfff81b5.asciidoc deleted file mode 100644 index 7e7f6f1ad9..0000000000 --- a/docs/examples/guide/bb067c049331cc850a77b18bdfff81b5.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'lithuanian_example', - body: { - settings: { - analysis: { - filter: { - lithuanian_stop: { - type: 'stop', - stopwords: '_lithuanian_' - }, - lithuanian_keywords: { - type: 'keyword_marker', - keywords: [ - 'pavyzdys' - ] - }, - lithuanian_stemmer: { - type: 'stemmer', - language: 'lithuanian' - } - }, - analyzer: { - rebuilt_lithuanian: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'lithuanian_stop', - 'lithuanian_keywords', - 'lithuanian_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bb5a1319c496acc862c670cc7224e59a.asciidoc b/docs/examples/guide/bb5a1319c496acc862c670cc7224e59a.asciidoc deleted file mode 100644 index c315d65ab5..0000000000 --- a/docs/examples/guide/bb5a1319c496acc862c670cc7224e59a.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'attachment', - body: { - description: 'Extract attachment information', - processors: [ - { - attachment: { - field: 'data', - indexed_chars: 11, - indexed_chars_field: 'max_size', - remove_binary: false - } - } - ] - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'my_id', - pipeline: 'attachment', - body: { - data: 'e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=' - } -) -puts response - -response = client.get( - index: 'my-index-000001', - id: 'my_id' -) -puts response ----- diff --git a/docs/examples/guide/bb792e64a4c1f872296073b457aa03c8.asciidoc b/docs/examples/guide/bb792e64a4c1f872296073b457aa03c8.asciidoc deleted file mode 100644 index a733977b2d..0000000000 --- a/docs/examples/guide/bb792e64a4c1f872296073b457aa03c8.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.delete( - repository: 'my_repository', - snapshot: 'my_snapshot_2099.05.06' -) -puts response ----- diff --git a/docs/examples/guide/bb975b342de7e838ebf6a36aaa1a8749.asciidoc b/docs/examples/guide/bb975b342de7e838ebf6a36aaa1a8749.asciidoc deleted file mode 100644 index 93bf82dbe5..0000000000 --- a/docs/examples/guide/bb975b342de7e838ebf6a36aaa1a8749.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 3, - routing: 1, - refresh: true, - body: { - text: 'This is a vote', - my_join_field: { - name: 'vote', - parent: '2' - } - } -) -puts response ----- diff --git a/docs/examples/guide/bb9e268ec62d19ca2a6366cbb48fae68.asciidoc b/docs/examples/guide/bb9e268ec62d19ca2a6366cbb48fae68.asciidoc deleted file mode 100644 index b8caa8bd5f..0000000000 --- a/docs/examples/guide/bb9e268ec62d19ca2a6366cbb48fae68.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.count( - v: true -) -puts response ----- diff --git a/docs/examples/guide/bc4d308069af23929a49d856f6bc3008.asciidoc b/docs/examples/guide/bc4d308069af23929a49d856f6bc3008.asciidoc deleted file mode 100644 index 1b91444d33..0000000000 --- a/docs/examples/guide/bc4d308069af23929a49d856f6bc3008.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - rings: { - geo_distance: { - field: 'location', - origin: 'POINT (4.894 52.3760)', - unit: 'km', - distance_type: 'plane', - ranges: [ - { - to: 100 - }, - { - from: 100, - to: 300 - }, - { - from: 300 - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bcae0f00ae1e6f08fa395ca741fe84f9.asciidoc b/docs/examples/guide/bcae0f00ae1e6f08fa395ca741fe84f9.asciidoc deleted file mode 100644 index 99cdbab5c4..0000000000 --- a/docs/examples/guide/bcae0f00ae1e6f08fa395ca741fe84f9.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.rank_eval( - index: 'my-index-000001', - body: { - requests: [ - { - id: 'JFK query', - request: { - query: { - match_all: {} - } - }, - ratings: [] - } - ], - metric: { - dcg: { - k: 20, - normalize: false - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bcb572658986d69ae17c28ddd7e4bfd8.asciidoc b/docs/examples/guide/bcb572658986d69ae17c28ddd7e4bfd8.asciidoc deleted file mode 100644 index f0357db3e8..0000000000 --- a/docs/examples/guide/bcb572658986d69ae17c28ddd7e4bfd8.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.field_usage_stats( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/bcbd4d4749126837723438ff4faeb0f6.asciidoc b/docs/examples/guide/bcbd4d4749126837723438ff4faeb0f6.asciidoc deleted file mode 100644 index f7760398cd..0000000000 --- a/docs/examples/guide/bcbd4d4749126837723438ff4faeb0f6.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - filter_path: 'aggregations', - body: { - size: 0, - aggregations: { - top_values: { - terms: { - field: 'my-field', - size: 10 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc b/docs/examples/guide/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc deleted file mode 100644 index 1847170105..0000000000 --- a/docs/examples/guide/bcc75fc01b45e482638c65b8fbdf09fa.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'books' -) -puts response ----- diff --git a/docs/examples/guide/bcdfaa4487747249699a86a0dcd22f5e.asciidoc b/docs/examples/guide/bcdfaa4487747249699a86a0dcd22f5e.asciidoc deleted file mode 100644 index 764a69f690..0000000000 --- a/docs/examples/guide/bcdfaa4487747249699a86a0dcd22f5e.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.simulate.ingest( - body: { - docs: [ - { - _index: 'my-index', - _id: '123', - _source: { - foo: 'bar' - } - }, - { - _index: 'my-index', - _id: '456', - _source: { - foo: 'rab' - } - } - ], - pipeline_substitutions: { - "my-pipeline": { - processors: [ - { - uppercase: { - field: 'foo' - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bd23c3a03907b1238dcb07ab9eecae7b.asciidoc b/docs/examples/guide/bd23c3a03907b1238dcb07ab9eecae7b.asciidoc deleted file mode 100644 index 4934268211..0000000000 --- a/docs/examples/guide/bd23c3a03907b1238dcb07ab9eecae7b.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'my-index-000001', - scroll_size: 100 -) -puts response ----- diff --git a/docs/examples/guide/bd298b11933605c641626750c981d70b.asciidoc b/docs/examples/guide/bd298b11933605c641626750c981d70b.asciidoc deleted file mode 100644 index 4ed3cdee10..0000000000 --- a/docs/examples/guide/bd298b11933605c641626750c981d70b.asciidoc +++ /dev/null @@ -1,51 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'ct1', - body: { - template: { - settings: { - 'index.number_of_shards' => 2 - } - } - } -) -puts response - -response = client.cluster.put_component_template( - name: 'ct2', - body: { - template: { - settings: { - 'index.number_of_replicas' => 0 - }, - mappings: { - properties: { - "@timestamp": { - type: 'date' - } - } - } - } - } -) -puts response - -response = client.indices.simulate_template( - body: { - index_patterns: [ - 'my*' - ], - template: { - settings: { - 'index.number_of_shards' => 3 - } - }, - composed_of: [ - 'ct1', - 'ct2' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/bd2a387e8c21bf01a1039e81d7602921.asciidoc b/docs/examples/guide/bd2a387e8c21bf01a1039e81d7602921.asciidoc deleted file mode 100644 index 473131f62d..0000000000 --- a/docs/examples/guide/bd2a387e8c21bf01a1039e81d7602921.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.put_script( - id: 'my-search-template', - body: { - script: { - lang: 'mustache', - source: { - query: { - multi_match: { - query: '{{query_string}}', - fields: '[{{#text_fields}}{{user_name}},{{/text_fields}}]' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bd3d710ec50a151453e141691163af72.asciidoc b/docs/examples/guide/bd3d710ec50a151453e141691163af72.asciidoc deleted file mode 100644 index e3027ee859..0000000000 --- a/docs/examples/guide/bd3d710ec50a151453e141691163af72.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.tasks.list( - group_by: 'parents' -) -puts response ----- diff --git a/docs/examples/guide/bd458073196a19ecdeb24a8016488c20.asciidoc b/docs/examples/guide/bd458073196a19ecdeb24a8016488c20.asciidoc deleted file mode 100644 index 8eafc8b6e9..0000000000 --- a/docs/examples/guide/bd458073196a19ecdeb24a8016488c20.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete_index_template( - name: 'my-index-template' -) -puts response ----- diff --git a/docs/examples/guide/bd57976bc93ca64b2d3e001df9f06c82.asciidoc b/docs/examples/guide/bd57976bc93ca64b2d3e001df9f06c82.asciidoc deleted file mode 100644 index 29fed8a8ed..0000000000 --- a/docs/examples/guide/bd57976bc93ca64b2d3e001df9f06c82.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.resolve_index( - name: 'f*,remoteCluster1:bar*', - expand_wildcards: 'all' -) -puts response ----- diff --git a/docs/examples/guide/bd5bd5d8b3d81241335fe1e5747080ac.asciidoc b/docs/examples/guide/bd5bd5d8b3d81241335fe1e5747080ac.asciidoc deleted file mode 100644 index 8cce33c3aa..0000000000 --- a/docs/examples/guide/bd5bd5d8b3d81241335fe1e5747080ac.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'shrink-index', - body: { - policy: { - phases: { - warm: { - min_age: '5d', - actions: { - shrink: { - number_of_shards: 1 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bd68666ca2e0be12f7624016317a62bc.asciidoc b/docs/examples/guide/bd68666ca2e0be12f7624016317a62bc.asciidoc deleted file mode 100644 index 21e3e4883a..0000000000 --- a/docs/examples/guide/bd68666ca2e0be12f7624016317a62bc.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - groups: '_all' -) -puts response - -response = client.nodes.stats( - metric: 'indices', - groups: 'foo,bar' -) -puts response ----- diff --git a/docs/examples/guide/bd7330af2609bdd8aa10958f5e640b93.asciidoc b/docs/examples/guide/bd7330af2609bdd8aa10958f5e640b93.asciidoc deleted file mode 100644 index 558b714bc6..0000000000 --- a/docs/examples/guide/bd7330af2609bdd8aa10958f5e640b93.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my_queries2', - id: 2, - refresh: true, - body: { - query: { - match: { - 'my_field.suffix' => 'xyz' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bd767ea03171fe71c73f58f16d5da92f.asciidoc b/docs/examples/guide/bd767ea03171fe71c73f58f16d5da92f.asciidoc deleted file mode 100644 index 79779cb5c3..0000000000 --- a/docs/examples/guide/bd767ea03171fe71c73f58f16d5da92f.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'file-path-test', - body: { - query: { - match: { - file_path: '/User/bob/photos/2017/05' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bd7a1417fc27b5a801334ec44462b376.asciidoc b/docs/examples/guide/bd7a1417fc27b5a801334ec44462b376.asciidoc deleted file mode 100644 index 2e5d199e1d..0000000000 --- a/docs/examples/guide/bd7a1417fc27b5a801334ec44462b376.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.ml_datafeeds( - v: true -) -puts response ----- diff --git a/docs/examples/guide/bd7fa2f122ab861cd00e0b9154d120b3.asciidoc b/docs/examples/guide/bd7fa2f122ab861cd00e0b9154d120b3.asciidoc deleted file mode 100644 index 1abbf61268..0000000000 --- a/docs/examples/guide/bd7fa2f122ab861cd00e0b9154d120b3.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index', - body: { - mappings: { - properties: { - "@timestamp": { - format: 'strict_date_optional_time||epoch_second', - type: 'date' - }, - message: { - type: 'wildcard' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc b/docs/examples/guide/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc deleted file mode 100644 index c84ab1a0ab..0000000000 --- a/docs/examples/guide/bdb30dd52d32f50994008f4f9c0da5f0.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query_rethrottle( - task_id: 'r1A2WoRbTwKZ516z6NEs5A:36619', - requests_per_second: -1 -) -puts response ----- diff --git a/docs/examples/guide/bdc68012c121062628d6d73468bf4866.asciidoc b/docs/examples/guide/bdc68012c121062628d6d73468bf4866.asciidoc deleted file mode 100644 index b06ffe18fc..0000000000 --- a/docs/examples/guide/bdc68012c121062628d6d73468bf4866.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.cleanup_repository( - repository: 'my_repository' -) -puts response ----- diff --git a/docs/examples/guide/bdfb86cdfffb9d2ee6e3d399f00a57b0.asciidoc b/docs/examples/guide/bdfb86cdfffb9d2ee6e3d399f00a57b0.asciidoc deleted file mode 100644 index 7f1807e9dc..0000000000 --- a/docs/examples/guide/bdfb86cdfffb9d2ee6e3d399f00a57b0.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'test*', - filter_path: 'aggregations', - body: { - aggregations: { - ip: { - terms: { - field: 'ip' - }, - aggregations: { - tm: { - top_metrics: { - metrics: { - field: 'm' - }, - sort: { - s: 'desc' - }, - size: 1 - } - }, - having_tm: { - bucket_selector: { - buckets_path: { - top_m: 'tm[m]' - }, - script: 'params.top_m < 1000' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/be285eef1d2df0dfcf876e2d4b361f1e.asciidoc b/docs/examples/guide/be285eef1d2df0dfcf876e2d4b361f1e.asciidoc deleted file mode 100644 index e643f2be21..0000000000 --- a/docs/examples/guide/be285eef1d2df0dfcf876e2d4b361f1e.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'common_grams_example', - body: { - settings: { - analysis: { - analyzer: { - index_grams: { - tokenizer: 'whitespace', - filter: [ - 'common_grams_query' - ] - } - }, - filter: { - common_grams_query: { - type: 'common_grams', - common_words: [ - 'a', - 'is', - 'the' - ], - ignore_case: true, - query_mode: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/be30ea12f605fd61acba689b68e00bbe.asciidoc b/docs/examples/guide/be30ea12f605fd61acba689b68e00bbe.asciidoc deleted file mode 100644 index 4ceb3acb11..0000000000 --- a/docs/examples/guide/be30ea12f605fd61acba689b68e00bbe.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'hugging_face_embeddings', - body: { - processors: [ - { - inference: { - model_id: 'hugging_face_embeddings', - input_output: { - input_field: 'content', - output_field: 'content_embedding' - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/be3a6431d01846950dc1a39a7a6a1faa.asciidoc b/docs/examples/guide/be3a6431d01846950dc1a39a7a6a1faa.asciidoc deleted file mode 100644 index c21add65dd..0000000000 --- a/docs/examples/guide/be3a6431d01846950dc1a39a7a6a1faa.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.tasks.get( - task_id: 'r1A2WoRbTwKZ516z6NEs5A:36619' -) -puts response ----- diff --git a/docs/examples/guide/be5b415d7f33d6f0397ac2f8b5c10521.asciidoc b/docs/examples/guide/be5b415d7f33d6f0397ac2f8b5c10521.asciidoc deleted file mode 100644 index 8a24850636..0000000000 --- a/docs/examples/guide/be5b415d7f33d6f0397ac2f8b5c10521.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'my-index-000001', - refresh: true, - slices: 5, - body: { - script: { - source: "ctx._source['extra'] = 'test'" - } - } -) -puts response ----- diff --git a/docs/examples/guide/be5d62e7c8f63687c585305fbe70d7d0.asciidoc b/docs/examples/guide/be5d62e7c8f63687c585305fbe70d7d0.asciidoc deleted file mode 100644 index 4798c13306..0000000000 --- a/docs/examples/guide/be5d62e7c8f63687c585305fbe70d7d0.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_outlier: { - percentiles: { - field: 'load_time', - tdigest: { - compression: 200 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/be5fef0640c3a650ee96f84e3376a1be.asciidoc b/docs/examples/guide/be5fef0640c3a650ee96f84e3376a1be.asciidoc deleted file mode 100644 index 0e59f73d59..0000000000 --- a/docs/examples/guide/be5fef0640c3a650ee96f84e3376a1be.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'test', - id: 1, - body: { - scripted_upsert: true, - script: { - source: "\n if ( ctx.op == 'create' ) {\n ctx._source.counter = params.count\n } else {\n ctx._source.counter += params.count\n }\n ", - params: { - count: 4 - } - }, - upsert: {} - } -) -puts response ----- diff --git a/docs/examples/guide/be9836fe55c5fada404a2adc1663d832.asciidoc b/docs/examples/guide/be9836fe55c5fada404a2adc1663d832.asciidoc deleted file mode 100644 index fbe3ca3d0a..0000000000 --- a/docs/examples/guide/be9836fe55c5fada404a2adc1663d832.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - runtime: { - http: { - type: 'composite', - script: 'emit(grok("%s").extract(doc["message"].value))', - fields: { - clientip: { - type: 'ip' - }, - verb: { - type: 'keyword' - }, - response: { - type: 'long' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/beaf43b274b0f32cf3cf48f59e5cb1f2.asciidoc b/docs/examples/guide/beaf43b274b0f32cf3cf48f59e5cb1f2.asciidoc deleted file mode 100644 index 8bbaead290..0000000000 --- a/docs/examples/guide/beaf43b274b0f32cf3cf48f59e5cb1f2.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get( - repository: 'my_repository', - snapshot: 'snapshot_*', - sort: 'start_time', - from_sort_value: 1_577_833_200_000 -) -puts response ----- diff --git a/docs/examples/guide/beb0b9ff4f68672273fcff1b7bae706b.asciidoc b/docs/examples/guide/beb0b9ff4f68672273fcff1b7bae706b.asciidoc deleted file mode 100644 index 00775335b0..0000000000 --- a/docs/examples/guide/beb0b9ff4f68672273fcff1b7bae706b.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - user_identifier: { - type: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/beba2a9795c8a13653e1edf64eec4357.asciidoc b/docs/examples/guide/beba2a9795c8a13653e1edf64eec4357.asciidoc deleted file mode 100644 index 66ed47d74b..0000000000 --- a/docs/examples/guide/beba2a9795c8a13653e1edf64eec4357.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'test', - body: { - 'index.routing.allocation.require.size' => 'big', - 'index.routing.allocation.require.rack' => 'rack1' - } -) -puts response ----- diff --git a/docs/examples/guide/bed14cc152522ca0726ac3746ebc31db.asciidoc b/docs/examples/guide/bed14cc152522ca0726ac3746ebc31db.asciidoc deleted file mode 100644 index f9eefc13d1..0000000000 --- a/docs/examples/guide/bed14cc152522ca0726ac3746ebc31db.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my_index', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - my_counter: 0 - }, - { - index: { - _id: 2 - } - }, - { - my_counter: 9_223_372_036_854_776_000 - }, - { - index: { - _id: 3 - } - }, - { - my_counter: 18_446_744_073_709_552_000 - }, - { - index: { - _id: 4 - } - }, - { - my_counter: 18_446_744_073_709_552_000 - } - ] -) -puts response ----- diff --git a/docs/examples/guide/bf17440ac178d2ef5f5be643d033920b.asciidoc b/docs/examples/guide/bf17440ac178d2ef5f5be643d033920b.asciidoc deleted file mode 100644 index fce14b1e5c..0000000000 --- a/docs/examples/guide/bf17440ac178d2ef5f5be643d033920b.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - wait_for_completion: false, - body: { - source: { - index: 'test-data', - size: 50 - }, - dest: { - index: 'my-index', - pipeline: 'elser-v2-test' - } - } -) -puts response ----- diff --git a/docs/examples/guide/bf2e6ea2bae621b9b2fee7003e891f86.asciidoc b/docs/examples/guide/bf2e6ea2bae621b9b2fee7003e891f86.asciidoc deleted file mode 100644 index d5d4313036..0000000000 --- a/docs/examples/guide/bf2e6ea2bae621b9b2fee7003e891f86.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'index', - body: { - query: { - simple_query_string: { - fields: [ - 'body' - ], - query: 'ski' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bf3f520b47581d861e802730aaf2a519.asciidoc b/docs/examples/guide/bf3f520b47581d861e802730aaf2a519.asciidoc deleted file mode 100644 index 9646221e07..0000000000 --- a/docs/examples/guide/bf3f520b47581d861e802730aaf2a519.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.update_aliases( - body: { - actions: [ - { - add: { - index: 'logs-nginx.access-prod', - alias: 'logs' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/bf8680d940c84e43a9483a25548dea57.asciidoc b/docs/examples/guide/bf8680d940c84e43a9483a25548dea57.asciidoc deleted file mode 100644 index 538a1d77c9..0000000000 --- a/docs/examples/guide/bf8680d940c84e43a9483a25548dea57.asciidoc +++ /dev/null @@ -1,63 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - filter: { - autocomplete_filter: { - type: 'edge_ngram', - min_gram: 1, - max_gram: 20 - } - }, - analyzer: { - autocomplete: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'lowercase', - 'autocomplete_filter' - ] - } - } - } - }, - mappings: { - properties: { - text: { - type: 'text', - analyzer: 'autocomplete', - search_analyzer: 'standard' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - text: 'Quick Brown Fox' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - text: { - query: 'Quick Br', - operator: 'and' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bf9f13dc6c24cc225a72e32177e9ee02.asciidoc b/docs/examples/guide/bf9f13dc6c24cc225a72e32177e9ee02.asciidoc deleted file mode 100644 index 89ee9a8f4b..0000000000 --- a/docs/examples/guide/bf9f13dc6c24cc225a72e32177e9ee02.asciidoc +++ /dev/null @@ -1,89 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my_locations', - body: { - mappings: { - properties: { - pin: { - properties: { - location: { - type: 'geo_point' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'my_locations', - id: 1, - body: { - pin: { - location: { - lat: 40.12, - lon: -71.34 - } - } - } -) -puts response - -response = client.indices.create( - index: 'my_geoshapes', - body: { - mappings: { - properties: { - pin: { - properties: { - location: { - type: 'geo_shape' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'my_geoshapes', - id: 1, - body: { - pin: { - location: { - type: 'polygon', - coordinates: [ - [ - [ - 13, - 51.5 - ], - [ - 15, - 51.5 - ], - [ - 15, - 54 - ], - [ - 13, - 54 - ], - [ - 13, - 51.5 - ] - ] - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/bfb8a15cd05b43094ffbce8078bad3e1.asciidoc b/docs/examples/guide/bfb8a15cd05b43094ffbce8078bad3e1.asciidoc deleted file mode 100644 index a746303912..0000000000 --- a/docs/examples/guide/bfb8a15cd05b43094ffbce8078bad3e1.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get( - repository: 'my_repository', - snapshot: 'snapshot_2' -) -puts response ----- diff --git a/docs/examples/guide/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc b/docs/examples/guide/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc deleted file mode 100644 index 38d3c2f001..0000000000 --- a/docs/examples/guide/bfdad8a928ea30d7cf60d0a0a6bc6e2e.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - filter_path: 'items.*.error', - body: [ - { - update: { - _id: '5', - _index: 'index1' - } - }, - { - doc: { - my_field: 'baz' - } - }, - { - update: { - _id: '6', - _index: 'index1' - } - }, - { - doc: { - my_field: 'baz' - } - }, - { - update: { - _id: '7', - _index: 'index1' - } - }, - { - doc: { - my_field: 'baz' - } - } - ] -) -puts response ----- diff --git a/docs/examples/guide/c00c9412609832ebceb9e786dd9542df.asciidoc b/docs/examples/guide/c00c9412609832ebceb9e786dd9542df.asciidoc deleted file mode 100644 index 9de66a6634..0000000000 --- a/docs/examples/guide/c00c9412609832ebceb9e786dd9542df.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_name( - connector_id: 'my-connector', - body: { - name: 'Custom connector', - description: 'This is my customized connector' - } -) -puts response ----- diff --git a/docs/examples/guide/c012f42b26eb8dd9b197644c3ed954cf.asciidoc b/docs/examples/guide/c012f42b26eb8dd9b197644c3ed954cf.asciidoc deleted file mode 100644 index 35b50bddfd..0000000000 --- a/docs/examples/guide/c012f42b26eb8dd9b197644c3ed954cf.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - name: { - first: 'Paul', - last: 'McCartney', - title: { - value: 'Sir', - category: 'order of chivalry' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c03ce952de42eae4b522cedc9fd3d14a.asciidoc b/docs/examples/guide/c03ce952de42eae4b522cedc9fd3d14a.asciidoc deleted file mode 100644 index e01b21843c..0000000000 --- a/docs/examples/guide/c03ce952de42eae4b522cedc9fd3d14a.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2))' - } -) -puts response ----- diff --git a/docs/examples/guide/c065a200c00e2005d88ec2f0c10c908a.asciidoc b/docs/examples/guide/c065a200c00e2005d88ec2f0c10c908a.asciidoc deleted file mode 100644 index 5057838f57..0000000000 --- a/docs/examples/guide/c065a200c00e2005d88ec2f0c10c908a.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'shingle' - ], - text: 'quick brown fox jumps' - } -) -puts response ----- diff --git a/docs/examples/guide/c067182d385f59ce5952fb9a716fbf05.asciidoc b/docs/examples/guide/c067182d385f59ce5952fb9a716fbf05.asciidoc deleted file mode 100644 index f3e64a0be1..0000000000 --- a/docs/examples/guide/c067182d385f59ce5952fb9a716fbf05.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.ml.post_calendar_events( - calendar_id: 'planned-outages', - body: { - events: [ - { - description: 'event 1', - start_time: 1_513_641_600_000, - end_time: 1_513_728_000_000 - }, - { - description: 'event 2', - start_time: 1_513_814_400_000, - end_time: 1_513_900_800_000 - }, - { - description: 'event 3', - start_time: 1_514_160_000_000, - end_time: 1_514_246_400_000 - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/c0a4b0c1c6eff14da8b152ceb19c1c31.asciidoc b/docs/examples/guide/c0a4b0c1c6eff14da8b152ceb19c1c31.asciidoc deleted file mode 100644 index dfc6064dbc..0000000000 --- a/docs/examples/guide/c0a4b0c1c6eff14da8b152ceb19c1c31.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.health -puts response - -response = client.cat.nodes -puts response ----- diff --git a/docs/examples/guide/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc b/docs/examples/guide/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc deleted file mode 100644 index f5256a99aa..0000000000 --- a/docs/examples/guide/c0c638e3d218b0ecbe5c4d77c964ae9e.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - term: { - 'user.id' => { - value: 'kimchy', - boost: 1 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c0ebaa33e750b87555dc352073f692e8.asciidoc b/docs/examples/guide/c0ebaa33e750b87555dc352073f692e8.asciidoc deleted file mode 100644 index 82aed1f717..0000000000 --- a/docs/examples/guide/c0ebaa33e750b87555dc352073f692e8.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.indices.close( - index: 'my-index-000001' -) -puts response - -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - analysis: { - analyzer: { - content: { - type: 'custom', - tokenizer: 'whitespace' - } - } - } - } -) -puts response - -response = client.indices.open( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/c0ff8b3db994c4736f7579dde18097d2.asciidoc b/docs/examples/guide/c0ff8b3db994c4736f7579dde18097d2.asciidoc deleted file mode 100644 index b05484b57f..0000000000 --- a/docs/examples/guide/c0ff8b3db994c4736f7579dde18097d2.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.get_source( - index: 'my-index-000001', - id: 1, - _source_includes: '*.id', - _source_excludes: 'entities' -) -puts response ----- diff --git a/docs/examples/guide/c11c4d6b30e882871bf0074f407149bd.asciidoc b/docs/examples/guide/c11c4d6b30e882871bf0074f407149bd.asciidoc deleted file mode 100644 index e051fc7f22..0000000000 --- a/docs/examples/guide/c11c4d6b30e882871bf0074f407149bd.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - text: 'This is a parent document.', - "my-join-field": 'my-parent' - } -) -puts response ----- diff --git a/docs/examples/guide/c12d6e962f083c728f9397932f05202e.asciidoc b/docs/examples/guide/c12d6e962f083c728f9397932f05202e.asciidoc deleted file mode 100644 index af049b4a60..0000000000 --- a/docs/examples/guide/c12d6e962f083c728f9397932f05202e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.sync_job_list( - connector_id: 'connector-1' -) -puts response ----- diff --git a/docs/examples/guide/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc b/docs/examples/guide/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc deleted file mode 100644 index bec37a16f4..0000000000 --- a/docs/examples/guide/c147de68fd6da032ad4a3c1bf626f5d6.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - highlight: { - fields: { - comment: { - type: 'plain' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c155d2670ff82b135c7dcec0fc8a3f23.asciidoc b/docs/examples/guide/c155d2670ff82b135c7dcec0fc8a3f23.asciidoc deleted file mode 100644 index f51b99a4ee..0000000000 --- a/docs/examples/guide/c155d2670ff82b135c7dcec0fc8a3f23.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.eql.delete( - id: 'FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=' -) -puts response ----- diff --git a/docs/examples/guide/c186ecf6f799ddff7add1abdecea5821.asciidoc b/docs/examples/guide/c186ecf6f799ddff7add1abdecea5821.asciidoc deleted file mode 100644 index 3dc3f5c125..0000000000 --- a/docs/examples/guide/c186ecf6f799ddff7add1abdecea5821.asciidoc +++ /dev/null @@ -1,47 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - full_name: { - type: 'text', - store: true - }, - title: { - type: 'text', - store: true - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - full_name: 'Alice Ball', - title: 'Professor' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - script_fields: { - name_with_title: { - script: { - lang: 'painless', - source: "params._fields['title'].value + ' ' + params._fields['full_name'].value" - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c187b52646cedeebe0716327add65642.asciidoc b/docs/examples/guide/c187b52646cedeebe0716327add65642.asciidoc deleted file mode 100644 index b33b1ad070..0000000000 --- a/docs/examples/guide/c187b52646cedeebe0716327add65642.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.sql.get_async( - id: 'FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=', - format: 'json' -) -puts response ----- diff --git a/docs/examples/guide/c1a895497066a3dac674d4b1a119048d.asciidoc b/docs/examples/guide/c1a895497066a3dac674d4b1a119048d.asciidoc deleted file mode 100644 index f6d84e122e..0000000000 --- a/docs/examples/guide/c1a895497066a3dac674d4b1a119048d.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - pretty: true, - body: { - query: { - term: { - full_text: 'Quick Brown Foxes!' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c1ad9ff64728a5bfeeb485e60ec694a1.asciidoc b/docs/examples/guide/c1ad9ff64728a5bfeeb485e60ec694a1.asciidoc deleted file mode 100644 index 256c9e8fca..0000000000 --- a/docs/examples/guide/c1ad9ff64728a5bfeeb485e60ec694a1.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.rank_eval( - index: 'my-index-000001', - body: { - requests: [ - { - id: 'JFK query', - request: { - query: { - match_all: {} - } - }, - ratings: [] - } - ], - metric: { - expected_reciprocal_rank: { - maximum_relevance: 3, - k: 20 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c1bb395546102279296534522061829f.asciidoc b/docs/examples/guide/c1bb395546102279296534522061829f.asciidoc deleted file mode 100644 index 3a848c7a3c..0000000000 --- a/docs/examples/guide/c1bb395546102279296534522061829f.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - point: { - type: 'geo_point' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - point: [ - { - lat: -90, - lon: -80 - }, - { - lat: 10, - lon: 30 - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/c1efc5cfcb3c29711bfe118f1baa28b0.asciidoc b/docs/examples/guide/c1efc5cfcb3c29711bfe118f1baa28b0.asciidoc deleted file mode 100644 index e710252bae..0000000000 --- a/docs/examples/guide/c1efc5cfcb3c29711bfe118f1baa28b0.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'keyword_example', - body: { - settings: { - analysis: { - analyzer: { - rebuilt_keyword: { - tokenizer: 'keyword', - filter: [] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c208a06212dc0cf6ac413d4f2c154296.asciidoc b/docs/examples/guide/c208a06212dc0cf6ac413d4f2c154296.asciidoc deleted file mode 100644 index a2ff045d35..0000000000 --- a/docs/examples/guide/c208a06212dc0cf6ac413d4f2c154296.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.flush( - index: 'my-index-000001,my-index-000002' -) -puts response ----- diff --git a/docs/examples/guide/c208de54369379e8d78ab201be18b6be.asciidoc b/docs/examples/guide/c208de54369379e8d78ab201be18b6be.asciidoc deleted file mode 100644 index aa67a77bd1..0000000000 --- a/docs/examples/guide/c208de54369379e8d78ab201be18b6be.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_templates: [ - { - longs_as_strings: { - match_mapping_type: 'string', - match: 'long_*', - unmatch: '*_text', - mapping: { - type: 'long' - } - } - } - ] - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - long_num: '5', - long_text: 'foo' - } -) -puts response ----- diff --git a/docs/examples/guide/c21eb4bc30087188241cbba6b6b89999.asciidoc b/docs/examples/guide/c21eb4bc30087188241cbba6b6b89999.asciidoc deleted file mode 100644 index 8d2f8d4065..0000000000 --- a/docs/examples/guide/c21eb4bc30087188241cbba6b6b89999.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_service_type( - connector_id: 'my-connector', - body: { - service_type: 'sharepoint_online' - } -) -puts response ----- diff --git a/docs/examples/guide/c23e32775340d7bc6f46820313014d8a.asciidoc b/docs/examples/guide/c23e32775340d7bc6f46820313014d8a.asciidoc deleted file mode 100644 index e805168775..0000000000 --- a/docs/examples/guide/c23e32775340d7bc6f46820313014d8a.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my_test_scores_2', - pipeline: 'my_test_scores_pipeline', - body: { - student: 'kimchy', - grad_year: '2099', - math_score: 1200, - verbal_score: 800 - } -) -puts response ----- diff --git a/docs/examples/guide/c267e90b7873a7c8c8af06f01e958e69.asciidoc b/docs/examples/guide/c267e90b7873a7c8c8af06f01e958e69.asciidoc deleted file mode 100644 index e793baf0cb..0000000000 --- a/docs/examples/guide/c267e90b7873a7c8c8af06f01e958e69.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'logs*', - size: 0 -) -puts response ----- diff --git a/docs/examples/guide/c28f0b0dd3246cb91d6facb3295a61d7.asciidoc b/docs/examples/guide/c28f0b0dd3246cb91d6facb3295a61d7.asciidoc deleted file mode 100644 index 135167ff98..0000000000 --- a/docs/examples/guide/c28f0b0dd3246cb91d6facb3295a61d7.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.close( - index: 'kibana_sample_data_flights,.ds-my-data-stream-2022.06.17-000001' -) -puts response ----- diff --git a/docs/examples/guide/c2c21e2824fbf6b7198ede30419da82b.asciidoc b/docs/examples/guide/c2c21e2824fbf6b7198ede30419da82b.asciidoc deleted file mode 100644 index c8109212f4..0000000000 --- a/docs/examples/guide/c2c21e2824fbf6b7198ede30419da82b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.clear_scroll( - scroll_id: '_all' -) -puts response ----- diff --git a/docs/examples/guide/c2d7c36daac8608d2515c549b2c82436.asciidoc b/docs/examples/guide/c2d7c36daac8608d2515c549b2c82436.asciidoc deleted file mode 100644 index 344c198299..0000000000 --- a/docs/examples/guide/c2d7c36daac8608d2515c549b2c82436.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - tile: { - geotile_grid: { - field: 'location', - precision: 22, - bounds: { - top_left: 'POINT (4.9 52.4)', - bottom_right: 'POINT (5.0 52.3)' - } - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c318fde926842722825a51e5c9c326a9.asciidoc b/docs/examples/guide/c318fde926842722825a51e5c9c326a9.asciidoc deleted file mode 100644 index eceb8352ed..0000000000 --- a/docs/examples/guide/c318fde926842722825a51e5c9c326a9.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'keyword', - text: ' fox ' - } -) -puts response ----- diff --git a/docs/examples/guide/c38c882c642dd412e8fa4c3eed49d12f.asciidoc b/docs/examples/guide/c38c882c642dd412e8fa4c3eed49d12f.asciidoc deleted file mode 100644 index 62801c6086..0000000000 --- a/docs/examples/guide/c38c882c642dd412e8fa4c3eed49d12f.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - match_phrase_prefix: { - my_field: 'brown f' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c4272ad0309ffbcbe9ce96bf9fb4352a.asciidoc b/docs/examples/guide/c4272ad0309ffbcbe9ce96bf9fb4352a.asciidoc deleted file mode 100644 index 49dea97cdb..0000000000 --- a/docs/examples/guide/c4272ad0309ffbcbe9ce96bf9fb4352a.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'place', - pretty: true, - body: { - suggest: { - place_suggestion: { - prefix: 'tim', - completion: { - field: 'suggest', - size: 10, - contexts: { - place_type: [ - 'cafe', - 'restaurants' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c42bc6e74afc3d43cd032ec2bfd77385.asciidoc b/docs/examples/guide/c42bc6e74afc3d43cd032ec2bfd77385.asciidoc deleted file mode 100644 index da782e246e..0000000000 --- a/docs/examples/guide/c42bc6e74afc3d43cd032ec2bfd77385.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'keyword', - filter: [ - 'word_delimiter' - ], - text: "Neil's-Super-Duper-XL500--42+AutoCoder" - } -) -puts response ----- diff --git a/docs/examples/guide/c464ed2001d66a1446f37659dc9efc2a.asciidoc b/docs/examples/guide/c464ed2001d66a1446f37659dc9efc2a.asciidoc deleted file mode 100644 index 1f8852ccc0..0000000000 --- a/docs/examples/guide/c464ed2001d66a1446f37659dc9efc2a.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - range: { - date_range: { - field: 'date', - format: 'MM-yyyy', - ranges: [ - { - to: 'now-10M/M' - }, - { - from: 'now-10M/M' - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c47f030216a3c89f92f31787fc4d5df5.asciidoc b/docs/examples/guide/c47f030216a3c89f92f31787fc4d5df5.asciidoc deleted file mode 100644 index 38d570416b..0000000000 --- a/docs/examples/guide/c47f030216a3c89f92f31787fc4d5df5.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.plugins( - v: true, - s: 'component', - h: 'name,component,version,description' -) -puts response ----- diff --git a/docs/examples/guide/c4a1d03dcfb82913d0724a42b0a89f20.asciidoc b/docs/examples/guide/c4a1d03dcfb82913d0724a42b0a89f20.asciidoc deleted file mode 100644 index ac0bdbc14e..0000000000 --- a/docs/examples/guide/c4a1d03dcfb82913d0724a42b0a89f20.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.indices.clear_cache -puts response ----- diff --git a/docs/examples/guide/c4fadbb7f61e5f83ab3fc9cd4b82b5e5.asciidoc b/docs/examples/guide/c4fadbb7f61e5f83ab3fc9cd4b82b5e5.asciidoc deleted file mode 100644 index 892d4c50f4..0000000000 --- a/docs/examples/guide/c4fadbb7f61e5f83ab3fc9cd4b82b5e5.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.restore( - repository: 'my_repository', - snapshot: 'my_snapshot_2099.05.06', - body: { - feature_states: [ - 'geoip' - ], - include_global_state: false, - indices: '-*' - } -) -puts response ----- diff --git a/docs/examples/guide/c526fca1609b4c3c1d12dfd218d69a50.asciidoc b/docs/examples/guide/c526fca1609b4c3c1d12dfd218d69a50.asciidoc deleted file mode 100644 index 966f5db555..0000000000 --- a/docs/examples/guide/c526fca1609b4c3c1d12dfd218d69a50.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'my-index-000001' - }, - dest: { - index: 'my-new-index-000001' - } - } -) -puts response ----- diff --git a/docs/examples/guide/c554a1791f29bbbcddda84c64deaba6f.asciidoc b/docs/examples/guide/c554a1791f29bbbcddda84c64deaba6f.asciidoc deleted file mode 100644 index 7935ab203a..0000000000 --- a/docs/examples/guide/c554a1791f29bbbcddda84c64deaba6f.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'txt', - body: { - query: 'SELECT * FROM library ORDER BY page_count DESC', - fetch_size: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/c580092fd3d36c32b09d63921708a67b.asciidoc b/docs/examples/guide/c580092fd3d36c32b09d63921708a67b.asciidoc deleted file mode 100644 index 2c0699c2a9..0000000000 --- a/docs/examples/guide/c580092fd3d36c32b09d63921708a67b.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - dis_max: { - queries: [ - { - term: { - title: 'Quick pets' - } - }, - { - term: { - body: 'Quick pets' - } - } - ], - tie_breaker: 0.7 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c5802e9f3f4068fcecb6937b867b270d.asciidoc b/docs/examples/guide/c5802e9f3f4068fcecb6937b867b270d.asciidoc deleted file mode 100644 index 64838a6012..0000000000 --- a/docs/examples/guide/c5802e9f3f4068fcecb6937b867b270d.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - genres: { - terms: { - field: 'genre', - order: { - _count: 'asc' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c5ba7c4badb5ef5ca32740106e4aa6b6.asciidoc b/docs/examples/guide/c5ba7c4badb5ef5ca32740106e4aa6b6.asciidoc deleted file mode 100644 index 16f1794fdd..0000000000 --- a/docs/examples/guide/c5ba7c4badb5ef5ca32740106e4aa6b6.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.termvectors( - index: 'my-index-000001', - id: 1, - fields: 'message' -) -puts response ----- diff --git a/docs/examples/guide/c5bc577ff92f889225b0d2617adcb48c.asciidoc b/docs/examples/guide/c5bc577ff92f889225b0d2617adcb48c.asciidoc deleted file mode 100644 index eb4519070c..0000000000 --- a/docs/examples/guide/c5bc577ff92f889225b0d2617adcb48c.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - metric: 'process', - filter_path: '**.max_file_descriptors' -) -puts response ----- diff --git a/docs/examples/guide/c5cc19e48549fbc5327a9d46874bbeee.asciidoc b/docs/examples/guide/c5cc19e48549fbc5327a9d46874bbeee.asciidoc deleted file mode 100644 index fa4724efbb..0000000000 --- a/docs/examples/guide/c5cc19e48549fbc5327a9d46874bbeee.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'quantized-image-index', - body: { - knn: { - field: 'image-vector', - query_vector: [ - 0.1, - -2 - ], - k: 10, - num_candidates: 100 - }, - fields: [ - 'title' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/c5ed7d83ade97a417aef28b9e2871e5d.asciidoc b/docs/examples/guide/c5ed7d83ade97a417aef28b9e2871e5d.asciidoc deleted file mode 100644 index 6a65c46d2e..0000000000 --- a/docs/examples/guide/c5ed7d83ade97a417aef28b9e2871e5d.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-data-stream', - filter_path: 'hits.hits._source' -) -puts response ----- diff --git a/docs/examples/guide/c6151a0788a10a7f40da684d72c3255c.asciidoc b/docs/examples/guide/c6151a0788a10a7f40da684d72c3255c.asciidoc deleted file mode 100644 index 238775aae9..0000000000 --- a/docs/examples/guide/c6151a0788a10a7f40da684d72c3255c.asciidoc +++ /dev/null @@ -1,59 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-index-000001', - refresh: true, - body: [ - { - index: {} - }, - { - title: 'Something really urgent', - labels: { - priority: 'urgent', - release: [ - 'v1.2.5', - 'v1.3.0' - ], - timestamp: { - created: 1_541_458_026, - closed: 1_541_457_010 - } - } - }, - { - index: {} - }, - { - title: 'Somewhat less urgent', - labels: { - priority: 'high', - release: [ - 'v1.3.0' - ], - timestamp: { - created: 1_541_458_026, - closed: 1_541_457_010 - } - } - }, - { - index: {} - }, - { - title: 'Not urgent', - labels: { - priority: 'low', - release: [ - 'v1.2.0' - ], - timestamp: { - created: 1_541_458_026, - closed: 1_541_457_010 - } - } - } - ] -) -puts response ----- diff --git a/docs/examples/guide/c6339d09f85000a6432304b0ec63b8f6.asciidoc b/docs/examples/guide/c6339d09f85000a6432304b0ec63b8f6.asciidoc deleted file mode 100644 index 74493375d6..0000000000 --- a/docs/examples/guide/c6339d09f85000a6432304b0ec63b8f6.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'template_1', - body: { - template: { - settings: { - number_of_shards: 1 - } - }, - version: 123 - } -) -puts response ----- diff --git a/docs/examples/guide/c639036b87d02fb864e27c4ca29ef833.asciidoc b/docs/examples/guide/c639036b87d02fb864e27c4ca29ef833.asciidoc deleted file mode 100644 index c219c225be..0000000000 --- a/docs/examples/guide/c639036b87d02fb864e27c4ca29ef833.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'stackoverflow', - size: 0, - body: { - query: { - query_string: { - query: 'tags:kibana' - } - }, - runtime_mappings: { - 'tags.hash' => { - type: 'long', - script: "emit(doc['tags'].hashCode())" - } - }, - aggregations: { - my_unbiased_sample: { - diversified_sampler: { - shard_size: 200, - max_docs_per_value: 3, - field: 'tags.hash' - }, - aggregations: { - keywords: { - significant_terms: { - field: 'tags', - exclude: [ - 'kibana' - ] - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c64b61bedb21b9def8fce5092e677af9.asciidoc b/docs/examples/guide/c64b61bedb21b9def8fce5092e677af9.asciidoc deleted file mode 100644 index 593045eed7..0000000000 --- a/docs/examples/guide/c64b61bedb21b9def8fce5092e677af9.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - suggest: { - "my-suggest-1": { - text: 'tring out Elasticsearch', - term: { - field: 'message' - } - }, - "my-suggest-2": { - text: 'kmichy', - term: { - field: 'user.id' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c654b09be981be12fc7be0ba33f8652b.asciidoc b/docs/examples/guide/c654b09be981be12fc7be0ba33f8652b.asciidoc deleted file mode 100644 index 2dfe3a115a..0000000000 --- a/docs/examples/guide/c654b09be981be12fc7be0ba33f8652b.asciidoc +++ /dev/null @@ -1,68 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'multilinestring', - coordinates: [ - [ - [ - 1002, - 200 - ], - [ - 1003, - 200 - ], - [ - 1003, - 300 - ], - [ - 1002, - 300 - ] - ], - [ - [ - 1000, - 100 - ], - [ - 1001, - 100 - ], - [ - 1001, - 100 - ], - [ - 1000, - 100 - ] - ], - [ - [ - 1000.2, - 100.2 - ], - [ - 1000.8, - 100.2 - ], - [ - 1000.8, - 100.8 - ], - [ - 1000.2, - 100.8 - ] - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/c65b00a285f510dcd2865aa3539b4e03.asciidoc b/docs/examples/guide/c65b00a285f510dcd2865aa3539b4e03.asciidoc deleted file mode 100644 index fc7e0e8a12..0000000000 --- a/docs/examples/guide/c65b00a285f510dcd2865aa3539b4e03.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.transform.get_transform( - size: 10 -) -puts response ----- diff --git a/docs/examples/guide/c66dab0b114fa3e228e1c0e0e5a99b60.asciidoc b/docs/examples/guide/c66dab0b114fa3e228e1c0e0e5a99b60.asciidoc deleted file mode 100644 index 26466dff5e..0000000000 --- a/docs/examples/guide/c66dab0b114fa3e228e1c0e0e5a99b60.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - fields: [ - 'user.first' - ], - _source: false - } -) -puts response ----- diff --git a/docs/examples/guide/c67b0f00c2e690303c0e5af2f51e0fea.asciidoc b/docs/examples/guide/c67b0f00c2e690303c0e5af2f51e0fea.asciidoc deleted file mode 100644 index caabd6fa1e..0000000000 --- a/docs/examples/guide/c67b0f00c2e690303c0e5af2f51e0fea.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - message: 'tring out Elasticsearch' - } - }, - suggest: { - "my-suggestion": { - text: 'tring out Elasticsearch', - term: { - field: 'message' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c6abe91b5527870face2b826f37ba1da.asciidoc b/docs/examples/guide/c6abe91b5527870face2b826f37ba1da.asciidoc deleted file mode 100644 index e70c1ef3f1..0000000000 --- a/docs/examples/guide/c6abe91b5527870face2b826f37ba1da.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'image-index', - body: { - query: { - match: { - title: { - query: 'mountain lake', - boost: 0.9 - } - } - }, - knn: { - field: 'image-vector', - query_vector: [ - 54, - 10, - -2 - ], - k: 5, - num_candidates: 50, - boost: 0.1 - }, - size: 10 - } -) -puts response ----- diff --git a/docs/examples/guide/c6b365c7da97d7e50f36820a7d36f548.asciidoc b/docs/examples/guide/c6b365c7da97d7e50f36820a7d36f548.asciidoc deleted file mode 100644 index 5e88cc78b4..0000000000 --- a/docs/examples/guide/c6b365c7da97d7e50f36820a7d36f548.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my_index,my_other_index', - body: { - 'index.number_of_replicas' => 1 - } -) -puts response ----- diff --git a/docs/examples/guide/c6b5c695a9b757b5e7325345b206bde5.asciidoc b/docs/examples/guide/c6b5c695a9b757b5e7325345b206bde5.asciidoc deleted file mode 100644 index 32d4ac665f..0000000000 --- a/docs/examples/guide/c6b5c695a9b757b5e7325345b206bde5.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ingest.delete_pipeline( - id: 'pipeline-*' -) -puts response ----- diff --git a/docs/examples/guide/c6b8713bd49661d69d6b868f5b991d17.asciidoc b/docs/examples/guide/c6b8713bd49661d69d6b868f5b991d17.asciidoc deleted file mode 100644 index 251b5f7aef..0000000000 --- a/docs/examples/guide/c6b8713bd49661d69d6b868f5b991d17.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'job-candidates', - id: 1, - refresh: true, - body: { - name: 'Jane Smith', - programming_languages: [ - 'c++', - 'java' - ], - required_matches: 2 - } -) -puts response ----- diff --git a/docs/examples/guide/c6bdd5c7de79d6d9ac8e33a397b511e8.asciidoc b/docs/examples/guide/c6bdd5c7de79d6d9ac8e33a397b511e8.asciidoc deleted file mode 100644 index 80be73ca72..0000000000 --- a/docs/examples/guide/c6bdd5c7de79d6d9ac8e33a397b511e8.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - user_id: { - type: 'long' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c6d39d22188dc7bbfdad811a94cbcc2b.asciidoc b/docs/examples/guide/c6d39d22188dc7bbfdad811a94cbcc2b.asciidoc deleted file mode 100644 index 5d0b7d8794..0000000000 --- a/docs/examples/guide/c6d39d22188dc7bbfdad811a94cbcc2b.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'classic', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/c6d5e3b6ff9c665ec5344a4bfa7add80.asciidoc b/docs/examples/guide/c6d5e3b6ff9c665ec5344a4bfa7add80.asciidoc deleted file mode 100644 index 7ae0b33dbd..0000000000 --- a/docs/examples/guide/c6d5e3b6ff9c665ec5344a4bfa7add80.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'transport.tracer.include' => '*', - 'transport.tracer.exclude' => 'internal:coordination/fault_detection/*' - } - } -) -puts response ----- diff --git a/docs/examples/guide/c725c72ead2dae0205a5a34a50d7ad83.asciidoc b/docs/examples/guide/c725c72ead2dae0205a5a34a50d7ad83.asciidoc deleted file mode 100644 index ce9fa114c1..0000000000 --- a/docs/examples/guide/c725c72ead2dae0205a5a34a50d7ad83.asciidoc +++ /dev/null @@ -1,76 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - topics: { - type: 'rank_features' - }, - negative_reviews: { - type: 'rank_features', - positive_score_impact: false - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - topics: { - politics: 20, - economics: 50.8 - }, - negative_reviews: { - "1star": 10, - "2star": 100 - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - topics: { - politics: 5.2, - sports: 80.1 - }, - negative_reviews: { - "1star": 1, - "2star": 10 - } - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - rank_feature: { - field: 'topics.politics' - } - } - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - rank_feature: { - field: 'negative_reviews.1star' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c733f20641b20e124f26198534755d6d.asciidoc b/docs/examples/guide/c733f20641b20e124f26198534755d6d.asciidoc deleted file mode 100644 index 3ac32bef23..0000000000 --- a/docs/examples/guide/c733f20641b20e124f26198534755d6d.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - aggregations: { - "my-first-agg-name": { - terms: { - field: 'my-field' - } - }, - "my-second-agg-name": { - avg: { - field: 'my-other-field' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c76cb6a080959b0d87afd780cf814be2.asciidoc b/docs/examples/guide/c76cb6a080959b0d87afd780cf814be2.asciidoc deleted file mode 100644 index 4831d430c5..0000000000 --- a/docs/examples/guide/c76cb6a080959b0d87afd780cf814be2.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - bool: { - should: [ - { - term: { - message: 'quick' - } - }, - { - term: { - message: 'brown' - } - }, - { - prefix: { - message: 'f' - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c79b284fa7a5d7421c6daae62bc697f9.asciidoc b/docs/examples/guide/c79b284fa7a5d7421c6daae62bc697f9.asciidoc deleted file mode 100644 index e44b4ad36b..0000000000 --- a/docs/examples/guide/c79b284fa7a5d7421c6daae62bc697f9.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete( - index: 'kibana_sample_data_ecommerce' -) -puts response ----- diff --git a/docs/examples/guide/c8210f23c10d0642f24c1e43faa4deda.asciidoc b/docs/examples/guide/c8210f23c10d0642f24c1e43faa4deda.asciidoc deleted file mode 100644 index b2bd798c45..0000000000 --- a/docs/examples/guide/c8210f23c10d0642f24c1e43faa4deda.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'my-mappings', - body: { - template: { - mappings: { - properties: { - "@timestamp": { - type: 'date', - format: 'date_optional_time||epoch_millis' - }, - message: { - type: 'wildcard' - } - } - } - }, - _meta: { - description: 'Mappings for @timestamp and message fields', - "my-custom-meta-field": 'More arbitrary metadata' - } - } -) -puts response - -response = client.cluster.put_component_template( - name: 'my-settings', - body: { - template: { - settings: { - 'index.lifecycle.name' => 'my-lifecycle-policy' - } - }, - _meta: { - description: 'Settings for ILM', - "my-custom-meta-field": 'More arbitrary metadata' - } - } -) -puts response ----- diff --git a/docs/examples/guide/c87038b96ab06d9a741a130f94de4f02.asciidoc b/docs/examples/guide/c87038b96ab06d9a741a130f94de4f02.asciidoc deleted file mode 100644 index b8839ef9b5..0000000000 --- a/docs/examples/guide/c87038b96ab06d9a741a130f94de4f02.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.delete( - index: 'my-index-000001', - id: 1, - timeout: '5m' -) -puts response ----- diff --git a/docs/examples/guide/c873f9cd093e26515148f052e28c7805.asciidoc b/docs/examples/guide/c873f9cd093e26515148f052e28c7805.asciidoc deleted file mode 100644 index f243b0e114..0000000000 --- a/docs/examples/guide/c873f9cd093e26515148f052e28c7805.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_model_snapshots( - job_id: 'high_sum_total_sales', - body: { - start: '1575402236000' - } -) -puts response ----- diff --git a/docs/examples/guide/c8bbf362f06a0d8dab33ec0d99743343.asciidoc b/docs/examples/guide/c8bbf362f06a0d8dab33ec0d99743343.asciidoc deleted file mode 100644 index b5ed15c1d7..0000000000 --- a/docs/examples/guide/c8bbf362f06a0d8dab33ec0d99743343.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'classic', - filter: [ - 'classic' - ], - text: "The 2 Q.U.I.C.K. Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/c8e2109b19d50467ab83a40006462e9f.asciidoc b/docs/examples/guide/c8e2109b19d50467ab83a40006462e9f.asciidoc deleted file mode 100644 index bca712d4d5..0000000000 --- a/docs/examples/guide/c8e2109b19d50467ab83a40006462e9f.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.enrich.execute_policy( - name: 'my-policy', - wait_for_completion: false -) -puts response ----- diff --git a/docs/examples/guide/c956bf1f0829a5f0357c0494ed8b6ca3.asciidoc b/docs/examples/guide/c956bf1f0829a5f0357c0494ed8b6ca3.asciidoc deleted file mode 100644 index 171a80bc85..0000000000 --- a/docs/examples/guide/c956bf1f0829a5f0357c0494ed8b6ca3.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search_template( - index: 'my-index', - body: { - id: 'my-search-template', - params: { - query_string: 'hello world', - from: 0, - size: 10 - } - } -) -puts response ----- diff --git a/docs/examples/guide/c95d5317525c2ff625e6971c277247af.asciidoc b/docs/examples/guide/c95d5317525c2ff625e6971c277247af.asciidoc deleted file mode 100644 index 4c0314c484..0000000000 --- a/docs/examples/guide/c95d5317525c2ff625e6971c277247af.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'keyword', - filter: [ - 'lowercase' - ], - text: 'john.SMITH@example.COM' - } -) -puts response ----- diff --git a/docs/examples/guide/c96669604d0e66a097ddf3093b025ccd.asciidoc b/docs/examples/guide/c96669604d0e66a097ddf3093b025ccd.asciidoc deleted file mode 100644 index 682daadfb8..0000000000 --- a/docs/examples/guide/c96669604d0e66a097ddf3093b025ccd.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - size: 0, - aggregations: { - "my-agg-name": { - terms: { - field: 'my-field' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c96e5740b79f703c5b77e3ddc9fdf3a0.asciidoc b/docs/examples/guide/c96e5740b79f703c5b77e3ddc9fdf3a0.asciidoc deleted file mode 100644 index 650ece5028..0000000000 --- a/docs/examples/guide/c96e5740b79f703c5b77e3ddc9fdf3a0.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'my-index-template', - body: { - index_patterns: [ - 'my-data-stream*' - ], - data_stream: {}, - composed_of: [ - 'my-mappings', - 'my-settings' - ], - priority: 500, - _meta: { - description: 'Template for my time series data', - "my-custom-meta-field": 'More arbitrary metadata' - } - } -) -puts response ----- diff --git a/docs/examples/guide/c97fd95ebdcf56cc973582e37f732ed2.asciidoc b/docs/examples/guide/c97fd95ebdcf56cc973582e37f732ed2.asciidoc deleted file mode 100644 index dc251af71c..0000000000 --- a/docs/examples/guide/c97fd95ebdcf56cc973582e37f732ed2.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.enrich.get_policy -puts response ----- diff --git a/docs/examples/guide/c9a6ab0a56bb0177f158277185f68302.asciidoc b/docs/examples/guide/c9a6ab0a56bb0177f158277185f68302.asciidoc deleted file mode 100644 index b740ab6108..0000000000 --- a/docs/examples/guide/c9a6ab0a56bb0177f158277185f68302.asciidoc +++ /dev/null @@ -1,57 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - metrics: { - type: 'object', - subobjects: false, - properties: { - time: { - type: 'long' - }, - 'time.min' => { - type: 'long' - }, - 'time.max' => { - type: 'long' - } - } - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'metric_1', - body: { - 'metrics.time' => 100, - 'metrics.time.min' => 10, - 'metrics.time.max' => 900 - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'metric_2', - body: { - metrics: { - time: 100, - 'time.min' => 10, - 'time.max' => 900 - } - } -) -puts response - -response = client.indices.get_mapping( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/c9afa715021f2e6450e72ac73271960c.asciidoc b/docs/examples/guide/c9afa715021f2e6450e72ac73271960c.asciidoc deleted file mode 100644 index 28bfc03130..0000000000 --- a/docs/examples/guide/c9afa715021f2e6450e72ac73271960c.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'parent_example', - id: 1, - body: { - join: { - name: 'question' - }, - body: 'I have Windows 2003 server and i bought a new Windows 2008 server...', - title: 'Whats the best way to file transfer my site from server to a newer one?', - tags: [ - 'windows-server-2003', - 'windows-server-2008', - 'file-transfer' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/c9b6cbe93c8bd23e3f658c3af4e70092.asciidoc b/docs/examples/guide/c9b6cbe93c8bd23e3f658c3af4e70092.asciidoc deleted file mode 100644 index b230115688..0000000000 --- a/docs/examples/guide/c9b6cbe93c8bd23e3f658c3af4e70092.asciidoc +++ /dev/null @@ -1,72 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - autocomplete: { - tokenizer: 'autocomplete', - filter: [ - 'lowercase' - ] - }, - autocomplete_search: { - tokenizer: 'lowercase' - } - }, - tokenizer: { - autocomplete: { - type: 'edge_ngram', - min_gram: 2, - max_gram: 10, - token_chars: [ - 'letter' - ] - } - } - } - }, - mappings: { - properties: { - title: { - type: 'text', - analyzer: 'autocomplete', - search_analyzer: 'autocomplete_search' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - title: 'Quick Foxes' - } -) -puts response - -response = client.indices.refresh( - index: 'my-index-000001' -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - title: { - query: 'Quick Fo', - operator: 'and' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c9c396b94bb88098477e2b08b55a12ee.asciidoc b/docs/examples/guide/c9c396b94bb88098477e2b08b55a12ee.asciidoc deleted file mode 100644 index a607687aba..0000000000 --- a/docs/examples/guide/c9c396b94bb88098477e2b08b55a12ee.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index', - body: { - mappings: { - dynamic_templates: [ - { - geo_point: { - mapping: { - type: 'geo_point' - } - } - } - ] - } - } -) -puts response - -response = client.bulk( - body: [ - { - index: { - _index: 'my_index', - _id: '1', - dynamic_templates: { - work_location: 'geo_point' - } - } - }, - { - field: 'value1', - work_location: '41.12,-71.34', - raw_location: '41.12,-71.34' - }, - { - create: { - _index: 'my_index', - _id: '2', - dynamic_templates: { - home_location: 'geo_point' - } - } - }, - { - field: 'value2', - home_location: '41.12,-71.34' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/c9ce07a7d3d8a317f08535bdd3aa69a3.asciidoc b/docs/examples/guide/c9ce07a7d3d8a317f08535bdd3aa69a3.asciidoc deleted file mode 100644 index 76a7261656..0000000000 --- a/docs/examples/guide/c9ce07a7d3d8a317f08535bdd3aa69a3.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'test', - id: 1, - body: { - script: { - source: "if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }", - lang: 'painless', - params: { - tag: 'green' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc b/docs/examples/guide/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc deleted file mode 100644 index 9ce4d41e18..0000000000 --- a/docs/examples/guide/c9d9a1d751f20f6197c825cb4378fe9f.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - terms: { - 'user.id' => [ - 'kimchy', - 'elkbee' - ], - boost: 1 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ca06db2aa4747910278f96315f7be94b.asciidoc b/docs/examples/guide/ca06db2aa4747910278f96315f7be94b.asciidoc deleted file mode 100644 index 2af4363f12..0000000000 --- a/docs/examples/guide/ca06db2aa4747910278f96315f7be94b.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_bounding_box: { - 'pin.location' => { - top: 40.73, - left: -74.1, - bottom: 40.01, - right: -71.12 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ca08e511e5907d258081b10a1a9f0072.asciidoc b/docs/examples/guide/ca08e511e5907d258081b10a1a9f0072.asciidoc deleted file mode 100644 index f03c7172ea..0000000000 --- a/docs/examples/guide/ca08e511e5907d258081b10a1a9f0072.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'new-data-stream-template', - body: { - index_patterns: [ - 'new-data-stream*' - ], - data_stream: {}, - priority: 500, - template: { - mappings: { - properties: { - "@timestamp": { - type: 'date_nanos' - } - } - }, - settings: { - 'sort.field' => [ - '@timestamp' - ], - 'sort.order' => [ - 'desc' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ca1cc4bcef22fdf9153833bfe6a55294.asciidoc b/docs/examples/guide/ca1cc4bcef22fdf9153833bfe6a55294.asciidoc deleted file mode 100644 index a8ba6ce0fa..0000000000 --- a/docs/examples/guide/ca1cc4bcef22fdf9153833bfe6a55294.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - refresh: true, - body: [ - { - index: { - _index: '.ds-my-data-stream-2099.03.08-000003', - _id: 'bfspvnIBr7VVZlfp2lqX', - if_seq_no: 0, - if_primary_term: 1 - } - }, - { - "@timestamp": '2099-03-08T11:06:07.000Z', - user: { - id: '8a4f500d' - }, - message: 'Login successful' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/ca3bcd6278510ebced5f74484033cb36.asciidoc b/docs/examples/guide/ca3bcd6278510ebced5f74484033cb36.asciidoc deleted file mode 100644 index e69bf3ac16..0000000000 --- a/docs/examples/guide/ca3bcd6278510ebced5f74484033cb36.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.get_script_languages -puts response ----- diff --git a/docs/examples/guide/caab99520d3fe41f6154d74a7f696057.asciidoc b/docs/examples/guide/caab99520d3fe41f6154d74a7f696057.asciidoc deleted file mode 100644 index 6180a61021..0000000000 --- a/docs/examples/guide/caab99520d3fe41f6154d74a7f696057.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/cafed0e2c2b1d1574eb4a5ecd514a97a.asciidoc b/docs/examples/guide/cafed0e2c2b1d1574eb4a5ecd514a97a.asciidoc deleted file mode 100644 index 0558bde6e6..0000000000 --- a/docs/examples/guide/cafed0e2c2b1d1574eb4a5ecd514a97a.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.split( - index: 'my-index-000001', - target: 'split-my-index-000001', - body: { - settings: { - 'index.number_of_shards' => 2 - } - } -) -puts response ----- diff --git a/docs/examples/guide/cb0c3223fd45148497df73adfba2e9ce.asciidoc b/docs/examples/guide/cb0c3223fd45148497df73adfba2e9ce.asciidoc deleted file mode 100644 index 93e5d03d8b..0000000000 --- a/docs/examples/guide/cb0c3223fd45148497df73adfba2e9ce.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'my-index-000001', - query: { - term: { - 'user.id' => 'kimchy' - } - } - }, - dest: { - index: 'my-new-index-000001' - } - } -) -puts response ----- diff --git a/docs/examples/guide/cb1d2a787bbe88974cfc5f132556a51c.asciidoc b/docs/examples/guide/cb1d2a787bbe88974cfc5f132556a51c.asciidoc deleted file mode 100644 index b47a4e3690..0000000000 --- a/docs/examples/guide/cb1d2a787bbe88974cfc5f132556a51c.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete_data_stream( - name: '*', - expand_wildcards: 'all' -) -puts response ----- diff --git a/docs/examples/guide/cb2f70601cb004b9ece9b0b43a9dc21a.asciidoc b/docs/examples/guide/cb2f70601cb004b9ece9b0b43a9dc21a.asciidoc deleted file mode 100644 index e4eec05f49..0000000000 --- a/docs/examples/guide/cb2f70601cb004b9ece9b0b43a9dc21a.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.clear_cache( - index: 'my-index-000001,my-index-000002', - request: true -) -puts response ----- diff --git a/docs/examples/guide/cb3c483816b6ea150ff6c559fa144d32.asciidoc b/docs/examples/guide/cb3c483816b6ea150ff6c559fa144d32.asciidoc deleted file mode 100644 index 5169609219..0000000000 --- a/docs/examples/guide/cb3c483816b6ea150ff6c559fa144d32.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'timeseries_policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_primary_shard_size: '50GB', - max_age: '30d' - } - } - }, - delete: { - min_age: '90d', - actions: { - delete: {} - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cb4388b72d41c431ec9ca8255b2f65fb.asciidoc b/docs/examples/guide/cb4388b72d41c431ec9ca8255b2f65fb.asciidoc deleted file mode 100644 index eecce789bf..0000000000 --- a/docs/examples/guide/cb4388b72d41c431ec9ca8255b2f65fb.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'example', - body: { - mappings: { - properties: { - geometry: { - type: 'shape' - } - } - } - } -) -puts response - -response = client.index( - index: 'example', - id: 1, - refresh: 'wait_for', - body: { - name: 'Lucky Landing', - geometry: { - type: 'point', - coordinates: [ - 1355.400544, - 5255.530286 - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/cb71332115c92cfb89375abd30b8bbbb.asciidoc b/docs/examples/guide/cb71332115c92cfb89375abd30b8bbbb.asciidoc deleted file mode 100644 index 38ed6fed23..0000000000 --- a/docs/examples/guide/cb71332115c92cfb89375abd30b8bbbb.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.master( - v: true -) -puts response ----- diff --git a/docs/examples/guide/cb71c6ecfb8b19725c374572444e5d32.asciidoc b/docs/examples/guide/cb71c6ecfb8b19725c374572444e5d32.asciidoc deleted file mode 100644 index c9e6cf1d83..0000000000 --- a/docs/examples/guide/cb71c6ecfb8b19725c374572444e5d32.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - aggregations: { - avg_start: { - avg: { - field: 'measures.start' - } - }, - avg_end: { - avg: { - field: 'measures.end' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cba3462a307e2483c14e3e198f6960e3.asciidoc b/docs/examples/guide/cba3462a307e2483c14e3e198f6960e3.asciidoc deleted file mode 100644 index e946fdda1a..0000000000 --- a/docs/examples/guide/cba3462a307e2483c14e3e198f6960e3.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - _meta: { - description: 'used for nginx log', - project: { - name: 'myProject', - department: 'myDepartment' - } - }, - phases: { - warm: { - min_age: '10d', - actions: { - forcemerge: { - max_num_segments: 1 - } - } - }, - delete: { - min_age: '30d', - actions: { - delete: {} - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cbc2b5595890f87165aab1a741b1d22c.asciidoc b/docs/examples/guide/cbc2b5595890f87165aab1a741b1d22c.asciidoc deleted file mode 100644 index e318873277..0000000000 --- a/docs/examples/guide/cbc2b5595890f87165aab1a741b1d22c.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-timestamp-pipeline', - body: { - description: 'Shifts the @timestamp to the last 15 minutes', - processors: [ - { - set: { - field: 'ingest_time', - value: '{{_ingest.timestamp}}' - } - }, - { - script: { - lang: 'painless', - source: "\n def delta = ChronoUnit.SECONDS.between(\n ZonedDateTime.parse(\"2022-06-21T15:49:00Z\"),\n ZonedDateTime.parse(ctx[\"ingest_time\"])\n );\n ctx[\"@timestamp\"] = ZonedDateTime.parse(ctx[\"@timestamp\"]).plus(delta,ChronoUnit.SECONDS).toString();\n " - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/cbc98ea2274da69585b654f844b5a68f.asciidoc b/docs/examples/guide/cbc98ea2274da69585b654f844b5a68f.asciidoc deleted file mode 100644 index 68027a57a1..0000000000 --- a/docs/examples/guide/cbc98ea2274da69585b654f844b5a68f.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - my_dense_vector: { - type: 'dense_vector', - dims: 3 - }, - status: { - type: 'keyword' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - my_dense_vector: [ - 0.5, - 10, - 6 - ], - status: 'published' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - my_dense_vector: [ - -0.5, - 10, - 10 - ], - status: 'published' - } -) -puts response - -response = client.indices.refresh( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/cbfd6f23f8283e64ec3157c65bb722c4.asciidoc b/docs/examples/guide/cbfd6f23f8283e64ec3157c65bb722c4.asciidoc deleted file mode 100644 index 2082fb6592..0000000000 --- a/docs/examples/guide/cbfd6f23f8283e64ec3157c65bb722c4.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.templates( - v: true, - s: 'order:desc,index_patterns' -) -puts response ----- diff --git a/docs/examples/guide/cc0cca5556ec6224c7134c233734beed.asciidoc b/docs/examples/guide/cc0cca5556ec6224c7134c233734beed.asciidoc deleted file mode 100644 index 33a5b9049d..0000000000 --- a/docs/examples/guide/cc0cca5556ec6224c7134c233734beed.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.cluster.remote_info -puts response ----- diff --git a/docs/examples/guide/cc28a3dafcd5056f2a3ec07f6fda5091.asciidoc b/docs/examples/guide/cc28a3dafcd5056f2a3ec07f6fda5091.asciidoc deleted file mode 100644 index 430772d14d..0000000000 --- a/docs/examples/guide/cc28a3dafcd5056f2a3ec07f6fda5091.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - runtime_mappings: { - day_of_week: { - type: 'keyword', - script: { - source: "emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT))" - } - } - }, - aggregations: { - day_of_week: { - terms: { - field: 'day_of_week' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cc7f1c74ede6810e2c9db19256d6b653.asciidoc b/docs/examples/guide/cc7f1c74ede6810e2c9db19256d6b653.asciidoc deleted file mode 100644 index f34d61a238..0000000000 --- a/docs/examples/guide/cc7f1c74ede6810e2c9db19256d6b653.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index', - body: { - query: { - match: { - 'http.response' => '304' - } - }, - fields: [ - 'http.response' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/cc90639f2e65bd89cb73296cac6135cf.asciidoc b/docs/examples/guide/cc90639f2e65bd89cb73296cac6135cf.asciidoc deleted file mode 100644 index b175ed1761..0000000000 --- a/docs/examples/guide/cc90639f2e65bd89cb73296cac6135cf.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_trained_model( - model_id: 'regression-job-one-1574775307356' -) -puts response ----- diff --git a/docs/examples/guide/cc9dac8db7a1482e2fbe3235197c3de1.asciidoc b/docs/examples/guide/cc9dac8db7a1482e2fbe3235197c3de1.asciidoc deleted file mode 100644 index 39a408258a..0000000000 --- a/docs/examples/guide/cc9dac8db7a1482e2fbe3235197c3de1.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.restore( - repository: 'my_repository', - snapshot: 'snapshot_2', - wait_for_completion: true, - body: { - indices: 'index_1,index_2', - ignore_unavailable: true, - include_global_state: false, - rename_pattern: 'index_(.+)', - rename_replacement: 'restored_index_$1', - include_aliases: false - } -) -puts response ----- diff --git a/docs/examples/guide/ccc8ade54da0f1c0b204bf8e6de4bbc1.asciidoc b/docs/examples/guide/ccc8ade54da0f1c0b204bf8e6de4bbc1.asciidoc deleted file mode 100644 index f9396fd491..0000000000 --- a/docs/examples/guide/ccc8ade54da0f1c0b204bf8e6de4bbc1.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test_index', - body: { - settings: { - index: { - analysis: { - analyzer: { - synonym: { - tokenizer: 'standard', - filter: [ - 'my_stop', - 'synonym_graph' - ] - } - }, - filter: { - my_stop: { - type: 'stop', - stopwords: [ - 'bar' - ] - }, - synonym_graph: { - type: 'synonym_graph', - lenient: true, - synonyms: [ - 'foo, bar => baz' - ] - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ccec66fb20d5ede6c691e0890cfe402a.asciidoc b/docs/examples/guide/ccec66fb20d5ede6c691e0890cfe402a.asciidoc deleted file mode 100644 index 8953381097..0000000000 --- a/docs/examples/guide/ccec66fb20d5ede6c691e0890cfe402a.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_job( - job_id: 'total-requests', - wait_for_completion: false -) -puts response ----- diff --git a/docs/examples/guide/ccf84c1e5e5602a9e841cb8f7e3bb29f.asciidoc b/docs/examples/guide/ccf84c1e5e5602a9e841cb8f7e3bb29f.asciidoc deleted file mode 100644 index 23114ee933..0000000000 --- a/docs/examples/guide/ccf84c1e5e5602a9e841cb8f7e3bb29f.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'standard_example', - body: { - settings: { - analysis: { - analyzer: { - rebuilt_standard: { - tokenizer: 'standard', - filter: [ - 'lowercase' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cd16538654e0f834ff19fe6cf329c398.asciidoc b/docs/examples/guide/cd16538654e0f834ff19fe6cf329c398.asciidoc deleted file mode 100644 index c385c2be7d..0000000000 --- a/docs/examples/guide/cd16538654e0f834ff19fe6cf329c398.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'hugging-face-embeddings', - body: { - mappings: { - properties: { - content_embedding: { - type: 'dense_vector', - dims: 768, - element_type: 'float' - }, - content: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cd373a6eb1ef4748616500b26fab3006.asciidoc b/docs/examples/guide/cd373a6eb1ef4748616500b26fab3006.asciidoc deleted file mode 100644 index 90e79ce487..0000000000 --- a/docs/examples/guide/cd373a6eb1ef4748616500b26fab3006.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.async_search.submit( - index: 'sales*', - size: 0, - body: { - sort: [ - { - date: { - order: 'asc' - } - } - ], - aggregations: { - sale_date: { - date_histogram: { - field: 'date', - calendar_interval: '1d' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cd67ad2c09fafef2d441c3502d0bb3d7.asciidoc b/docs/examples/guide/cd67ad2c09fafef2d441c3502d0bb3d7.asciidoc deleted file mode 100644 index 6114235922..0000000000 --- a/docs/examples/guide/cd67ad2c09fafef2d441c3502d0bb3d7.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_data_lifecycle( - name: 'my-data-stream', - body: { - data_retention: '7d' - } -) -puts response ----- diff --git a/docs/examples/guide/cd6fa7f63c93bb04824acd3a7d1f8de3.asciidoc b/docs/examples/guide/cd6fa7f63c93bb04824acd3a7d1f8de3.asciidoc deleted file mode 100644 index 29052c9cfa..0000000000 --- a/docs/examples/guide/cd6fa7f63c93bb04824acd3a7d1f8de3.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - span_not: { - include: { - span_term: { - "field1": 'hoya' - } - }, - exclude: { - span_near: { - clauses: [ - { - span_term: { - "field1": 'la' - } - }, - { - span_term: { - "field1": 'hoya' - } - } - ], - slop: 0, - in_order: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cd7da0c3769682f546cc1888e569382e.asciidoc b/docs/examples/guide/cd7da0c3769682f546cc1888e569382e.asciidoc deleted file mode 100644 index b68049c974..0000000000 --- a/docs/examples/guide/cd7da0c3769682f546cc1888e569382e.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - match_phrase: { - message: 'number 1' - } - }, - highlight: { - fields: { - message: { - type: 'plain', - fragment_size: 15, - number_of_fragments: 3, - fragmenter: 'span' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cd93919e13f656ad2e6629f45c579b93.asciidoc b/docs/examples/guide/cd93919e13f656ad2e6629f45c579b93.asciidoc deleted file mode 100644 index 022df9f9a3..0000000000 --- a/docs/examples/guide/cd93919e13f656ad2e6629f45c579b93.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.shard_stores( - index: 'test' -) -puts response ----- diff --git a/docs/examples/guide/cda045dfd79acd160ed8668f2ee17ea7.asciidoc b/docs/examples/guide/cda045dfd79acd160ed8668f2ee17ea7.asciidoc deleted file mode 100644 index 819af0281d..0000000000 --- a/docs/examples/guide/cda045dfd79acd160ed8668f2ee17ea7.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - pretty: true, - body: { - query: { - match: { - full_text: 'Quick Brown Foxes!' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cdb68b3f565df7c85e52a55864b37d40.asciidoc b/docs/examples/guide/cdb68b3f565df7c85e52a55864b37d40.asciidoc deleted file mode 100644 index 5e59c49813..0000000000 --- a/docs/examples/guide/cdb68b3f565df7c85e52a55864b37d40.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-new-index-000001', - body: { - mappings: { - properties: { - user_id: { - type: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cdc04e6d3d37f036c7045ee4a582ef06.asciidoc b/docs/examples/guide/cdc04e6d3d37f036c7045ee4a582ef06.asciidoc deleted file mode 100644 index be7c0b98fc..0000000000 --- a/docs/examples/guide/cdc04e6d3d37f036c7045ee4a582ef06.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_templates: [ - { - strings_as_keywords: { - match_mapping_type: 'string', - mapping: { - type: 'text', - norms: false, - fields: { - keyword: { - type: 'keyword', - ignore_above: 256 - } - } - } - } - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc b/docs/examples/guide/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc deleted file mode 100644 index 6e9f003a13..0000000000 --- a/docs/examples/guide/cdce7bc083dfb36e6f1d465a5c9d5049.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.connector.sync_job_list -puts response ----- diff --git a/docs/examples/guide/cdd29b01e730b3996de68a2788050021.asciidoc b/docs/examples/guide/cdd29b01e730b3996de68a2788050021.asciidoc deleted file mode 100644 index f5c15ee93b..0000000000 --- a/docs/examples/guide/cdd29b01e730b3996de68a2788050021.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.enrich.delete_policy( - name: 'my-policy' -) -puts response ----- diff --git a/docs/examples/guide/cdd7127681254f4d614cc075f9e6fbcf.asciidoc b/docs/examples/guide/cdd7127681254f4d614cc075f9e6fbcf.asciidoc deleted file mode 100644 index bda041005b..0000000000 --- a/docs/examples/guide/cdd7127681254f4d614cc075f9e6fbcf.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.delete_by_query( - index: 'my-index-000001', - body: { - query: { - term: { - 'user.id' => 'kimchy' - } - }, - max_docs: 1 - } -) -puts response ----- diff --git a/docs/examples/guide/cde19d110a58317610033ea3dcb0eb80.asciidoc b/docs/examples/guide/cde19d110a58317610033ea3dcb0eb80.asciidoc deleted file mode 100644 index 876bde8b82..0000000000 --- a/docs/examples/guide/cde19d110a58317610033ea3dcb0eb80.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: "\n {\n \"query\": {\n \"match\": {\n {{#query_message}}\n {{#query_string}}\n \"message\": \"Hello {{#first_name_section}}{{first_name}}{{/first_name_section}} {{#last_name_section}}{{last_name}}{{/last_name_section}}\"\n {{/query_string}}\n {{/query_message}}\n }\n }\n }\n ", - params: { - query_message: { - query_string: { - first_name_section: { - first_name: 'John' - }, - last_name_section: { - last_name: 'kimchy' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cde4104a29dfe942d55863cdd8718627.asciidoc b/docs/examples/guide/cde4104a29dfe942d55863cdd8718627.asciidoc deleted file mode 100644 index 263196cbd5..0000000000 --- a/docs/examples/guide/cde4104a29dfe942d55863cdd8718627.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.slm.get_status -puts response ----- diff --git a/docs/examples/guide/cdf400299acd1c7b1b7bb42e284e3d08.asciidoc b/docs/examples/guide/cdf400299acd1c7b1b7bb42e284e3d08.asciidoc deleted file mode 100644 index 3311db3deb..0000000000 --- a/docs/examples/guide/cdf400299acd1c7b1b7bb42e284e3d08.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'test', - id: 1, - body: { - script: { - source: 'ctx._source.tags.add(params.tag)', - lang: 'painless', - params: { - tag: 'blue' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc b/docs/examples/guide/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc deleted file mode 100644 index 0d75f56638..0000000000 --- a/docs/examples/guide/cdfd4fef983c1c0fe8d7417f67d01eae.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - body: { - 'index.number_of_replicas' => 1 - } -) -puts response ----- diff --git a/docs/examples/guide/ce0a1aba713b0448b0c6a504af7b3a08.asciidoc b/docs/examples/guide/ce0a1aba713b0448b0c6a504af7b3a08.asciidoc deleted file mode 100644 index 34bb4d0e40..0000000000 --- a/docs/examples/guide/ce0a1aba713b0448b0c6a504af7b3a08.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.slm.get_stats -puts response ----- diff --git a/docs/examples/guide/ce0c3d7330727f7673cf68fc9a1cfb86.asciidoc b/docs/examples/guide/ce0c3d7330727f7673cf68fc9a1cfb86.asciidoc deleted file mode 100644 index c0e7cf45d2..0000000000 --- a/docs/examples/guide/ce0c3d7330727f7673cf68fc9a1cfb86.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.clear_cache( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/ce13afc0c976c5e1f424b58e0c97fd64.asciidoc b/docs/examples/guide/ce13afc0c976c5e1f424b58e0c97fd64.asciidoc deleted file mode 100644 index 82556abd34..0000000000 --- a/docs/examples/guide/ce13afc0c976c5e1f424b58e0c97fd64.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.connector.put( - connector_id: 'my-connector', - body: { - index_name: 'search-google-drive', - name: 'My Connector', - description: 'My Connector to sync data to Elastic index from Google Drive', - service_type: 'google_drive', - language: 'english' - } -) -puts response ----- diff --git a/docs/examples/guide/ce247fc08371e1b30cb52195e521c076.asciidoc b/docs/examples/guide/ce247fc08371e1b30cb52195e521c076.asciidoc deleted file mode 100644 index c17bca3e37..0000000000 --- a/docs/examples/guide/ce247fc08371e1b30cb52195e521c076.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_bounding_box: { - 'pin.location' => { - top_left: [ - -74.1, - 40.73 - ], - bottom_right: [ - -71.12, - 40.01 - ] - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ce725697f93b3eebb3a266314568565a.asciidoc b/docs/examples/guide/ce725697f93b3eebb3a266314568565a.asciidoc deleted file mode 100644 index 4664e309a9..0000000000 --- a/docs/examples/guide/ce725697f93b3eebb3a266314568565a.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'fingerprint_example', - body: { - settings: { - analysis: { - analyzer: { - rebuilt_fingerprint: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'asciifolding', - 'fingerprint' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ce899fcf55da72fc32e623d1ad88b301.asciidoc b/docs/examples/guide/ce899fcf55da72fc32e623d1ad88b301.asciidoc deleted file mode 100644 index ec7f7a3277..0000000000 --- a/docs/examples/guide/ce899fcf55da72fc32e623d1ad88b301.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'logs-foo_component2', - body: { - template: { - mappings: { - properties: { - 'host.ip' => { - type: 'ip' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cee491dd0a8d10ed0cb11a2faa0c99f0.asciidoc b/docs/examples/guide/cee491dd0a8d10ed0cb11a2faa0c99f0.asciidoc deleted file mode 100644 index 8e38c6a5bc..0000000000 --- a/docs/examples/guide/cee491dd0a8d10ed0cb11a2faa0c99f0.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.ml.infer_trained_model( - model_id: 'model2', - body: { - docs: [ - { - text_field: 'The Amazon rainforest covers most of the Amazon basin in South America' - } - ], - inference_config: { - ner: { - tokenization: { - bert: { - truncate: 'first' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cf23f18761df33f08bc6f6d1875496fd.asciidoc b/docs/examples/guide/cf23f18761df33f08bc6f6d1875496fd.asciidoc deleted file mode 100644 index b9b4ca57f2..0000000000 --- a/docs/examples/guide/cf23f18761df33f08bc6f6d1875496fd.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - index: { - 'routing.allocation.total_shards_per_node' => 5 - } - } -) -puts response ----- diff --git a/docs/examples/guide/cf47cd4a39cd62a3ecad919e54a67bca.asciidoc b/docs/examples/guide/cf47cd4a39cd62a3ecad919e54a67bca.asciidoc deleted file mode 100644 index 34cb79282b..0000000000 --- a/docs/examples/guide/cf47cd4a39cd62a3ecad919e54a67bca.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - term: { - _ignored: '@timestamp' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cf5dab4334783ca9b8942eab68fb7174.asciidoc b/docs/examples/guide/cf5dab4334783ca9b8942eab68fb7174.asciidoc deleted file mode 100644 index 32d9fb404e..0000000000 --- a/docs/examples/guide/cf5dab4334783ca9b8942eab68fb7174.asciidoc +++ /dev/null @@ -1,44 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'products', - size: 0, - body: { - query: { - match: { - name: 'led tv' - } - }, - aggregations: { - resellers: { - nested: { - path: 'resellers' - }, - aggregations: { - filter_reseller: { - filter: { - bool: { - filter: [ - { - term: { - 'resellers.reseller' => 'companyB' - } - } - ] - } - }, - aggregations: { - min_price: { - min: { - field: 'resellers.price' - } - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/cfd4b34f35e531a20739a3b308d57134.asciidoc b/docs/examples/guide/cfd4b34f35e531a20739a3b308d57134.asciidoc deleted file mode 100644 index 0999128f47..0000000000 --- a/docs/examples/guide/cfd4b34f35e531a20739a3b308d57134.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_docs: 100_000_000 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d003ee256d24aa6000bd9dbf1d608dc5.asciidoc b/docs/examples/guide/d003ee256d24aa6000bd9dbf1d608dc5.asciidoc deleted file mode 100644 index 6b7d70b4fb..0000000000 --- a/docs/examples/guide/d003ee256d24aa6000bd9dbf1d608dc5.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'elser-v2-test', - body: { - processors: [ - { - inference: { - model_id: '.elser_model_2', - input_output: [ - { - input_field: 'content', - output_field: 'content_embedding' - } - ] - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/d003f9110e5a474230abe11f36da9297.asciidoc b/docs/examples/guide/d003f9110e5a474230abe11f36da9297.asciidoc deleted file mode 100644 index a8e7d65517..0000000000 --- a/docs/examples/guide/d003f9110e5a474230abe11f36da9297.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - description: 'Hide my IP', - processors: [ - { - redact: { - field: 'message', - patterns: [ - '%{IP:client}' - ] - } - } - ] - }, - docs: [ - { - _source: { - message: '55.3.244.1 GET /index.html 15824 0.043' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc b/docs/examples/guide/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc deleted file mode 100644 index dcf1e2b74b..0000000000 --- a/docs/examples/guide/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_settings( - flat_settings: true, - filter_path: 'transient' -) -puts response ----- diff --git a/docs/examples/guide/d01d309b0257d6fbca6d0941adeb3256.asciidoc b/docs/examples/guide/d01d309b0257d6fbca6d0941adeb3256.asciidoc deleted file mode 100644 index cc7e5bed9b..0000000000 --- a/docs/examples/guide/d01d309b0257d6fbca6d0941adeb3256.asciidoc +++ /dev/null @@ -1,48 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'ct1', - body: { - template: { - settings: { - 'index.number_of_shards' => 2 - } - } - } -) -puts response - -response = client.cluster.put_component_template( - name: 'ct2', - body: { - template: { - settings: { - 'index.number_of_replicas' => 0 - }, - mappings: { - properties: { - "@timestamp": { - type: 'date' - } - } - } - } - } -) -puts response - -response = client.indices.put_index_template( - name: 'final-template', - body: { - index_patterns: [ - 'my-index-*' - ], - composed_of: [ - 'ct1', - 'ct2' - ], - priority: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/d03139a851888db53f8b7affd85eb495.asciidoc b/docs/examples/guide/d03139a851888db53f8b7affd85eb495.asciidoc deleted file mode 100644 index b2689578e1..0000000000 --- a/docs/examples/guide/d03139a851888db53f8b7affd85eb495.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.check_in( - connector_id: 'my-connector' -) -puts response ----- diff --git a/docs/examples/guide/d0378fe5e3aad05a2fd2e6e81213374f.asciidoc b/docs/examples/guide/d0378fe5e3aad05a2fd2e6e81213374f.asciidoc deleted file mode 100644 index 7b4fb895c3..0000000000 --- a/docs/examples/guide/d0378fe5e3aad05a2fd2e6e81213374f.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'bulgarian_example', - body: { - settings: { - analysis: { - filter: { - bulgarian_stop: { - type: 'stop', - stopwords: '_bulgarian_' - }, - bulgarian_keywords: { - type: 'keyword_marker', - keywords: [ - 'пример' - ] - }, - bulgarian_stemmer: { - type: 'stemmer', - language: 'bulgarian' - } - }, - analyzer: { - rebuilt_bulgarian: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'bulgarian_stop', - 'bulgarian_keywords', - 'bulgarian_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d03b0e2f0f3f5ac8d53287c445007a89.asciidoc b/docs/examples/guide/d03b0e2f0f3f5ac8d53287c445007a89.asciidoc deleted file mode 100644 index 0e30f0abe0..0000000000 --- a/docs/examples/guide/d03b0e2f0f3f5ac8d53287c445007a89.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - default_field: { - type: 'text' - }, - boolean_sim_field: { - type: 'text', - similarity: 'boolean' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc b/docs/examples/guide/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc deleted file mode 100644 index ba6b1c7ee4..0000000000 --- a/docs/examples/guide/d04f0c8c44e8b4fb55f2e7d9d05977e7.asciidoc +++ /dev/null @@ -1,63 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - body: [ - { - index: { - _index: 'books' - } - }, - { - name: 'Revelation Space', - author: 'Alastair Reynolds', - release_date: '2000-03-15', - page_count: 585 - }, - { - index: { - _index: 'books' - } - }, - { - name: '1984', - author: 'George Orwell', - release_date: '1985-06-01', - page_count: 328 - }, - { - index: { - _index: 'books' - } - }, - { - name: 'Fahrenheit 451', - author: 'Ray Bradbury', - release_date: '1953-10-15', - page_count: 227 - }, - { - index: { - _index: 'books' - } - }, - { - name: 'Brave New World', - author: 'Aldous Huxley', - release_date: '1932-06-01', - page_count: 268 - }, - { - index: { - _index: 'books' - } - }, - { - name: 'The Handmaids Tale', - author: 'Margaret Atwood', - release_date: '1985-06-01', - page_count: 311 - } - ] -) -puts response ----- diff --git a/docs/examples/guide/d050c6fa7d806457a5f32d30b07e9521.asciidoc b/docs/examples/guide/d050c6fa7d806457a5f32d30b07e9521.asciidoc deleted file mode 100644 index 39bd80682d..0000000000 --- a/docs/examples/guide/d050c6fa7d806457a5f32d30b07e9521.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - processors: [ - { - dot_expander: { - description: "Expand 'my-object-field.my-property'", - field: 'my-object-field.my-property' - } - }, - { - set: { - description: "Set 'my-object-field.my-property' to 10", - field: 'my-object-field.my-property', - value: 10 - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/d0546f047359b85a7e98207dc8de896a.asciidoc b/docs/examples/guide/d0546f047359b85a7e98207dc8de896a.asciidoc deleted file mode 100644 index 9ff4eb92b0..0000000000 --- a/docs/examples/guide/d0546f047359b85a7e98207dc8de896a.asciidoc +++ /dev/null @@ -1,41 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - 'index.mapping.coerce' => false - }, - mappings: { - properties: { - number_one: { - type: 'integer', - coerce: true - }, - number_two: { - type: 'integer' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - number_one: '10' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - number_two: '10' - } -) -puts response ----- diff --git a/docs/examples/guide/d05b2a37106fce0ebbd41e2fd6bd26c2.asciidoc b/docs/examples/guide/d05b2a37106fce0ebbd41e2fd6bd26c2.asciidoc deleted file mode 100644 index 87b32cf62b..0000000000 --- a/docs/examples/guide/d05b2a37106fce0ebbd41e2fd6bd26c2.asciidoc +++ /dev/null @@ -1,84 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'metrics_index', - body: { - mappings: { - properties: { - latency_histo: { - type: 'histogram' - } - } - } - } -) -puts response - -response = client.index( - index: 'metrics_index', - id: 1, - refresh: true, - body: { - 'network.name' => 'net-1', - latency_histo: { - values: [ - 0.1, - 0.2, - 0.3, - 0.4, - 0.5 - ], - counts: [ - 3, - 7, - 23, - 12, - 6 - ] - } - } -) -puts response - -response = client.index( - index: 'metrics_index', - id: 2, - refresh: true, - body: { - 'network.name' => 'net-2', - latency_histo: { - values: [ - 0.1, - 0.2, - 0.3, - 0.4, - 0.5 - ], - counts: [ - 8, - 17, - 8, - 7, - 6 - ] - } - } -) -puts response - -response = client.search( - index: 'metrics_index', - size: 0, - filter_path: 'aggregations', - body: { - aggregations: { - min_latency: { - min: { - field: 'latency_histo' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d06a649bc38aa9a6433b64efa78d8cb5.asciidoc b/docs/examples/guide/d06a649bc38aa9a6433b64efa78d8cb5.asciidoc deleted file mode 100644 index 9164bc00cd..0000000000 --- a/docs/examples/guide/d06a649bc38aa9a6433b64efa78d8cb5.asciidoc +++ /dev/null @@ -1,59 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-index', - refresh: true, - body: [ - { - index: {} - }, - { - timestamp: '2020-04-30T14:30:17-05:00', - message: '40.135.0.0 - - [30/Apr/2020:14:30:17 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:30:53-05:00', - message: '232.0.0.0 - - [30/Apr/2020:14:30:53 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:12-05:00', - message: '26.1.0.0 - - [30/Apr/2020:14:31:12 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:19-05:00', - message: '247.37.0.0 - - [30/Apr/2020:14:31:19 -0500] "GET /french/splash_inet.html HTTP/1.0" 200 3781' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:22-05:00', - message: '247.37.0.0 - - [30/Apr/2020:14:31:22 -0500] "GET /images/hm_nbg.jpg HTTP/1.0" 304 0' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:27-05:00', - message: '252.0.0.0 - - [30/Apr/2020:14:31:27 -0500] "GET /images/hm_bg.jpg HTTP/1.0" 200 24736' - }, - { - index: {} - }, - { - timestamp: '2020-04-30T14:31:28-05:00', - message: 'not a valid apache log' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/d095b422d9803c02b62c01adffc85376.asciidoc b/docs/examples/guide/d095b422d9803c02b62c01adffc85376.asciidoc deleted file mode 100644 index e45819de7c..0000000000 --- a/docs/examples/guide/d095b422d9803c02b62c01adffc85376.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.rollup.get_jobs( - id: 'sensor' -) -puts response ----- diff --git a/docs/examples/guide/d0dee031197214b59ff9ac7540527d2c.asciidoc b/docs/examples/guide/d0dee031197214b59ff9ac7540527d2c.asciidoc deleted file mode 100644 index ec2f1ef3ae..0000000000 --- a/docs/examples/guide/d0dee031197214b59ff9ac7540527d2c.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'date', - calendar_interval: '1M' - }, - aggregations: { - the_sum: { - sum: { - field: 'price' - } - }, - the_movfn: { - moving_fn: { - buckets_path: 'the_sum', - window: 10, - script: 'MovingFunctions.unweightedAvg(values)' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d0fad375f6e074e9067ed93d3faa07bd.asciidoc b/docs/examples/guide/d0fad375f6e074e9067ed93d3faa07bd.asciidoc deleted file mode 100644 index 6cd71de701..0000000000 --- a/docs/examples/guide/d0fad375f6e074e9067ed93d3faa07bd.asciidoc +++ /dev/null @@ -1,104 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'museums', - body: { - mappings: { - properties: { - location: { - type: 'point' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'museums', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - location: 'POINT (491.2350 5237.4081)', - city: 'Amsterdam', - name: 'NEMO Science Museum' - }, - { - index: { - _id: 2 - } - }, - { - location: 'POINT (490.1618 5236.9219)', - city: 'Amsterdam', - name: 'Museum Het Rembrandthuis' - }, - { - index: { - _id: 3 - } - }, - { - location: 'POINT (491.4722 5237.1667)', - city: 'Amsterdam', - name: 'Nederlands Scheepvaartmuseum' - }, - { - index: { - _id: 4 - } - }, - { - location: 'POINT (440.5200 5122.2900)', - city: 'Antwerp', - name: 'Letterenhuis' - }, - { - index: { - _id: 5 - } - }, - { - location: 'POINT (233.6389 4886.1111)', - city: 'Paris', - name: 'Musée du Louvre' - }, - { - index: { - _id: 6 - } - }, - { - location: 'POINT (232.7000 4886.0000)', - city: 'Paris', - name: "Musée d'Orsay" - } - ] -) -puts response - -response = client.search( - index: 'museums', - size: 0, - body: { - query: { - match: { - name: 'musée' - } - }, - aggregations: { - viewport: { - cartesian_bounds: { - field: 'location' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d0fde00ef381e61b8a9e99f18cb5970a.asciidoc b/docs/examples/guide/d0fde00ef381e61b8a9e99f18cb5970a.asciidoc deleted file mode 100644 index 6e4ca5ed97..0000000000 --- a/docs/examples/guide/d0fde00ef381e61b8a9e99f18cb5970a.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - simple_query_string: { - query: 'foo | bar + baz*', - flags: 'OR|AND|PREFIX' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d11ea753a5d86f7e630fd69a069948b1.asciidoc b/docs/examples/guide/d11ea753a5d86f7e630fd69a069948b1.asciidoc deleted file mode 100644 index 093ce4d240..0000000000 --- a/docs/examples/guide/d11ea753a5d86f7e630fd69a069948b1.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'json', - body: { - query: 'SELECT * FROM library ORDER BY page_count DESC', - fetch_size: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/d12df43ffcdcd937bae9b26fb475e239.asciidoc b/docs/examples/guide/d12df43ffcdcd937bae9b26fb475e239.asciidoc deleted file mode 100644 index a82eeaa5b6..0000000000 --- a/docs/examples/guide/d12df43ffcdcd937bae9b26fb475e239.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'uax_url_email', - text: 'Email me at john.smith@global-international.com' - } -) -puts response ----- diff --git a/docs/examples/guide/d133b5d82238f7d4778c341cbe0bc969.asciidoc b/docs/examples/guide/d133b5d82238f7d4778c341cbe0bc969.asciidoc deleted file mode 100644 index 5cb0f8c747..0000000000 --- a/docs/examples/guide/d133b5d82238f7d4778c341cbe0bc969.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.mtermvectors( - body: { - docs: [ - { - _index: 'my-index-000001', - doc: { - message: 'test test test' - } - }, - { - _index: 'my-index-000001', - doc: { - message: 'Another test ...' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/d13c7cdfc976e0c7b70737cd6a7becb8.asciidoc b/docs/examples/guide/d13c7cdfc976e0c7b70737cd6a7becb8.asciidoc deleted file mode 100644 index 1e33001007..0000000000 --- a/docs/examples/guide/d13c7cdfc976e0c7b70737cd6a7becb8.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - runtime_mappings: { - 'price.adjusted' => { - type: 'double', - script: { - source: "emit(doc['price'].value * params.adjustment)", - params: { - adjustment: 0.9 - } - } - } - }, - aggregations: { - by_date: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - avg_price: { - rate: { - field: 'price.adjusted' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d14fe5838fc02224f4b5ade2626d6026.asciidoc b/docs/examples/guide/d14fe5838fc02224f4b5ade2626d6026.asciidoc deleted file mode 100644 index 2560f1c381..0000000000 --- a/docs/examples/guide/d14fe5838fc02224f4b5ade2626d6026.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ilm.explain_lifecycle( - index: 'my-index-000001', - human: true -) -puts response ----- diff --git a/docs/examples/guide/d1a285aa244ec461d68f13e7078a33c0.asciidoc b/docs/examples/guide/d1a285aa244ec461d68f13e7078a33c0.asciidoc deleted file mode 100644 index 507492cbaa..0000000000 --- a/docs/examples/guide/d1a285aa244ec461d68f13e7078a33c0.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'persian_example', - body: { - settings: { - analysis: { - char_filter: { - zero_width_spaces: { - type: 'mapping', - mappings: [ - '\\u200C=>\\u0020' - ] - } - }, - filter: { - persian_stop: { - type: 'stop', - stopwords: '_persian_' - } - }, - analyzer: { - rebuilt_persian: { - tokenizer: 'standard', - char_filter: [ - 'zero_width_spaces' - ], - filter: [ - 'lowercase', - 'decimal_digit', - 'arabic_normalization', - 'persian_normalization', - 'persian_stop' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d1b53bc9794e8609bd6f2245624bf977.asciidoc b/docs/examples/guide/d1b53bc9794e8609bd6f2245624bf977.asciidoc deleted file mode 100644 index 89513d818d..0000000000 --- a/docs/examples/guide/d1b53bc9794e8609bd6f2245624bf977.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.ml.estimate_model_memory( - body: { - analysis_config: { - bucket_span: '5m', - detectors: [ - { - function: 'sum', - field_name: 'bytes', - by_field_name: 'status', - partition_field_name: 'app' - } - ], - influencers: [ - 'source_ip', - 'dest_ip' - ] - }, - overall_cardinality: { - status: 10, - app: 50 - }, - max_bucket_cardinality: { - source_ip: 300, - dest_ip: 30 - } - } -) -puts response ----- diff --git a/docs/examples/guide/d1ecce3632ae338b5e329b0e5ff3bed7.asciidoc b/docs/examples/guide/d1ecce3632ae338b5e329b0e5ff3bed7.asciidoc deleted file mode 100644 index bcf4bfbad1..0000000000 --- a/docs/examples/guide/d1ecce3632ae338b5e329b0e5ff3bed7.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - my_join_field: { - type: 'join', - relations: { - question: 'answer' - }, - eager_global_ordinals: false - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d1fde25de1980b7e84fa878289fd0bcb.asciidoc b/docs/examples/guide/d1fde25de1980b7e84fa878289fd0bcb.asciidoc deleted file mode 100644 index 5896001ddf..0000000000 --- a/docs/examples/guide/d1fde25de1980b7e84fa878289fd0bcb.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - size: 0, - q: 'extra:test', - filter_path: 'hits.total' -) -puts response ----- diff --git a/docs/examples/guide/d260225cf97e068ead2a8a6bb5aefd90.asciidoc b/docs/examples/guide/d260225cf97e068ead2a8a6bb5aefd90.asciidoc deleted file mode 100644 index e02098c6af..0000000000 --- a/docs/examples/guide/d260225cf97e068ead2a8a6bb5aefd90.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'russian_example', - body: { - settings: { - analysis: { - filter: { - russian_stop: { - type: 'stop', - stopwords: '_russian_' - }, - russian_keywords: { - type: 'keyword_marker', - keywords: [ - 'пример' - ] - }, - russian_stemmer: { - type: 'stemmer', - language: 'russian' - } - }, - analyzer: { - rebuilt_russian: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'russian_stop', - 'russian_keywords', - 'russian_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d268aec16bb1eb909b634e856175094c.asciidoc b/docs/examples/guide/d268aec16bb1eb909b634e856175094c.asciidoc deleted file mode 100644 index f9cf86a6e8..0000000000 --- a/docs/examples/guide/d268aec16bb1eb909b634e856175094c.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_stop_analyzer: { - type: 'stop', - stopwords: [ - 'the', - 'over' - ] - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_stop_analyzer', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/d2f52c106685bd8eab47e11d644d7a70.asciidoc b/docs/examples/guide/d2f52c106685bd8eab47e11d644d7a70.asciidoc deleted file mode 100644 index 2b54da7f71..0000000000 --- a/docs/examples/guide/d2f52c106685bd8eab47e11d644d7a70.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - date: { - type: 'date' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - date: '2015-01-01' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - date: '2015-01-01T12:10:30Z' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 3, - body: { - date: 1_420_070_400_001 - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - sort: { - date: 'asc' - } - } -) -puts response ----- diff --git a/docs/examples/guide/d2f6040c058a9555dfa62bb42d896a8f.asciidoc b/docs/examples/guide/d2f6040c058a9555dfa62bb42d896a8f.asciidoc deleted file mode 100644 index 6e6bef893e..0000000000 --- a/docs/examples/guide/d2f6040c058a9555dfa62bb42d896a8f.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_queries1', - body: { - query: { - percolate: { - field: 'query', - document: { - my_field: 'abcd' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d2f6fb271e97fde8685d7744e6718cc7.asciidoc b/docs/examples/guide/d2f6fb271e97fde8685d7744e6718cc7.asciidoc deleted file mode 100644 index 914870f871..0000000000 --- a/docs/examples/guide/d2f6fb271e97fde8685d7744e6718cc7.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'text_payloads', - id: 1, - body: { - text: 'the|0 brown|3 fox|4 is|0 quick|10' - } -) -puts response ----- diff --git a/docs/examples/guide/d305110a8cabfbebd1e38d85559d1023.asciidoc b/docs/examples/guide/d305110a8cabfbebd1e38d85559d1023.asciidoc deleted file mode 100644 index 7dee2ea94e..0000000000 --- a/docs/examples/guide/d305110a8cabfbebd1e38d85559d1023.asciidoc +++ /dev/null @@ -1,66 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'cjk_example', - body: { - settings: { - analysis: { - filter: { - english_stop: { - type: 'stop', - stopwords: [ - 'a', - 'and', - 'are', - 'as', - 'at', - 'be', - 'but', - 'by', - 'for', - 'if', - 'in', - 'into', - 'is', - 'it', - 'no', - 'not', - 'of', - 'on', - 'or', - 's', - 'such', - 't', - 'that', - 'the', - 'their', - 'then', - 'there', - 'these', - 'they', - 'this', - 'to', - 'was', - 'will', - 'with', - 'www' - ] - } - }, - analyzer: { - rebuilt_cjk: { - tokenizer: 'standard', - filter: [ - 'cjk_width', - 'lowercase', - 'cjk_bigram', - 'english_stop' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d3263afc69b6f969b9bbd8738cd07b97.asciidoc b/docs/examples/guide/d3263afc69b6f969b9bbd8738cd07b97.asciidoc deleted file mode 100644 index b8e4ddbd7e..0000000000 --- a/docs/examples/guide/d3263afc69b6f969b9bbd8738cd07b97.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ccr.pause_follow( - index: 'follower_index' -) -puts response ----- diff --git a/docs/examples/guide/d34946f59b6f938b141a37cb0b729308.asciidoc b/docs/examples/guide/d34946f59b6f938b141a37cb0b729308.asciidoc deleted file mode 100644 index b7f1915385..0000000000 --- a/docs/examples/guide/d34946f59b6f938b141a37cb0b729308.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.enrich.put_policy( - name: 'postal_policy', - body: { - geo_match: { - indices: 'postal_codes', - match_field: 'location', - enrich_fields: [ - 'location', - 'postal_code' - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/d35a4d78a8b70c9e4d636efb0a92be9d.asciidoc b/docs/examples/guide/d35a4d78a8b70c9e4d636efb0a92be9d.asciidoc deleted file mode 100644 index e0ef47d5b5..0000000000 --- a/docs/examples/guide/d35a4d78a8b70c9e4d636efb0a92be9d.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'products', - body: { - aggregations: { - genres_and_products: { - multi_terms: { - terms: [ - { - field: 'genre' - }, - { - field: 'product' - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d37b065a94b3ff65a2a8a204fc3b097c.asciidoc b/docs/examples/guide/d37b065a94b3ff65a2a8a204fc3b097c.asciidoc deleted file mode 100644 index 79716b8df3..0000000000 --- a/docs/examples/guide/d37b065a94b3ff65a2a8a204fc3b097c.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.eql.get_status( - id: 'FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=' -) -puts response ----- diff --git a/docs/examples/guide/d37b0bda2bd24ab310e6b26708c7c6fb.asciidoc b/docs/examples/guide/d37b0bda2bd24ab310e6b26708c7c6fb.asciidoc deleted file mode 100644 index b8b2c6df9c..0000000000 --- a/docs/examples/guide/d37b0bda2bd24ab310e6b26708c7c6fb.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_date_histo: { - date_histogram: { - field: 'date', - calendar_interval: '1M' - }, - aggregations: { - the_sum: { - sum: { - field: 'price' - } - }, - the_movavg: { - moving_fn: { - buckets_path: 'the_sum', - window: 10, - script: 'return values.length > 0 ? values[0] : Double.NaN' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d3a558ef226e9dccc1c7c61e1167547f.asciidoc b/docs/examples/guide/d3a558ef226e9dccc1c7c61e1167547f.asciidoc deleted file mode 100644 index a3f21948a1..0000000000 --- a/docs/examples/guide/d3a558ef226e9dccc1c7c61e1167547f.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'geoip', - body: { - description: 'Add geoip info', - processors: [ - { - geoip: { - field: 'ip' - } - } - ] - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'my_id', - pipeline: 'geoip', - body: { - ip: '80.231.5.0' - } -) -puts response - -response = client.get( - index: 'my-index-000001', - id: 'my_id' -) -puts response ----- diff --git a/docs/examples/guide/d3d117fec34301520ccdb26332e7c98a.asciidoc b/docs/examples/guide/d3d117fec34301520ccdb26332e7c98a.asciidoc deleted file mode 100644 index a14ff63afa..0000000000 --- a/docs/examples/guide/d3d117fec34301520ccdb26332e7c98a.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - processors: [ - { - registered_domain: { - field: 'fqdn', - target_field: 'url' - } - } - ] - }, - docs: [ - { - _source: { - fqdn: 'www.example.ac.uk' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/d3dccdb15822e971ededb9f6f7d8ada1.asciidoc b/docs/examples/guide/d3dccdb15822e971ededb9f6f7d8ada1.asciidoc deleted file mode 100644 index a3d7ee8973..0000000000 --- a/docs/examples/guide/d3dccdb15822e971ededb9f6f7d8ada1.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - fields: [ - 'content', - 'name.*^5' - ], - query: 'this AND that OR thus' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d3e9e1169c3514fd46e253cd8b5ae3cb.asciidoc b/docs/examples/guide/d3e9e1169c3514fd46e253cd8b5ae3cb.asciidoc deleted file mode 100644 index 086a650535..0000000000 --- a/docs/examples/guide/d3e9e1169c3514fd46e253cd8b5ae3cb.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'standard', - filter: [ - 'my_script_filter' - ] - } - }, - filter: { - my_script_filter: { - type: 'predicate_token_filter', - script: { - source: "\n token.type.contains(\"ALPHANUM\")\n " - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d443db2755fde3b49ca3a9d296c4a96f.asciidoc b/docs/examples/guide/d443db2755fde3b49ca3a9d296c4a96f.asciidoc deleted file mode 100644 index f66a8294e0..0000000000 --- a/docs/examples/guide/d443db2755fde3b49ca3a9d296c4a96f.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'delimited_payload', - body: { - settings: { - analysis: { - analyzer: { - whitespace_delimited_payload: { - tokenizer: 'whitespace', - filter: [ - 'delimited_payload' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d44ecc69090c0b2bc08a6cbc2e3467c5.asciidoc b/docs/examples/guide/d44ecc69090c0b2bc08a6cbc2e3467c5.asciidoc deleted file mode 100644 index 02858bf645..0000000000 --- a/docs/examples/guide/d44ecc69090c0b2bc08a6cbc2e3467c5.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'news', - body: { - query: { - simple_query_string: { - query: '+elasticsearch +pozmantier' - } - }, - _source: [ - 'title', - 'source' - ], - highlight: { - fields: { - content: {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d49318764244113ad2ac4cc0f06d77ec.asciidoc b/docs/examples/guide/d49318764244113ad2ac4cc0f06d77ec.asciidoc deleted file mode 100644 index d9ba8e8dc9..0000000000 --- a/docs/examples/guide/d49318764244113ad2ac4cc0f06d77ec.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'image-index', - body: { - mappings: { - properties: { - "image-vector": { - type: 'dense_vector', - dims: 3, - similarity: 'l2_norm', - index_options: { - type: 'hnsw', - m: 32, - ef_construction: 100 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d4a41fb74b41b41a0ee114a2311f2815.asciidoc b/docs/examples/guide/d4a41fb74b41b41a0ee114a2311f2815.asciidoc deleted file mode 100644 index 98b629ede7..0000000000 --- a/docs/examples/guide/d4a41fb74b41b41a0ee114a2311f2815.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_age: '7d' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d4b405ef0302227e050ac8f0e39068e1.asciidoc b/docs/examples/guide/d4b405ef0302227e050ac8f0e39068e1.asciidoc deleted file mode 100644 index d1895a1813..0000000000 --- a/docs/examples/guide/d4b405ef0302227e050ac8f0e39068e1.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.ml.evaluate_data_frame( - body: { - index: 'my_analytics_dest_index', - evaluation: { - outlier_detection: { - actual_field: 'is_outlier', - predicted_probability_field: 'ml.outlier_score' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d4cdcf01014c75693b080c778071c1b5.asciidoc b/docs/examples/guide/d4cdcf01014c75693b080c778071c1b5.asciidoc deleted file mode 100644 index 78f1176a9c..0000000000 --- a/docs/examples/guide/d4cdcf01014c75693b080c778071c1b5.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'exams', - size: 0, - body: { - aggregations: { - grades_stats: { - stats: { - field: 'grade', - missing: 0 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d4d450f536d747d5ef5050d2d8c66f09.asciidoc b/docs/examples/guide/d4d450f536d747d5ef5050d2d8c66f09.asciidoc deleted file mode 100644 index 09ee4b5358..0000000000 --- a/docs/examples/guide/d4d450f536d747d5ef5050d2d8c66f09.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-index-000001', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - user: { - id: 'kimchy' - }, - "@timestamp": '2099-11-15T14:12:12', - message: 'trying out Elasticsearch' - }, - { - index: { - _id: 2 - } - }, - { - user: { - id: 'kimchi' - }, - "@timestamp": '2099-11-15T14:12:13', - message: 'My user ID is similar to kimchy!' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/d4ef6ac034c4d42cb75d830ec69146e6.asciidoc b/docs/examples/guide/d4ef6ac034c4d42cb75d830ec69146e6.asciidoc deleted file mode 100644 index f6b140361a..0000000000 --- a/docs/examples/guide/d4ef6ac034c4d42cb75d830ec69146e6.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ccr.delete_auto_follow_pattern( - name: 'my_auto_follow_pattern' -) -puts response ----- diff --git a/docs/examples/guide/d4fb482a51d67a1af48e429af6019a46.asciidoc b/docs/examples/guide/d4fb482a51d67a1af48e429af6019a46.asciidoc deleted file mode 100644 index 494d3b6379..0000000000 --- a/docs/examples/guide/d4fb482a51d67a1af48e429af6019a46.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - index: { - 'sort.field' => [ - 'username', - 'date' - ], - 'sort.order' => [ - 'asc', - 'desc' - ] - } - }, - mappings: { - properties: { - username: { - type: 'keyword', - doc_values: true - }, - date: { - type: 'date' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d50b030edfe6d1128eb76aa5ba9d4e27.asciidoc b/docs/examples/guide/d50b030edfe6d1128eb76aa5ba9d4e27.asciidoc deleted file mode 100644 index f9e262bc87..0000000000 --- a/docs/examples/guide/d50b030edfe6d1128eb76aa5ba9d4e27.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.ml.put_trained_model_alias( - model_id: 'flight-delay-prediction-1580004349800', - model_alias: 'flight_delay_model', - reassign: true -) -puts response ----- diff --git a/docs/examples/guide/d5132d34ae922fa8e898889b627a1405.asciidoc b/docs/examples/guide/d5132d34ae922fa8e898889b627a1405.asciidoc deleted file mode 100644 index 30c70f4d52..0000000000 --- a/docs/examples/guide/d5132d34ae922fa8e898889b627a1405.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'child_example', - size: 0, - body: { - aggregations: { - "top-tags": { - terms: { - field: 'tags.keyword', - size: 10 - }, - aggregations: { - "to-answers": { - children: { - type: 'answer' - }, - aggregations: { - "top-names": { - terms: { - field: 'owner.display_name.keyword', - size: 10 - } - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d524db57be9f16abac5396895b9a2a59.asciidoc b/docs/examples/guide/d524db57be9f16abac5396895b9a2a59.asciidoc deleted file mode 100644 index 44fc8b02ab..0000000000 --- a/docs/examples/guide/d524db57be9f16abac5396895b9a2a59.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.resolve_index( - name: 'my-index-*' -) -puts response ----- diff --git a/docs/examples/guide/d547d55efbf75374f6de1f224323bc73.asciidoc b/docs/examples/guide/d547d55efbf75374f6de1f224323bc73.asciidoc deleted file mode 100644 index 975511e374..0000000000 --- a/docs/examples/guide/d547d55efbf75374f6de1f224323bc73.asciidoc +++ /dev/null @@ -1,49 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'geocells', - body: { - mappings: { - properties: { - geocell: { - type: 'geo_shape' - } - } - } - } -) -puts response - -response = client.ingest.put_pipeline( - id: 'geotile2shape', - body: { - description: 'translate rectangular z/x/y geotile to bounding box', - processors: [ - { - geo_grid: { - field: 'geocell', - tile_type: 'geotile' - } - } - ] - } -) -puts response - -response = client.ingest.put_pipeline( - id: 'geohex2shape', - body: { - description: 'translate H3 cell to polygon', - processors: [ - { - geo_grid: { - field: 'geocell', - tile_type: 'geohex', - target_format: 'wkt' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/d5533f08f5cc0479f07a46c761f0786b.asciidoc b/docs/examples/guide/d5533f08f5cc0479f07a46c761f0786b.asciidoc deleted file mode 100644 index 291996308b..0000000000 --- a/docs/examples/guide/d5533f08f5cc0479f07a46c761f0786b.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - counter: { - type: 'integer', - store: false - }, - tags: { - type: 'keyword', - store: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d5bf9bc08f622ece98632a14a3982e27.asciidoc b/docs/examples/guide/d5bf9bc08f622ece98632a14a3982e27.asciidoc deleted file mode 100644 index f65d519e71..0000000000 --- a/docs/examples/guide/d5bf9bc08f622ece98632a14a3982e27.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match_all: {} - }, - script_fields: { - "test1": { - script: "params['_source']['message']" - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d5d022fac900b3244c3d24b185bb19e0.asciidoc b/docs/examples/guide/d5d022fac900b3244c3d24b185bb19e0.asciidoc deleted file mode 100644 index def5c7a6a6..0000000000 --- a/docs/examples/guide/d5d022fac900b3244c3d24b185bb19e0.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-image-index', - body: { - size: 10, - query: { - bool: { - must: { - knn: { - field: 'image-vector', - query_vector: [ - -5, - 9, - -12 - ], - num_candidates: 3 - } - }, - filter: { - term: { - "file-type": 'png' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d5d0ecf75843ddb5f92cfebd089e53e9.asciidoc b/docs/examples/guide/d5d0ecf75843ddb5f92cfebd089e53e9.asciidoc deleted file mode 100644 index ec68bf359a..0000000000 --- a/docs/examples/guide/d5d0ecf75843ddb5f92cfebd089e53e9.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'my-index-000001', - _source: [ - 'user.id', - '_doc' - ] - }, - dest: { - index: 'my-new-index-000001' - } - } -) -puts response ----- diff --git a/docs/examples/guide/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc b/docs/examples/guide/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc deleted file mode 100644 index e8c374fe91..0000000000 --- a/docs/examples/guide/d5dcddc6398b473b6ad9bce5c6adf986.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.search( - scroll: '1m', - body: { - sort: [ - '_doc' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/d5ead6aacbfbedc8396f87bb34acc880.asciidoc b/docs/examples/guide/d5ead6aacbfbedc8396f87bb34acc880.asciidoc deleted file mode 100644 index d611d500f6..0000000000 --- a/docs/examples/guide/d5ead6aacbfbedc8396f87bb34acc880.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.eql.get( - id: 'FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=' -) -puts response ----- diff --git a/docs/examples/guide/d603e76ab70131f7ec6b08758f95a0e3.asciidoc b/docs/examples/guide/d603e76ab70131f7ec6b08758f95a0e3.asciidoc deleted file mode 100644 index 7f9b5f38be..0000000000 --- a/docs/examples/guide/d603e76ab70131f7ec6b08758f95a0e3.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.recovery( - v: true, - h: 'i,s,t,ty,st,rep,snap,f,fp,b,bp' -) -puts response ----- diff --git a/docs/examples/guide/d64d509440afbed7cefd04b6898962eb.asciidoc b/docs/examples/guide/d64d509440afbed7cefd04b6898962eb.asciidoc deleted file mode 100644 index bb5de5d801..0000000000 --- a/docs/examples/guide/d64d509440afbed7cefd04b6898962eb.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_geoshapes', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_distance: { - distance: '200km', - 'pin.location' => { - lat: 40, - lon: -70 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d66e2b4d1931bf88c72e74670156e43f.asciidoc b/docs/examples/guide/d66e2b4d1931bf88c72e74670156e43f.asciidoc deleted file mode 100644 index d1654a1502..0000000000 --- a/docs/examples/guide/d66e2b4d1931bf88c72e74670156e43f.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - track_total_hits: 100, - query: { - match: { - 'user.id' => 'elkbee' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d681508a745b2bc777d47ba606d24224.asciidoc b/docs/examples/guide/d681508a745b2bc777d47ba606d24224.asciidoc deleted file mode 100644 index 1fc424d694..0000000000 --- a/docs/examples/guide/d681508a745b2bc777d47ba606d24224.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.fielddata( - v: true -) -puts response ----- diff --git a/docs/examples/guide/d681b643da0d7f0a384f627b6d56111b.asciidoc b/docs/examples/guide/d681b643da0d7f0a384f627b6d56111b.asciidoc deleted file mode 100644 index f9ddde759c..0000000000 --- a/docs/examples/guide/d681b643da0d7f0a384f627b6d56111b.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index', - body: { - mappings: { - properties: { - message: { - type: 'wildcard' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d690a6af462c70a783625a323e11c72c.asciidoc b/docs/examples/guide/d690a6af462c70a783625a323e11c72c.asciidoc deleted file mode 100644 index 6f092450de..0000000000 --- a/docs/examples/guide/d690a6af462c70a783625a323e11c72c.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test-index', - body: { - settings: { - number_of_shards: 1, - number_of_replicas: 1, - 'index.lifecycle.name' => 'my_policy' - } - } -) -puts response ----- diff --git a/docs/examples/guide/d69cf7c82602431d9e339583e7dfb988.asciidoc b/docs/examples/guide/d69cf7c82602431d9e339583e7dfb988.asciidoc deleted file mode 100644 index 2d145d6c7c..0000000000 --- a/docs/examples/guide/d69cf7c82602431d9e339583e7dfb988.asciidoc +++ /dev/null @@ -1,51 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - std_english: { - type: 'standard', - stopwords: '_english_' - } - } - } - }, - mappings: { - properties: { - my_text: { - type: 'text', - analyzer: 'standard', - fields: { - english: { - type: 'text', - analyzer: 'std_english' - } - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - field: 'my_text', - text: 'The old brown cow' - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - field: 'my_text.english', - text: 'The old brown cow' - } -) -puts response ----- diff --git a/docs/examples/guide/d70f55cd29cdb2dcd775ffa9e23ff393.asciidoc b/docs/examples/guide/d70f55cd29cdb2dcd775ffa9e23ff393.asciidoc deleted file mode 100644 index 6bc65c851e..0000000000 --- a/docs/examples/guide/d70f55cd29cdb2dcd775ffa9e23ff393.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - runtime_mappings: { - 'price.adjusted' => { - type: 'double', - script: "\n double price = doc['price'].value;\n if (doc['promoted'].value) {\n price *= 0.8;\n }\n emit(price);\n " - } - }, - aggregations: { - max_price: { - max: { - field: 'price.adjusted' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d7141bd4d0db964f5cc4a872ad79dce9.asciidoc b/docs/examples/guide/d7141bd4d0db964f5cc4a872ad79dce9.asciidoc deleted file mode 100644 index 16bc3493f6..0000000000 --- a/docs/examples/guide/d7141bd4d0db964f5cc4a872ad79dce9.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.features.reset_features -puts response ----- diff --git a/docs/examples/guide/d7717318d93d0a1f3ad049f9c6604417.asciidoc b/docs/examples/guide/d7717318d93d0a1f3ad049f9c6604417.asciidoc deleted file mode 100644 index 8a034c8654..0000000000 --- a/docs/examples/guide/d7717318d93d0a1f3ad049f9c6604417.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'my_tokenizer' - } - }, - tokenizer: { - my_tokenizer: { - type: 'standard', - max_token_length: 5 - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_analyzer', - text: "The 2 QUICK Brown-Foxes jumped over the lazy dog's bone." - } -) -puts response ----- diff --git a/docs/examples/guide/d775836a0d7abecc6637aa988f204c30.asciidoc b/docs/examples/guide/d775836a0d7abecc6637aa988f204c30.asciidoc deleted file mode 100644 index 4c8cf2599b..0000000000 --- a/docs/examples/guide/d775836a0d7abecc6637aa988f204c30.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - fullname: 'John Doe', - text: 'test test test ' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - refresh: 'wait_for', - body: { - fullname: 'Jane Doe', - text: 'Another test ...' - } -) -puts response ----- diff --git a/docs/examples/guide/d7898526d239d2aea83727fb982f8f77.asciidoc b/docs/examples/guide/d7898526d239d2aea83727fb982f8f77.asciidoc deleted file mode 100644 index f86946d68e..0000000000 --- a/docs/examples/guide/d7898526d239d2aea83727fb982f8f77.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.indices.refresh -puts response ----- diff --git a/docs/examples/guide/d7919fb6f4d02dde1390775eb8365b79.asciidoc b/docs/examples/guide/d7919fb6f4d02dde1390775eb8365b79.asciidoc deleted file mode 100644 index 52eb004a22..0000000000 --- a/docs/examples/guide/d7919fb6f4d02dde1390775eb8365b79.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - properties: { - my_field: { - type: 'text', - fielddata: true - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d7a55a7c491e97079e429483085f1d58.asciidoc b/docs/examples/guide/d7a55a7c491e97079e429483085f1d58.asciidoc deleted file mode 100644 index 2531d6787d..0000000000 --- a/docs/examples/guide/d7a55a7c491e97079e429483085f1d58.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'dsl-data-stream-template', - body: { - index_patterns: [ - 'dsl-data-stream*' - ], - data_stream: {}, - priority: 500, - template: { - settings: { - 'index.lifecycle.name' => 'pre-dsl-ilm-policy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d7f42d1b906dc406be1819d17c625d5f.asciidoc b/docs/examples/guide/d7f42d1b906dc406be1819d17c625d5f.asciidoc deleted file mode 100644 index cbbfe24d38..0000000000 --- a/docs/examples/guide/d7f42d1b906dc406be1819d17c625d5f.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - filter_path: 'aggregations', - body: { - aggregations: { - t_shirts: { - filter: { - term: { - type: 't-shirt' - } - }, - aggregations: { - avg_price: { - avg: { - field: 'price' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d7fe687201ac87b307cd06ed015dd317.asciidoc b/docs/examples/guide/d7fe687201ac87b307cd06ed015dd317.asciidoc deleted file mode 100644 index bea276b9a3..0000000000 --- a/docs/examples/guide/d7fe687201ac87b307cd06ed015dd317.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - properties: { - user_id: { - type: 'keyword', - ignore_above: 100 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d803ed00d8f45f81c33e415e1c1ecb8c.asciidoc b/docs/examples/guide/d803ed00d8f45f81c33e415e1c1ecb8c.asciidoc deleted file mode 100644 index 52220f966d..0000000000 --- a/docs/examples/guide/d803ed00d8f45f81c33e415e1c1ecb8c.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'my-data-stream', - query: { - range: { - "@timestamp": { - gte: 'now-7d/d', - lte: 'now/d' - } - } - } - }, - dest: { - index: 'new-data-stream', - op_type: 'create' - } - } -) -puts response ----- diff --git a/docs/examples/guide/d80ac403d8d936ca9dec185c7da13f2f.asciidoc b/docs/examples/guide/d80ac403d8d936ca9dec185c7da13f2f.asciidoc deleted file mode 100644 index fb42654470..0000000000 --- a/docs/examples/guide/d80ac403d8d936ca9dec185c7da13f2f.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.put_script( - id: 'my-stored-script', - body: { - script: { - lang: 'painless', - source: "Math.log(_score * 2) + params['my_modifier']" - } - } -) -puts response ----- diff --git a/docs/examples/guide/d8310e5606c61e7a6e64a90838b1a830.asciidoc b/docs/examples/guide/d8310e5606c61e7a6e64a90838b1a830.asciidoc deleted file mode 100644 index f884f49b3a..0000000000 --- a/docs/examples/guide/d8310e5606c61e7a6e64a90838b1a830.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'parent_example', - id: 2, - routing: 1, - body: { - join: { - name: 'answer', - parent: '1' - }, - owner: { - location: 'Norfolk, United Kingdom', - display_name: 'Sam', - id: 48 - }, - body: "Unfortunately you're pretty much limited to FTP...", - creation_date: '2009-05-04T13:45:37.030' - } -) -puts response - -response = client.index( - index: 'parent_example', - id: 3, - routing: 1, - refresh: true, - body: { - join: { - name: 'answer', - parent: '1' - }, - owner: { - location: 'Norfolk, United Kingdom', - display_name: 'Troll', - id: 49 - }, - body: 'Use Linux...', - creation_date: '2009-05-05T13:45:37.030' - } -) -puts response ----- diff --git a/docs/examples/guide/d84a861ce563508aeaaf30a9dd84b5cf.asciidoc b/docs/examples/guide/d84a861ce563508aeaaf30a9dd84b5cf.asciidoc deleted file mode 100644 index 5bbaa3086d..0000000000 --- a/docs/examples/guide/d84a861ce563508aeaaf30a9dd84b5cf.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - hot: { - actions: { - rollover: { - max_age: '7d', - max_size: '100gb', - min_docs: 1000 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d851282dba548251d10db5954a339307.asciidoc b/docs/examples/guide/d851282dba548251d10db5954a339307.asciidoc deleted file mode 100644 index 972e22f247..0000000000 --- a/docs/examples/guide/d851282dba548251d10db5954a339307.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'twitter', - body: { - query: { - match: { - title: 'elasticsearch' - } - }, - search_after: [ - 1_463_538_857, - '654323' - ], - sort: [ - { - date: 'asc' - }, - { - tie_breaker_id: 'asc' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/d870d5bd1f97fc75872a298fcddec513.asciidoc b/docs/examples/guide/d870d5bd1f97fc75872a298fcddec513.asciidoc deleted file mode 100644 index 15bd795305..0000000000 --- a/docs/examples/guide/d870d5bd1f97fc75872a298fcddec513.asciidoc +++ /dev/null @@ -1,152 +0,0 @@ -[source, ruby] ----- -response = client.text_structure.find_structure( - body: [ - { - name: 'Leviathan Wakes', - author: 'James S.A. Corey', - release_date: '2011-06-02', - page_count: 561 - }, - { - name: 'Hyperion', - author: 'Dan Simmons', - release_date: '1989-05-26', - page_count: 482 - }, - { - name: 'Dune', - author: 'Frank Herbert', - release_date: '1965-06-01', - page_count: 604 - }, - { - name: 'Dune Messiah', - author: 'Frank Herbert', - release_date: '1969-10-15', - page_count: 331 - }, - { - name: 'Children of Dune', - author: 'Frank Herbert', - release_date: '1976-04-21', - page_count: 408 - }, - { - name: 'God Emperor of Dune', - author: 'Frank Herbert', - release_date: '1981-05-28', - page_count: 454 - }, - { - name: 'Consider Phlebas', - author: 'Iain M. Banks', - release_date: '1987-04-23', - page_count: 471 - }, - { - name: "Pandora's Star", - author: 'Peter F. Hamilton', - release_date: '2004-03-02', - page_count: 768 - }, - { - name: 'Revelation Space', - author: 'Alastair Reynolds', - release_date: '2000-03-15', - page_count: 585 - }, - { - name: 'A Fire Upon the Deep', - author: 'Vernor Vinge', - release_date: '1992-06-01', - page_count: 613 - }, - { - name: "Ender's Game", - author: 'Orson Scott Card', - release_date: '1985-06-01', - page_count: 324 - }, - { - name: '1984', - author: 'George Orwell', - release_date: '1985-06-01', - page_count: 328 - }, - { - name: 'Fahrenheit 451', - author: 'Ray Bradbury', - release_date: '1953-10-15', - page_count: 227 - }, - { - name: 'Brave New World', - author: 'Aldous Huxley', - release_date: '1932-06-01', - page_count: 268 - }, - { - name: 'Foundation', - author: 'Isaac Asimov', - release_date: '1951-06-01', - page_count: 224 - }, - { - name: 'The Giver', - author: 'Lois Lowry', - release_date: '1993-04-26', - page_count: 208 - }, - { - name: 'Slaughterhouse-Five', - author: 'Kurt Vonnegut', - release_date: '1969-06-01', - page_count: 275 - }, - { - name: "The Hitchhiker's Guide to the Galaxy", - author: 'Douglas Adams', - release_date: '1979-10-12', - page_count: 180 - }, - { - name: 'Snow Crash', - author: 'Neal Stephenson', - release_date: '1992-06-01', - page_count: 470 - }, - { - name: 'Neuromancer', - author: 'William Gibson', - release_date: '1984-07-01', - page_count: 271 - }, - { - name: "The Handmaid's Tale", - author: 'Margaret Atwood', - release_date: '1985-06-01', - page_count: 311 - }, - { - name: 'Starship Troopers', - author: 'Robert A. Heinlein', - release_date: '1959-12-01', - page_count: 335 - }, - { - name: 'The Left Hand of Darkness', - author: 'Ursula K. Le Guin', - release_date: '1969-06-01', - page_count: 304 - }, - { - name: 'The Moon is a Harsh Mistress', - author: 'Robert A. Heinlein', - release_date: '1966-04-01', - page_count: 288 - } - ] -) -puts response ----- diff --git a/docs/examples/guide/d87175daed2327565d4325528c6d8b38.asciidoc b/docs/examples/guide/d87175daed2327565d4325528c6d8b38.asciidoc deleted file mode 100644 index 374156f0e4..0000000000 --- a/docs/examples/guide/d87175daed2327565d4325528c6d8b38.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'my-index-000001', - id: 0 -) -puts response ----- diff --git a/docs/examples/guide/d87cfcc0a297f75ffe646b2e61940d14.asciidoc b/docs/examples/guide/d87cfcc0a297f75ffe646b2e61940d14.asciidoc deleted file mode 100644 index 4f98d4da31..0000000000 --- a/docs/examples/guide/d87cfcc0a297f75ffe646b2e61940d14.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'uppercase_example', - body: { - settings: { - analysis: { - analyzer: { - whitespace_uppercase: { - tokenizer: 'whitespace', - filter: [ - 'uppercase' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d880630b6f7dc634c4078293f9cd3d80.asciidoc b/docs/examples/guide/d880630b6f7dc634c4078293f9cd3d80.asciidoc deleted file mode 100644 index 2ad4615f21..0000000000 --- a/docs/examples/guide/d880630b6f7dc634c4078293f9cd3d80.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - size: 2, - sources: [ - { - date: { - date_histogram: { - field: 'timestamp', - calendar_interval: '1d', - order: 'desc' - } - } - }, - { - product: { - terms: { - field: 'product', - order: 'asc' - } - } - } - ], - after: { - date: 1_494_288_000_000, - product: 'mad max' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d88f883ed2fb8be35cd3e72ddffcf4ef.asciidoc b/docs/examples/guide/d88f883ed2fb8be35cd3e72ddffcf4ef.asciidoc deleted file mode 100644 index 8f82f7e0d2..0000000000 --- a/docs/examples/guide/d88f883ed2fb8be35cd3e72ddffcf4ef.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'length_custom_example', - body: { - settings: { - analysis: { - analyzer: { - "whitespace_length_2_to_10_char": { - tokenizer: 'whitespace', - filter: [ - 'length_2_to_10_char' - ] - } - }, - filter: { - "length_2_to_10_char": { - type: 'length', - min: 2, - max: 10 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d89d36741d906a71eca6c144e8d83889.asciidoc b/docs/examples/guide/d89d36741d906a71eca6c144e8d83889.asciidoc deleted file mode 100644 index 1dbadf09ee..0000000000 --- a/docs/examples/guide/d89d36741d906a71eca6c144e8d83889.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.tasks.cancel( - task_id: 'oTUltX4IQMOUUVeiohTt8A:12345' -) -puts response ----- diff --git a/docs/examples/guide/d8a82511cb94f49b4fe4828fee3ba074.asciidoc b/docs/examples/guide/d8a82511cb94f49b4fe4828fee3ba074.asciidoc deleted file mode 100644 index a1727132ca..0000000000 --- a/docs/examples/guide/d8a82511cb94f49b4fe4828fee3ba074.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodes( - v: true, - h: 'name,node*,heap*' -) -puts response ----- diff --git a/docs/examples/guide/d8c401a5b7359ec65947b9f35ecf6927.asciidoc b/docs/examples/guide/d8c401a5b7359ec65947b9f35ecf6927.asciidoc deleted file mode 100644 index ee3c4a9736..0000000000 --- a/docs/examples/guide/d8c401a5b7359ec65947b9f35ecf6927.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'my_tokenizer' - } - }, - tokenizer: { - my_tokenizer: { - type: 'ngram', - min_gram: 3, - max_gram: 3, - token_chars: [ - 'letter', - 'digit' - ] - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_analyzer', - text: '2 Quick Foxes.' - } -) -puts response ----- diff --git a/docs/examples/guide/d8ea6a1a1c546bf29f65f8c65439b156.asciidoc b/docs/examples/guide/d8ea6a1a1c546bf29f65f8c65439b156.asciidoc deleted file mode 100644 index 35bb975b4f..0000000000 --- a/docs/examples/guide/d8ea6a1a1c546bf29f65f8c65439b156.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'byte-image-index', - body: { - mappings: { - properties: { - "byte-image-vector": { - type: 'dense_vector', - element_type: 'byte', - dims: 2 - }, - title: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d8fa7ca2ec8dbfa034603ea566e33f5b.asciidoc b/docs/examples/guide/d8fa7ca2ec8dbfa034603ea566e33f5b.asciidoc deleted file mode 100644 index 259b0ec8ce..0000000000 --- a/docs/examples/guide/d8fa7ca2ec8dbfa034603ea566e33f5b.asciidoc +++ /dev/null @@ -1,44 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - filter_path: 'aggregations', - body: { - aggregations: { - the_filter: { - filters: { - keyed: false, - filters: { - "t-shirt": { - term: { - type: 't-shirt' - } - }, - hat: { - term: { - type: 'hat' - } - } - } - }, - aggregations: { - avg_price: { - avg: { - field: 'price' - } - }, - sort_by_avg_price: { - bucket_sort: { - sort: { - avg_price: 'asc' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d93d52b6057a7aff3d0766ca44c505e0.asciidoc b/docs/examples/guide/d93d52b6057a7aff3d0766ca44c505e0.asciidoc deleted file mode 100644 index 9885296749..0000000000 --- a/docs/examples/guide/d93d52b6057a7aff3d0766ca44c505e0.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'my-aliases', - body: { - template: { - aliases: { - "my-alias": {} - } - } - } -) -puts response - -response = client.indices.put_index_template( - name: 'my-index-template', - body: { - index_patterns: [ - 'my-index-*' - ], - composed_of: [ - 'my-aliases', - 'my-mappings', - 'my-settings' - ], - template: { - aliases: { - "yet-another-alias": {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d94f666616dea141dcb7aaf08a35bc10.asciidoc b/docs/examples/guide/d94f666616dea141dcb7aaf08a35bc10.asciidoc deleted file mode 100644 index 4a6735e9c1..0000000000 --- a/docs/examples/guide/d94f666616dea141dcb7aaf08a35bc10.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - { - type: 'keep_types', - types: [ - '' - ], - mode: 'exclude' - } - ], - text: '1 quick fox 2 lazy dogs' - } -) -puts response ----- diff --git a/docs/examples/guide/d952ac7c73219d8cabc080679e035514.asciidoc b/docs/examples/guide/d952ac7c73219d8cabc080679e035514.asciidoc deleted file mode 100644 index adcc2c5c5f..0000000000 --- a/docs/examples/guide/d952ac7c73219d8cabc080679e035514.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index', - body: { - knn: { - field: 'my_embeddings.predicted_value', - k: 10, - num_candidates: 100, - query_vector_builder: { - text_embedding: { - model_id: 'sentence-transformers__msmarco-minilm-l-12-v3', - model_text: 'the query string' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d979f934af0992fb8c8596beff80b638.asciidoc b/docs/examples/guide/d979f934af0992fb8c8596beff80b638.asciidoc deleted file mode 100644 index 40a467c6f4..0000000000 --- a/docs/examples/guide/d979f934af0992fb8c8596beff80b638.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - _source: [ - 'obj1.*', - 'obj2.*' - ], - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d983c1ea730eeabac9e914656d7c9be2.asciidoc b/docs/examples/guide/d983c1ea730eeabac9e914656d7c9be2.asciidoc deleted file mode 100644 index ecda2fe6c0..0000000000 --- a/docs/examples/guide/d983c1ea730eeabac9e914656d7c9be2.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'latvian_example', - body: { - settings: { - analysis: { - filter: { - latvian_stop: { - type: 'stop', - stopwords: '_latvian_' - }, - latvian_keywords: { - type: 'keyword_marker', - keywords: [ - 'piemērs' - ] - }, - latvian_stemmer: { - type: 'stemmer', - language: 'latvian' - } - }, - analyzer: { - rebuilt_latvian: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'latvian_stop', - 'latvian_keywords', - 'latvian_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d98fb2ff2cdd154dff4a576430755d98.asciidoc b/docs/examples/guide/d98fb2ff2cdd154dff4a576430755d98.asciidoc deleted file mode 100644 index ba420dd90e..0000000000 --- a/docs/examples/guide/d98fb2ff2cdd154dff4a576430755d98.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - timestamp: { - type: 'date' - }, - temperature: { - type: 'long' - }, - voltage: { - type: 'double' - }, - node: { - type: 'keyword' - }, - voltage_corrected: { - type: 'double', - on_script_error: 'fail', - script: { - source: "\n emit(doc['voltage'].value * params['multiplier'])\n ", - params: { - multiplier: 4 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d9a1ad1c5746b75972c74dd4d3a3d623.asciidoc b/docs/examples/guide/d9a1ad1c5746b75972c74dd4d3a3d623.asciidoc deleted file mode 100644 index a073e3c3a5..0000000000 --- a/docs/examples/guide/d9a1ad1c5746b75972c74dd4d3a3d623.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - my_join_field: { - type: 'join', - relations: { - question: [ - 'answer', - 'comment' - ], - answer: 'vote' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/d9e0cba8e150681d861f5fd1545514e2.asciidoc b/docs/examples/guide/d9e0cba8e150681d861f5fd1545514e2.asciidoc deleted file mode 100644 index 95c8b0188c..0000000000 --- a/docs/examples/guide/d9e0cba8e150681d861f5fd1545514e2.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'txt', - body: { - query: 'SELECT YEAR(release_date) AS year FROM library WHERE page_count > ? AND author = ? GROUP BY year HAVING COUNT(*) > ?', - params: [ - 300, - 'Frank Herbert', - 0 - ] - } -) -puts response ----- diff --git a/docs/examples/guide/da0fe1316e5b8fd68e2a8525bcd8b0f6.asciidoc b/docs/examples/guide/da0fe1316e5b8fd68e2a8525bcd8b0f6.asciidoc deleted file mode 100644 index 1912cfe9ca..0000000000 --- a/docs/examples/guide/da0fe1316e5b8fd68e2a8525bcd8b0f6.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - bool: { - must: { - match: { - body: 'elasticsearch' - } - }, - should: { - rank_feature: { - field: 'pagerank', - saturation: { - pivot: 10 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/da24c13eee8c9aeae9a23faf80489e31.asciidoc b/docs/examples/guide/da24c13eee8c9aeae9a23faf80489e31.asciidoc deleted file mode 100644 index e0231e7a3a..0000000000 --- a/docs/examples/guide/da24c13eee8c9aeae9a23faf80489e31.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete( - index: 'my-index' -) -puts response - -response = client.reindex( - body: { - source: { - index: 'restored-my-index' - }, - dest: { - index: 'my-index' - } - } -) -puts response - -response = client.indices.delete_data_stream( - name: 'logs-my_app-default' -) -puts response - -response = client.reindex( - body: { - source: { - index: 'restored-logs-my_app-default' - }, - dest: { - index: 'logs-my_app-default', - op_type: 'create' - } - } -) -puts response ----- diff --git a/docs/examples/guide/da3cecc36a7313385d32c7f52ccfb7e3.asciidoc b/docs/examples/guide/da3cecc36a7313385d32c7f52ccfb7e3.asciidoc deleted file mode 100644 index e60211e765..0000000000 --- a/docs/examples/guide/da3cecc36a7313385d32c7f52ccfb7e3.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - runtime_mappings: { - 'date.day_of_week' => { - type: 'keyword', - script: "emit(doc['date'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT))" - } - }, - aggregations: { - day_of_week: { - terms: { - field: 'date.day_of_week' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/da8db0769dff7305f178c12b1111bc99.asciidoc b/docs/examples/guide/da8db0769dff7305f178c12b1111bc99.asciidoc deleted file mode 100644 index e293c16a62..0000000000 --- a/docs/examples/guide/da8db0769dff7305f178c12b1111bc99.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - simple_query_string: { - query: 'this is a test', - fields: [ - 'subject^3', - 'message' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/da90e457e2a34fe47dd82a0a2f336095.asciidoc b/docs/examples/guide/da90e457e2a34fe47dd82a0a2f336095.asciidoc deleted file mode 100644 index 961cf7b9ff..0000000000 --- a/docs/examples/guide/da90e457e2a34fe47dd82a0a2f336095.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'networks', - id: 1, - refresh: 'wait_for', - body: { - range: '10.100.0.0/16', - name: 'production', - department: 'OPS' - } -) -puts response ----- diff --git a/docs/examples/guide/daae2e6acebc84e537764f4ba07f2e6e.asciidoc b/docs/examples/guide/daae2e6acebc84e537764f4ba07f2e6e.asciidoc deleted file mode 100644 index 24b505387e..0000000000 --- a/docs/examples/guide/daae2e6acebc84e537764f4ba07f2e6e.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.exclude._name' => nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/dabb159e0b3456024889fb9754a10655.asciidoc b/docs/examples/guide/dabb159e0b3456024889fb9754a10655.asciidoc deleted file mode 100644 index c128bd76e8..0000000000 --- a/docs/examples/guide/dabb159e0b3456024889fb9754a10655.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'example', - body: { - mappings: { - properties: { - geometry: { - type: 'shape' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/dabcf0bead37cae1d3e5d2813fd3ccfe.asciidoc b/docs/examples/guide/dabcf0bead37cae1d3e5d2813fd3ccfe.asciidoc deleted file mode 100644 index 4b30ff5662..0000000000 --- a/docs/examples/guide/dabcf0bead37cae1d3e5d2813fd3ccfe.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - query_string: { - query: 'ip_addr:"2001:db8::/48"' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/dad2d4add751fde5c39475ca709cc14b.asciidoc b/docs/examples/guide/dad2d4add751fde5c39475ca709cc14b.asciidoc deleted file mode 100644 index 334da4cdc6..0000000000 --- a/docs/examples/guide/dad2d4add751fde5c39475ca709cc14b.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'test', - body: { - 'index.routing.allocation.include.size' => 'big,medium' - } -) -puts response ----- diff --git a/docs/examples/guide/dadb69a225778ecd6528924c0aa029bb.asciidoc b/docs/examples/guide/dadb69a225778ecd6528924c0aa029bb.asciidoc deleted file mode 100644 index de223a33ef..0000000000 --- a/docs/examples/guide/dadb69a225778ecd6528924c0aa029bb.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'image-index', - body: { - mappings: { - properties: { - "image-vector": { - type: 'dense_vector', - dims: 3, - similarity: 'l2_norm' - }, - "title-vector": { - type: 'dense_vector', - dims: 5, - similarity: 'l2_norm' - }, - title: { - type: 'text' - }, - "file-type": { - type: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/dae57cf7df18adb4dc64426eb159733a.asciidoc b/docs/examples/guide/dae57cf7df18adb4dc64426eb159733a.asciidoc deleted file mode 100644 index 9890bbe6e6..0000000000 --- a/docs/examples/guide/dae57cf7df18adb4dc64426eb159733a.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - aggregations: { - load_time_outlier: { - percentiles: { - field: 'load_time', - percents: [ - 95, - 99, - 99.9 - ], - hdr: { - number_of_significant_value_digits: 3 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/daf5631eba5285f1b929d5d8d8dc0d50.asciidoc b/docs/examples/guide/daf5631eba5285f1b929d5d8d8dc0d50.asciidoc deleted file mode 100644 index 1515db9a76..0000000000 --- a/docs/examples/guide/daf5631eba5285f1b929d5d8d8dc0d50.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'my_tokenizer' - } - }, - tokenizer: { - my_tokenizer: { - type: 'uax_url_email', - max_token_length: 5 - } - } - } - } - } -) -puts response - -response = client.indices.analyze( - index: 'my-index-000001', - body: { - analyzer: 'my_analyzer', - text: 'john.smith@global-international.com' - } -) -puts response ----- diff --git a/docs/examples/guide/db19cc7a26ca80106d86d688f4be67a8.asciidoc b/docs/examples/guide/db19cc7a26ca80106d86d688f4be67a8.asciidoc deleted file mode 100644 index 75895c2071..0000000000 --- a/docs/examples/guide/db19cc7a26ca80106d86d688f4be67a8.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.stop_data_frame_analytics( - id: 'loganalytics' -) -puts response ----- diff --git a/docs/examples/guide/db773f690edf659ac9b044dc854c77eb.asciidoc b/docs/examples/guide/db773f690edf659ac9b044dc854c77eb.asciidoc deleted file mode 100644 index 6469845f48..0000000000 --- a/docs/examples/guide/db773f690edf659ac9b044dc854c77eb.asciidoc +++ /dev/null @@ -1,77 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'museums', - body: { - mappings: { - properties: { - location: { - type: 'geo_point' - }, - name: { - type: 'keyword' - }, - price: { - type: 'long' - }, - included: { - type: 'boolean' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'museums', - refresh: true, - body: [ - { - index: { - _id: '1' - } - }, - { - location: 'POINT (4.912350 52.374081)', - name: 'NEMO Science Museum', - price: 1750, - included: true - }, - { - index: { - _id: '2' - } - }, - { - location: 'POINT (4.901618 52.369219)', - name: 'Museum Het Rembrandthuis', - price: 1500, - included: false - }, - { - index: { - _id: '3' - } - }, - { - location: 'POINT (4.914722 52.371667)', - name: 'Nederlands Scheepvaartmuseum', - price: 1650, - included: true - }, - { - index: { - _id: '4' - } - }, - { - location: 'POINT (4.914722 52.371667)', - name: 'Amsterdam Centre for Architecture', - price: 0, - included: true - } - ] -) -puts response ----- diff --git a/docs/examples/guide/db8710a9793ae0817a45892d33468160.asciidoc b/docs/examples/guide/db8710a9793ae0817a45892d33468160.asciidoc deleted file mode 100644 index b4531625ad..0000000000 --- a/docs/examples/guide/db8710a9793ae0817a45892d33468160.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.disk_usage( - index: 'my-index-000001', - run_expensive_tasks: true -) -puts response ----- diff --git a/docs/examples/guide/db879dcf70abc4a9a14063a9a2d8d6f5.asciidoc b/docs/examples/guide/db879dcf70abc4a9a14063a9a2d8d6f5.asciidoc deleted file mode 100644 index 12cf808fc7..0000000000 --- a/docs/examples/guide/db879dcf70abc4a9a14063a9a2d8d6f5.asciidoc +++ /dev/null @@ -1,94 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'museums', - body: { - mappings: { - properties: { - location: { - type: 'geo_point' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'museums', - refresh: true, - body: [ - { - index: { - _id: 1 - } - }, - { - location: 'POINT (4.912350 52.374081)', - name: 'NEMO Science Museum' - }, - { - index: { - _id: 2 - } - }, - { - location: 'POINT (4.901618 52.369219)', - name: 'Museum Het Rembrandthuis' - }, - { - index: { - _id: 3 - } - }, - { - location: 'POINT (4.914722 52.371667)', - name: 'Nederlands Scheepvaartmuseum' - }, - { - index: { - _id: 4 - } - }, - { - location: 'POINT (4.405200 51.222900)', - name: 'Letterenhuis' - }, - { - index: { - _id: 5 - } - }, - { - location: 'POINT (2.336389 48.861111)', - name: 'Musée du Louvre' - }, - { - index: { - _id: 6 - } - }, - { - location: 'POINT (2.327000 48.860000)', - name: "Musée d'Orsay" - } - ] -) -puts response - -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - "large-grid": { - geohash_grid: { - field: 'location', - precision: 3 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/db9a8e3edee7c9a96ea0875fd4bbaa69.asciidoc b/docs/examples/guide/db9a8e3edee7c9a96ea0875fd4bbaa69.asciidoc deleted file mode 100644 index 215add1282..0000000000 --- a/docs/examples/guide/db9a8e3edee7c9a96ea0875fd4bbaa69.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_settings -puts response ----- diff --git a/docs/examples/guide/dbc50b8c934171e94604575a8b36f349.asciidoc b/docs/examples/guide/dbc50b8c934171e94604575a8b36f349.asciidoc deleted file mode 100644 index f87dd7b2f2..0000000000 --- a/docs/examples/guide/dbc50b8c934171e94604575a8b36f349.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.forcemerge( - index: 'my-index-000001', - max_num_segments: 5 -) -puts response ----- diff --git a/docs/examples/guide/dbcd8892dd01c43d5a60c94173574faf.asciidoc b/docs/examples/guide/dbcd8892dd01c43d5a60c94173574faf.asciidoc deleted file mode 100644 index bb1c1a6974..0000000000 --- a/docs/examples/guide/dbcd8892dd01c43d5a60c94173574faf.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'range_index', - body: { - settings: { - number_of_shards: 2 - }, - mappings: { - properties: { - expected_attendees: { - type: 'integer_range' - }, - time_frame: { - type: 'date_range', - format: 'yyyy-MM-dd||epoch_millis' - } - } - } - } -) -puts response - -response = client.index( - index: 'range_index', - id: 1, - refresh: true, - body: { - expected_attendees: { - gte: 10, - lte: 20 - }, - time_frame: { - gte: '2019-10-28', - lte: '2019-11-04' - } - } -) -puts response ----- diff --git a/docs/examples/guide/dbd1b930782d34d7396fdb2db1216c0d.asciidoc b/docs/examples/guide/dbd1b930782d34d7396fdb2db1216c0d.asciidoc deleted file mode 100644 index f68edff761..0000000000 --- a/docs/examples/guide/dbd1b930782d34d7396fdb2db1216c0d.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - ids: { - values: [ - '1', - '4', - '100' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/dbdd58cdeac9ef20b42ff73e4864e697.asciidoc b/docs/examples/guide/dbdd58cdeac9ef20b42ff73e4864e697.asciidoc deleted file mode 100644 index 4f85cf98ec..0000000000 --- a/docs/examples/guide/dbdd58cdeac9ef20b42ff73e4864e697.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_field_mapping( - index: '_all', - fields: '*.id' -) -puts response ----- diff --git a/docs/examples/guide/dbf93d02ab86a09929a21232b19709cc.asciidoc b/docs/examples/guide/dbf93d02ab86a09929a21232b19709cc.asciidoc deleted file mode 100644 index 6b1ec1c2cb..0000000000 --- a/docs/examples/guide/dbf93d02ab86a09929a21232b19709cc.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.stop_trained_model_deployment( - model_id: 'my_model_for_search' -) -puts response ----- diff --git a/docs/examples/guide/dc3b7603e7d688106acb804059af7834.asciidoc b/docs/examples/guide/dc3b7603e7d688106acb804059af7834.asciidoc deleted file mode 100644 index 4dd54b03c4..0000000000 --- a/docs/examples/guide/dc3b7603e7d688106acb804059af7834.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - _source: false, - query: { - match: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/dc4dcfeae8a5f248639335c2c9809549.asciidoc b/docs/examples/guide/dc4dcfeae8a5f248639335c2c9809549.asciidoc deleted file mode 100644 index fb75f9b200..0000000000 --- a/docs/examples/guide/dc4dcfeae8a5f248639335c2c9809549.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'path_hierarchy', - text: '/one/two/three' - } -) -puts response ----- diff --git a/docs/examples/guide/dc8c94c9bef1f879282caea5c406f36e.asciidoc b/docs/examples/guide/dc8c94c9bef1f879282caea5c406f36e.asciidoc deleted file mode 100644 index 44f122c004..0000000000 --- a/docs/examples/guide/dc8c94c9bef1f879282caea5c406f36e.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'keyword', - filter: [ - 'lowercase' - ], - char_filter: [ - 'html_strip' - ], - text: 'this is a test' - } -) -puts response ----- diff --git a/docs/examples/guide/dcc02ad69da0a5aa10c4e53b34be8ec0.asciidoc b/docs/examples/guide/dcc02ad69da0a5aa10c4e53b34be8ec0.asciidoc deleted file mode 100644 index 85d8921b49..0000000000 --- a/docs/examples/guide/dcc02ad69da0a5aa10c4e53b34be8ec0.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.mget( - body: { - docs: [ - { - _index: 'my-index-000001', - _id: '1' - }, - { - _index: 'my-index-000001', - _id: '2' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/dcee24dba43050e4b01b6e3a3211ce09.asciidoc b/docs/examples/guide/dcee24dba43050e4b01b6e3a3211ce09.asciidoc deleted file mode 100644 index 963d1e764e..0000000000 --- a/docs/examples/guide/dcee24dba43050e4b01b6e3a3211ce09.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - "@timestamp": { - format: 'strict_date_optional_time||epoch_second', - type: 'date' - }, - message: { - type: 'wildcard' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/dd1a25d821d0c8deaeaa9c8083152a54.asciidoc b/docs/examples/guide/dd1a25d821d0c8deaeaa9c8083152a54.asciidoc deleted file mode 100644 index 834ca55512..0000000000 --- a/docs/examples/guide/dd1a25d821d0c8deaeaa9c8083152a54.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ingest.processor_grok( - s: true -) -puts response ----- diff --git a/docs/examples/guide/dd3b263e9fa4226e59bedfc957d399d2.asciidoc b/docs/examples/guide/dd3b263e9fa4226e59bedfc957d399d2.asciidoc deleted file mode 100644 index 651a9aa8a2..0000000000 --- a/docs/examples/guide/dd3b263e9fa4226e59bedfc957d399d2.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'txt', - body: { - query: "SELECT * FROM library WHERE release_date < '2000-01-01'" - } -) -puts response ----- diff --git a/docs/examples/guide/dd4f051ab62f0507e3b6e3d6f333e85f.asciidoc b/docs/examples/guide/dd4f051ab62f0507e3b6e3d6f333e85f.asciidoc deleted file mode 100644 index 23a2e4fdb8..0000000000 --- a/docs/examples/guide/dd4f051ab62f0507e3b6e3d6f333e85f.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_component_template -puts response ----- diff --git a/docs/examples/guide/dd792bb53703a57f9207e36d16e26255.asciidoc b/docs/examples/guide/dd792bb53703a57f9207e36d16e26255.asciidoc deleted file mode 100644 index 4649aa5695..0000000000 --- a/docs/examples/guide/dd792bb53703a57f9207e36d16e26255.asciidoc +++ /dev/null @@ -1,64 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-index-000001', - refresh: true, - body: [ - { - index: {} - }, - { - timestamp: 1_516_729_294_000, - temperature: 200, - voltage: 5.2, - node: 'a' - }, - { - index: {} - }, - { - timestamp: 1_516_642_894_000, - temperature: 201, - voltage: 5.8, - node: 'b' - }, - { - index: {} - }, - { - timestamp: 1_516_556_494_000, - temperature: 202, - voltage: 5.1, - node: 'a' - }, - { - index: {} - }, - { - timestamp: 1_516_470_094_000, - temperature: 198, - voltage: 5.6, - node: 'b' - }, - { - index: {} - }, - { - timestamp: 1_516_383_694_000, - temperature: 200, - voltage: 4.2, - node: 'c' - }, - { - index: {} - }, - { - timestamp: 1_516_297_294_000, - temperature: 202, - voltage: 4, - node: 'c' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/dda949d20d07a9edbe64cefc623df945.asciidoc b/docs/examples/guide/dda949d20d07a9edbe64cefc623df945.asciidoc deleted file mode 100644 index 37271e8185..0000000000 --- a/docs/examples/guide/dda949d20d07a9edbe64cefc623df945.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my_test_scores', - body: { - properties: { - total_score: { - type: 'long' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ddf56782ecc7eaeb3115e150c4830013.asciidoc b/docs/examples/guide/ddf56782ecc7eaeb3115e150c4830013.asciidoc deleted file mode 100644 index 89fdf01371..0000000000 --- a/docs/examples/guide/ddf56782ecc7eaeb3115e150c4830013.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'my-index-000001', - body: { - slice: { - id: 0, - max: 2 - }, - script: { - source: "ctx._source['extra'] = 'test'" - } - } -) -puts response - -response = client.update_by_query( - index: 'my-index-000001', - body: { - slice: { - id: 1, - max: 2 - }, - script: { - source: "ctx._source['extra'] = 'test'" - } - } -) -puts response ----- diff --git a/docs/examples/guide/de139866a220124360e5e27d1a736ea4.asciidoc b/docs/examples/guide/de139866a220124360e5e27d1a736ea4.asciidoc deleted file mode 100644 index 20620e085a..0000000000 --- a/docs/examples/guide/de139866a220124360e5e27d1a736ea4.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - term: { - product: 'chocolate' - } - }, - sort: [ - { - 'offer.price' => { - mode: 'avg', - order: 'asc', - nested: { - path: 'offer', - filter: { - term: { - 'offer.color' => 'blue' - } - } - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/de2f59887737de3a27716177b60393a2.asciidoc b/docs/examples/guide/de2f59887737de3a27716177b60393a2.asciidoc deleted file mode 100644 index 1869546859..0000000000 --- a/docs/examples/guide/de2f59887737de3a27716177b60393a2.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - index: 'analyze_sample', - body: { - field: 'obj1.field1', - text: 'this is a test' - } -) -puts response ----- diff --git a/docs/examples/guide/de876505acc75d371d1f6f484c449197.asciidoc b/docs/examples/guide/de876505acc75d371d1f6f484c449197.asciidoc deleted file mode 100644 index 3556e3f30a..0000000000 --- a/docs/examples/guide/de876505acc75d371d1f6f484c449197.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - settings: { - 'index.write.wait_for_active_shards' => '2' - } - } -) -puts response ----- diff --git a/docs/examples/guide/dea22bb4997e368950f0fc80f2a5f304.asciidoc b/docs/examples/guide/dea22bb4997e368950f0fc80f2a5f304.asciidoc deleted file mode 100644 index af964c58ee..0000000000 --- a/docs/examples/guide/dea22bb4997e368950f0fc80f2a5f304.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_field_mapping( - index: 'my-index-000001', - fields: 'employee-id' -) -puts response ----- diff --git a/docs/examples/guide/dea4ac54c63a10c62eccd7b7f6543b86.asciidoc b/docs/examples/guide/dea4ac54c63a10c62eccd7b7f6543b86.asciidoc deleted file mode 100644 index f2e1dfb22a..0000000000 --- a/docs/examples/guide/dea4ac54c63a10c62eccd7b7f6543b86.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'place', - id: 1, - body: { - suggest: { - input: [ - "timmy's", - 'starbucks', - 'dunkin donuts' - ], - contexts: { - place_type: [ - 'cafe', - 'food' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/dead0682932ea6ec33c1197017bcb209.asciidoc b/docs/examples/guide/dead0682932ea6ec33c1197017bcb209.asciidoc deleted file mode 100644 index 7a005bd91f..0000000000 --- a/docs/examples/guide/dead0682932ea6ec33c1197017bcb209.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_bounding_box: { - 'pin.location' => { - top_left: 'dr5r9ydj2y73', - bottom_right: 'drj7teegpus6' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/dec2af498a7e5892e8fcd09ae779c8f0.asciidoc b/docs/examples/guide/dec2af498a7e5892e8fcd09ae779c8f0.asciidoc deleted file mode 100644 index 6dc46a186f..0000000000 --- a/docs/examples/guide/dec2af498a7e5892e8fcd09ae779c8f0.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'ip_addresses', - body: { - size: 0, - aggregations: { - ip_ranges: { - ip_range: { - field: 'ip', - ranges: [ - { - mask: '10.0.0.0/25' - }, - { - mask: '10.0.0.127/25' - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/df04e2e9af66d5e30b1bfdbd458cab13.asciidoc b/docs/examples/guide/df04e2e9af66d5e30b1bfdbd458cab13.asciidoc deleted file mode 100644 index 87cba82005..0000000000 --- a/docs/examples/guide/df04e2e9af66d5e30b1bfdbd458cab13.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodes( - v: true, - h: 'heap.max' -) -puts response ----- diff --git a/docs/examples/guide/df0d27d3abd286b75aef7ddcf0e6c66c.asciidoc b/docs/examples/guide/df0d27d3abd286b75aef7ddcf0e6c66c.asciidoc deleted file mode 100644 index 528a58bf74..0000000000 --- a/docs/examples/guide/df0d27d3abd286b75aef7ddcf0e6c66c.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - index: { - analysis: { - analyzer: { - my_synonyms: { - tokenizer: 'whitespace', - filter: [ - 'synonym' - ] - } - }, - filter: { - synonym: { - type: 'synonym_graph', - synonyms_path: 'analysis/synonym.txt', - updateable: true - } - } - } - } - }, - mappings: { - properties: { - text: { - type: 'text', - analyzer: 'standard', - search_analyzer: 'my_synonyms' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/df103a3df9b353357e72f9180ef421a1.asciidoc b/docs/examples/guide/df103a3df9b353357e72f9180ef421a1.asciidoc deleted file mode 100644 index 99b107460c..0000000000 --- a/docs/examples/guide/df103a3df9b353357e72f9180ef421a1.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - genres: { - rare_terms: { - field: 'genre', - include: 'swi*', - exclude: 'electro*' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/df1336e768fb6fc1826a5afa30a57285.asciidoc b/docs/examples/guide/df1336e768fb6fc1826a5afa30a57285.asciidoc deleted file mode 100644 index 35589a0a25..0000000000 --- a/docs/examples/guide/df1336e768fb6fc1826a5afa30a57285.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-data-stream', - body: { - "@timestamp": '2099-03-08T11:06:07.000Z', - user: { - id: '8a4f500d' - }, - message: 'Login successful' - } -) -puts response ----- diff --git a/docs/examples/guide/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc b/docs/examples/guide/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc deleted file mode 100644 index d6d23c72a5..0000000000 --- a/docs/examples/guide/df34c8ebaaa59a3ee0e3f28e2443bc30.asciidoc +++ /dev/null @@ -1,84 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index', - body: { - mappings: { - properties: { - comments: { - type: 'nested' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index', - id: 1, - refresh: true, - body: { - comments: [ - { - author: 'kimchy' - } - ] - } -) -puts response - -response = client.index( - index: 'my-index', - id: 2, - refresh: true, - body: { - comments: [ - { - author: 'kimchy' - }, - { - author: 'nik9000' - } - ] - } -) -puts response - -response = client.index( - index: 'my-index', - id: 3, - refresh: true, - body: { - comments: [ - { - author: 'nik9000' - } - ] - } -) -puts response - -response = client.search( - index: 'my-index', - body: { - query: { - nested: { - path: 'comments', - query: { - bool: { - must_not: [ - { - term: { - 'comments.author' => 'nik9000' - } - } - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/df7ed126d8c92ddd3655c59ce4f305c9.asciidoc b/docs/examples/guide/df7ed126d8c92ddd3655c59ce4f305c9.asciidoc deleted file mode 100644 index f1fcdb904c..0000000000 --- a/docs/examples/guide/df7ed126d8c92ddd3655c59ce4f305c9.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.thread_pool( - thread_pool_patterns: 'generic', - v: true, - h: 'id,name,active,rejected,completed' -) -puts response ----- diff --git a/docs/examples/guide/df8271648f547673007ecd778341bfc9.asciidoc b/docs/examples/guide/df8271648f547673007ecd778341bfc9.asciidoc deleted file mode 100644 index 430bbd5b72..0000000000 --- a/docs/examples/guide/df8271648f547673007ecd778341bfc9.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'mv', - body: { - mappings: { - properties: { - b: { - type: 'keyword' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'mv', - refresh: true, - body: [ - { - index: {} - }, - { - a: 1, - b: [ - 'foo', - 'foo', - 'bar' - ] - }, - { - index: {} - }, - { - a: 2, - b: [ - 'bar', - 'bar' - ] - } - ] -) -puts response - -response = client.esql.query( - body: { - query: 'FROM mv | LIMIT 2', - version: '2024.04.01' - } -) -puts response ----- diff --git a/docs/examples/guide/df82a9cb21a7557f3ddba2509f76f608.asciidoc b/docs/examples/guide/df82a9cb21a7557f3ddba2509f76f608.asciidoc deleted file mode 100644 index f1bd6582ed..0000000000 --- a/docs/examples/guide/df82a9cb21a7557f3ddba2509f76f608.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'fingerprint' - ], - text: 'zebra jumps over resting resting dog' - } -) -puts response ----- diff --git a/docs/examples/guide/dfa16b7300d225e013f23625f44c087b.asciidoc b/docs/examples/guide/dfa16b7300d225e013f23625f44c087b.asciidoc deleted file mode 100644 index 3e5d5105bf..0000000000 --- a/docs/examples/guide/dfa16b7300d225e013f23625f44c087b.asciidoc +++ /dev/null @@ -1,65 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index', - body: { - settings: { - number_of_shards: 1, - similarity: { - scripted_tfidf: { - type: 'scripted', - script: { - source: 'double tf = Math.sqrt(doc.freq); double idf = Math.log((field.docCount+1.0)/(term.docFreq+1.0)) + 1.0; double norm = 1/Math.sqrt(doc.length); return query.boost * tf * idf * norm;' - } - } - } - }, - mappings: { - properties: { - field: { - type: 'text', - similarity: 'scripted_tfidf' - } - } - } - } -) -puts response - -response = client.index( - index: 'index', - id: 1, - body: { - field: 'foo bar foo' - } -) -puts response - -response = client.index( - index: 'index', - id: 2, - body: { - field: 'bar baz' - } -) -puts response - -response = client.indices.refresh( - index: 'index' -) -puts response - -response = client.search( - index: 'index', - explain: true, - body: { - query: { - query_string: { - query: 'foo^1.7', - default_field: 'field' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/dfa75000edf4b960ed9002595a051871.asciidoc b/docs/examples/guide/dfa75000edf4b960ed9002595a051871.asciidoc deleted file mode 100644 index 9d81ac3a80..0000000000 --- a/docs/examples/guide/dfa75000edf4b960ed9002595a051871.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ilm.stop -puts response ----- diff --git a/docs/examples/guide/dfb20907cfc5ac520ea3b1dba5f00811.asciidoc b/docs/examples/guide/dfb20907cfc5ac520ea3b1dba5f00811.asciidoc deleted file mode 100644 index 8f789c07f9..0000000000 --- a/docs/examples/guide/dfb20907cfc5ac520ea3b1dba5f00811.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: '.watcher-history*', - body: { - sort: [ - { - 'result.execution_time' => 'desc' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/dfb641d2d3155669ad6fb5a424dabf4f.asciidoc b/docs/examples/guide/dfb641d2d3155669ad6fb5a424dabf4f.asciidoc deleted file mode 100644 index 9880df0244..0000000000 --- a/docs/examples/guide/dfb641d2d3155669ad6fb5a424dabf4f.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.ilm.get_status -puts response ----- diff --git a/docs/examples/guide/dfbf53781adc6640493d49931a352167.asciidoc b/docs/examples/guide/dfbf53781adc6640493d49931a352167.asciidoc deleted file mode 100644 index 4e321c8efa..0000000000 --- a/docs/examples/guide/dfbf53781adc6640493d49931a352167.asciidoc +++ /dev/null @@ -1,44 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - enabled: false - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'session_1', - body: { - user_id: 'kimchy', - session_data: { - arbitrary_object: { - some_array: [ - 'foo', - 'bar', - { - baz: 2 - } - ] - } - }, - last_updated: '2015-12-06T18:20:22' - } -) -puts response - -response = client.get( - index: 'my-index-000001', - id: 'session_1' -) -puts response - -response = client.indices.get_mapping( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/dfcc83efefaddccfe5dce0695c2266ef.asciidoc b/docs/examples/guide/dfcc83efefaddccfe5dce0695c2266ef.asciidoc deleted file mode 100644 index 6ca9d63c83..0000000000 --- a/docs/examples/guide/dfcc83efefaddccfe5dce0695c2266ef.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - "obj1": { - type: 'nested' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/dfdf82b8d99436582f150117695190b3.asciidoc b/docs/examples/guide/dfdf82b8d99436582f150117695190b3.asciidoc deleted file mode 100644 index d22bd4f8f9..0000000000 --- a/docs/examples/guide/dfdf82b8d99436582f150117695190b3.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'child_example', - id: 1, - body: { - join: { - name: 'question' - }, - body: 'I have Windows 2003 server and i bought a new Windows 2008 server...', - title: 'Whats the best way to file transfer my site from server to a newer one?', - tags: [ - 'windows-server-2003', - 'windows-server-2008', - 'file-transfer' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/dff61a76d5ef9ca8cbe59a416269a84b.asciidoc b/docs/examples/guide/dff61a76d5ef9ca8cbe59a416269a84b.asciidoc deleted file mode 100644 index edfa1fda99..0000000000 --- a/docs/examples/guide/dff61a76d5ef9ca8cbe59a416269a84b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ingest.delete_pipeline( - id: 'my-pipeline-id' -) -puts response ----- diff --git a/docs/examples/guide/e04c55476de6e785a066d3b43f66d20d.asciidoc b/docs/examples/guide/e04c55476de6e785a066d3b43f66d20d.asciidoc deleted file mode 100644 index bb2bfef424..0000000000 --- a/docs/examples/guide/e04c55476de6e785a066d3b43f66d20d.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index', - body: { - query: { - bool: { - should: [ - { - text_expansion: { - content_embedding: { - model_text: 'How to avoid muscle soreness after running?', - model_id: '.elser_model_2', - boost: 1 - } - } - }, - { - query_string: { - query: 'toxins', - boost: 4 - } - } - ] - } - }, - min_score: 10 - } -) -puts response ----- diff --git a/docs/examples/guide/e0734215054e1ff5df712ce3a826cdba.asciidoc b/docs/examples/guide/e0734215054e1ff5df712ce3a826cdba.asciidoc deleted file mode 100644 index c3b1dfaaa7..0000000000 --- a/docs/examples/guide/e0734215054e1ff5df712ce3a826cdba.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete( - index: 'my-index' -) -puts response - -response = client.indices.delete_data_stream( - name: 'logs-my_app-default' -) -puts response ----- diff --git a/docs/examples/guide/e08fb1435dc659c24badf25b676efb68.asciidoc b/docs/examples/guide/e08fb1435dc659c24badf25b676efb68.asciidoc deleted file mode 100644 index 9af2a591bb..0000000000 --- a/docs/examples/guide/e08fb1435dc659c24badf25b676efb68.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - body_text: { - type: 'text', - index_prefixes: {} - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e09d30195108bd6a1f6857394a6123ea.asciidoc b/docs/examples/guide/e09d30195108bd6a1f6857394a6123ea.asciidoc deleted file mode 100644 index 6dd6c18267..0000000000 --- a/docs/examples/guide/e09d30195108bd6a1f6857394a6123ea.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'reverse' - ], - text: 'quick fox jumps' - } -) -puts response ----- diff --git a/docs/examples/guide/e09ee13ce253c7892dd5ef076fbfbba5.asciidoc b/docs/examples/guide/e09ee13ce253c7892dd5ef076fbfbba5.asciidoc deleted file mode 100644 index 1b91d13673..0000000000 --- a/docs/examples/guide/e09ee13ce253c7892dd5ef076fbfbba5.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_custom_analyzer: { - tokenizer: 'standard', - filter: [ - 'keyword_repeat', - 'stemmer', - 'remove_duplicates' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e0a7c730ef0f22e3edffe9a254bc56e7.asciidoc b/docs/examples/guide/e0a7c730ef0f22e3edffe9a254bc56e7.asciidoc deleted file mode 100644 index 8481182d69..0000000000 --- a/docs/examples/guide/e0a7c730ef0f22e3edffe9a254bc56e7.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'my-index-000001', - slice: { - id: 0, - max: 2 - } - }, - dest: { - index: 'my-new-index-000001' - } - } -) -puts response - -response = client.reindex( - body: { - source: { - index: 'my-index-000001', - slice: { - id: 1, - max: 2 - } - }, - dest: { - index: 'my-new-index-000001' - } - } -) -puts response ----- diff --git a/docs/examples/guide/e0b2f56c34e33ff52f8f9658be2f7ca1.asciidoc b/docs/examples/guide/e0b2f56c34e33ff52f8f9658be2f7ca1.asciidoc deleted file mode 100644 index 2f67313815..0000000000 --- a/docs/examples/guide/e0b2f56c34e33ff52f8f9658be2f7ca1.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.stats( - index: 'index1,index2' -) -puts response ----- diff --git a/docs/examples/guide/e0bbfb368eae307e9508ab8d6e9cf23c.asciidoc b/docs/examples/guide/e0bbfb368eae307e9508ab8d6e9cf23c.asciidoc deleted file mode 100644 index dec7a75890..0000000000 --- a/docs/examples/guide/e0bbfb368eae307e9508ab8d6e9cf23c.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.fielddata( - v: true, - fields: 'body' -) -puts response ----- diff --git a/docs/examples/guide/e0fcef99656799de6b88117d56f131e2.asciidoc b/docs/examples/guide/e0fcef99656799de6b88117d56f131e2.asciidoc deleted file mode 100644 index f4876210c4..0000000000 --- a/docs/examples/guide/e0fcef99656799de6b88117d56f131e2.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.explain( - index: 'my-index-000001', - id: 0, - body: { - query: { - match: { - message: 'elasticsearch' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e12f2d2ddca387630e7855a6db952da2.asciidoc b/docs/examples/guide/e12f2d2ddca387630e7855a6db952da2.asciidoc deleted file mode 100644 index 2147370c2b..0000000000 --- a/docs/examples/guide/e12f2d2ddca387630e7855a6db952da2.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - runtime_mappings: { - 'price.euros' => { - type: 'double', - script: { - source: "\n emit(doc['price'].value * params.conversion_rate)\n ", - params: { - conversion_rate: 0.835526591 - } - } - } - }, - aggregations: { - price_ranges: { - range: { - field: 'price.euros', - ranges: [ - { - to: 100 - }, - { - from: 100, - to: 200 - }, - { - from: 200 - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e14a5a5a1c880031486bfff43031fa3a.asciidoc b/docs/examples/guide/e14a5a5a1c880031486bfff43031fa3a.asciidoc deleted file mode 100644 index 0b508b55bf..0000000000 --- a/docs/examples/guide/e14a5a5a1c880031486bfff43031fa3a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - metric: 'breaker' -) -puts response ----- diff --git a/docs/examples/guide/e16a353e619b935c5c70769b1b9fa100.asciidoc b/docs/examples/guide/e16a353e619b935c5c70769b1b9fa100.asciidoc deleted file mode 100644 index 0e11ca94cb..0000000000 --- a/docs/examples/guide/e16a353e619b935c5c70769b1b9fa100.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - aggregations: { - my_buckets: { - composite: { - sources: [ - { - tile: { - geotile_grid: { - field: 'location', - precision: 8 - } - } - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e194e9cbe3eb2305f4f7cdda0cf529bd.asciidoc b/docs/examples/guide/e194e9cbe3eb2305f4f7cdda0cf529bd.asciidoc deleted file mode 100644 index 9d190ca918..0000000000 --- a/docs/examples/guide/e194e9cbe3eb2305f4f7cdda0cf529bd.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - typed_keys: true, - body: { - suggest: { - text: 'some test mssage', - "my-first-suggester": { - term: { - field: 'message' - } - }, - "my-second-suggester": { - phrase: { - field: 'message' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e19f5e3724d9f3f36a817b9a811ca42e.asciidoc b/docs/examples/guide/e19f5e3724d9f3f36a817b9a811ca42e.asciidoc deleted file mode 100644 index b7d140fe5c..0000000000 --- a/docs/examples/guide/e19f5e3724d9f3f36a817b9a811ca42e.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - my_date_histo: { - date_histogram: { - field: 'timestamp', - calendar_interval: 'day' - }, - aggregations: { - the_sum: { - sum: { - field: 'lemmings' - } - }, - the_deriv: { - derivative: { - buckets_path: 'the_sum' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e1d6ecab4148b09f4c605474157e7dbd.asciidoc b/docs/examples/guide/e1d6ecab4148b09f4c605474157e7dbd.asciidoc deleted file mode 100644 index 68899c69be..0000000000 --- a/docs/examples/guide/e1d6ecab4148b09f4c605474157e7dbd.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_settings( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/e1f6ea7c0937cf7e6ea7e8209e52e8bb.asciidoc b/docs/examples/guide/e1f6ea7c0937cf7e6ea7e8209e52e8bb.asciidoc deleted file mode 100644 index f5815cd34d..0000000000 --- a/docs/examples/guide/e1f6ea7c0937cf7e6ea7e8209e52e8bb.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'events', - body: { - size: 10, - sort: [ - { - timestamp: 'desc' - } - ], - track_total_hits: false - } -) -puts response ----- diff --git a/docs/examples/guide/e20037f66bf54bcac7d10f536f031f34.asciidoc b/docs/examples/guide/e20037f66bf54bcac7d10f536f031f34.asciidoc deleted file mode 100644 index b811337269..0000000000 --- a/docs/examples/guide/e20037f66bf54bcac7d10f536f031f34.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - 'index.blocks.read_only_allow_delete' => nil - } -) -puts response ----- diff --git a/docs/examples/guide/e26c96978096ccc592849cca9db67ffc.asciidoc b/docs/examples/guide/e26c96978096ccc592849cca9db67ffc.asciidoc deleted file mode 100644 index 4e09f775fd..0000000000 --- a/docs/examples/guide/e26c96978096ccc592849cca9db67ffc.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - 'index.requests.cache.enable' => true - } -) -puts response ----- diff --git a/docs/examples/guide/e26e8bfa68aa4ab265b22304c38c3aef.asciidoc b/docs/examples/guide/e26e8bfa68aa4ab265b22304c38c3aef.asciidoc deleted file mode 100644 index 50f5d6690c..0000000000 --- a/docs/examples/guide/e26e8bfa68aa4ab265b22304c38c3aef.asciidoc +++ /dev/null @@ -1,89 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'sample_data', - body: { - mappings: { - properties: { - client_ip: { - type: 'ip' - }, - message: { - type: 'keyword' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'sample_data', - body: [ - { - index: {} - }, - { - "@timestamp": '2023-10-23T12:15:03.360Z', - client_ip: '172.21.2.162', - message: 'Connected to 10.1.0.3', - event_duration: 3_450_233 - }, - { - index: {} - }, - { - "@timestamp": '2023-10-23T12:27:28.948Z', - client_ip: '172.21.2.113', - message: 'Connected to 10.1.0.2', - event_duration: 2_764_889 - }, - { - index: {} - }, - { - "@timestamp": '2023-10-23T13:33:34.937Z', - client_ip: '172.21.0.5', - message: 'Disconnected', - event_duration: 1_232_382 - }, - { - index: {} - }, - { - "@timestamp": '2023-10-23T13:51:54.732Z', - client_ip: '172.21.3.15', - message: 'Connection error', - event_duration: 725_448 - }, - { - index: {} - }, - { - "@timestamp": '2023-10-23T13:52:55.015Z', - client_ip: '172.21.3.15', - message: 'Connection error', - event_duration: 8_268_153 - }, - { - index: {} - }, - { - "@timestamp": '2023-10-23T13:53:55.832Z', - client_ip: '172.21.3.15', - message: 'Connection error', - event_duration: 5_033_755 - }, - { - index: {} - }, - { - "@timestamp": '2023-10-23T13:55:01.543Z', - client_ip: '172.21.3.15', - message: 'Connected to 10.1.0.1', - event_duration: 1_756_467 - } - ] -) -puts response ----- diff --git a/docs/examples/guide/e270f3f721a5712cd11a5ca03554f5b0.asciidoc b/docs/examples/guide/e270f3f721a5712cd11a5ca03554f5b0.asciidoc deleted file mode 100644 index b9a5fb84ff..0000000000 --- a/docs/examples/guide/e270f3f721a5712cd11a5ca03554f5b0.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - multi_match: { - query: 'Will Smith', - type: 'best_fields', - fields: [ - 'first_name', - 'last_name' - ], - operator: 'and' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e273060a675c959fd5f3cde27c8aff07.asciidoc b/docs/examples/guide/e273060a675c959fd5f3cde27c8aff07.asciidoc deleted file mode 100644 index a8c9bc1f24..0000000000 --- a/docs/examples/guide/e273060a675c959fd5f3cde27c8aff07.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'index', - body: { - mappings: { - properties: { - foo: { - type: 'integer', - index: false - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e2750d69bcb6d4c7e16e704cd0fb3530.asciidoc b/docs/examples/guide/e2750d69bcb6d4c7e16e704cd0fb3530.asciidoc deleted file mode 100644 index 397248fca8..0000000000 --- a/docs/examples/guide/e2750d69bcb6d4c7e16e704cd0fb3530.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - mappings: { - properties: { - pagerank: { - type: 'rank_feature' - }, - url_length: { - type: 'rank_feature', - positive_score_impact: false - }, - topics: { - type: 'rank_features' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e2883c88b5ceca9fce1e70e716d80025.asciidoc b/docs/examples/guide/e2883c88b5ceca9fce1e70e716d80025.asciidoc deleted file mode 100644 index 3193b7e8eb..0000000000 --- a/docs/examples/guide/e2883c88b5ceca9fce1e70e716d80025.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - my_version: { - type: 'version' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e2a22c6fd58cc0becf4c383134a08f8b.asciidoc b/docs/examples/guide/e2a22c6fd58cc0becf4c383134a08f8b.asciidoc deleted file mode 100644 index ce403423e8..0000000000 --- a/docs/examples/guide/e2a22c6fd58cc0becf4c383134a08f8b.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - intervals: { - my_text: { - match: { - query: 'salty', - filter: { - contained_by: { - match: { - query: 'hot porridge' - } - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e2a753029b450942a3228e3003a55a7d.asciidoc b/docs/examples/guide/e2a753029b450942a3228e3003a55a7d.asciidoc deleted file mode 100644 index 7591a7ad90..0000000000 --- a/docs/examples/guide/e2a753029b450942a3228e3003a55a7d.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_data_lifecycle( - name: 'my-weather-sensor-data-stream', - body: { - downsampling: [ - { - after: '1d', - fixed_interval: '10m' - }, - { - after: '7d', - fixed_interval: '1d' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/e2a7d127b82ddebb690a959dcd0cbc09.asciidoc b/docs/examples/guide/e2a7d127b82ddebb690a959dcd0cbc09.asciidoc deleted file mode 100644 index b5411de02e..0000000000 --- a/docs/examples/guide/e2a7d127b82ddebb690a959dcd0cbc09.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'elision_example', - body: { - settings: { - analysis: { - analyzer: { - whitespace_elision: { - tokenizer: 'whitespace', - filter: [ - 'elision' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e2b4867a9f72bda87ebaa3608d3fba4c.asciidoc b/docs/examples/guide/e2b4867a9f72bda87ebaa3608d3fba4c.asciidoc deleted file mode 100644 index f384a25852..0000000000 --- a/docs/examples/guide/e2b4867a9f72bda87ebaa3608d3fba4c.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: { - query: { - range: { - 'user.effective.date' => { - gte: '{{date.min}}', - lte: '{{date.max}}', - format: "{{#join delimiter='||'}}date.formats{{/join delimiter='||'}}" - } - } - } - }, - params: { - date: { - min: '2098', - max: '06/05/2099', - formats: [ - 'dd/MM/yyyy', - 'yyyy' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e2bcc8f4ed2b4de82729e7a5a7c8f634.asciidoc b/docs/examples/guide/e2bcc8f4ed2b4de82729e7a5a7c8f634.asciidoc deleted file mode 100644 index b7ffe68064..0000000000 --- a/docs/examples/guide/e2bcc8f4ed2b4de82729e7a5a7c8f634.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.synonyms.get_synonyms_sets -puts response ----- diff --git a/docs/examples/guide/e2d8cf24a12053eb09fec7087cdab43a.asciidoc b/docs/examples/guide/e2d8cf24a12053eb09fec7087cdab43a.asciidoc deleted file mode 100644 index 33eac56105..0000000000 --- a/docs/examples/guide/e2d8cf24a12053eb09fec7087cdab43a.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - }, - percent_of_total_sales: { - normalize: { - buckets_path: 'sales', - method: 'percent_of_sum', - format: '00.00%' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e30ea6e3823a139d7693d8cce1920a06.asciidoc b/docs/examples/guide/e30ea6e3823a139d7693d8cce1920a06.asciidoc deleted file mode 100644 index 45eb385abe..0000000000 --- a/docs/examples/guide/e30ea6e3823a139d7693d8cce1920a06.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - multi_match: { - query: 'this is a test', - fields: [ - 'subject^3', - 'message' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e316271f668c9889bf548311fb421f1e.asciidoc b/docs/examples/guide/e316271f668c9889bf548311fb421f1e.asciidoc deleted file mode 100644 index 6ea4673f99..0000000000 --- a/docs/examples/guide/e316271f668c9889bf548311fb421f1e.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - ip_addresses: { - terms: { - field: 'destination_ip', - missing: '0.0.0.0', - value_type: 'ip' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e317a8380dfbc76c4e7f23d0997b3518.asciidoc b/docs/examples/guide/e317a8380dfbc76c4e7f23d0997b3518.asciidoc deleted file mode 100644 index 36a1537d7e..0000000000 --- a/docs/examples/guide/e317a8380dfbc76c4e7f23d0997b3518.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'action.destructive_requires_name' => nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/e324ea1547635180c31c1adf77870ba2.asciidoc b/docs/examples/guide/e324ea1547635180c31c1adf77870ba2.asciidoc deleted file mode 100644 index 106e1b5a74..0000000000 --- a/docs/examples/guide/e324ea1547635180c31c1adf77870ba2.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'destination_template', - body: { - template: { - settings: { - index: { - number_of_replicas: 2, - number_of_shards: 2, - mode: 'time_series', - routing_path: [ - 'metricset' - ] - } - }, - mappings: { - properties: { - "@timestamp": { - type: 'date' - }, - metricset: { - type: 'keyword', - time_series_dimension: true - }, - "k8s": { - properties: { - tx: { - type: 'long' - }, - rx: { - type: 'long' - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e3678142aec988e2ff0ae5d934dc39e9.asciidoc b/docs/examples/guide/e3678142aec988e2ff0ae5d934dc39e9.asciidoc deleted file mode 100644 index 6a74bdc296..0000000000 --- a/docs/examples/guide/e3678142aec988e2ff0ae5d934dc39e9.asciidoc +++ /dev/null @@ -1,109 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - location: { - type: 'geo_point' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - text: 'Geopoint as an object using GeoJSON format', - location: { - type: 'Point', - coordinates: [ - -71.34, - 41.12 - ] - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - text: 'Geopoint as a WKT POINT primitive', - location: 'POINT (-71.34 41.12)' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 3, - body: { - text: "Geopoint as an object with 'lat' and 'lon' keys", - location: { - lat: 41.12, - lon: -71.34 - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 4, - body: { - text: 'Geopoint as an array', - location: [ - -71.34, - 41.12 - ] - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 5, - body: { - text: 'Geopoint as a string', - location: '41.12,-71.34' - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 6, - body: { - text: 'Geopoint as a geohash', - location: 'drm3btev3e86' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - geo_bounding_box: { - location: { - top_left: { - lat: 42, - lon: -72 - }, - bottom_right: { - lat: 40, - lon: -74 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e3a6462ca79c101314da0680c97678cd.asciidoc b/docs/examples/guide/e3a6462ca79c101314da0680c97678cd.asciidoc deleted file mode 100644 index b2018e2d16..0000000000 --- a/docs/examples/guide/e3a6462ca79c101314da0680c97678cd.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match_all: {} - }, - script_fields: { - "test1": { - script: { - lang: 'painless', - source: "doc['price'].value * 2" - } - }, - "test2": { - script: { - lang: 'painless', - source: "doc['price'].value * params.factor", - params: { - factor: 2 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e3b3a8ae12ab947ad3ba96eb228402ca.asciidoc b/docs/examples/guide/e3b3a8ae12ab947ad3ba96eb228402ca.asciidoc deleted file mode 100644 index 269fc6f98d..0000000000 --- a/docs/examples/guide/e3b3a8ae12ab947ad3ba96eb228402ca.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - 'index.store.preload' => [ - 'nvd', - 'dvd' - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/e3f2f6ee3e312b8a90634827ae954d70.asciidoc b/docs/examples/guide/e3f2f6ee3e312b8a90634827ae954d70.asciidoc deleted file mode 100644 index 5433a1f0cb..0000000000 --- a/docs/examples/guide/e3f2f6ee3e312b8a90634827ae954d70.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'GeometryCollection', - geometries: [ - { - type: 'Point', - coordinates: [ - 100, - 0 - ] - }, - { - type: 'LineString', - coordinates: [ - [ - 101, - 0 - ], - [ - 102, - 1 - ] - ] - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/e4193867485595c9c92f909a052d2a90.asciidoc b/docs/examples/guide/e4193867485595c9c92f909a052d2a90.asciidoc deleted file mode 100644 index 8c99116f86..0000000000 --- a/docs/examples/guide/e4193867485595c9c92f909a052d2a90.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - "my-join-field": { - type: 'join', - relations: { - parent: 'child' - } - }, - tag: { - type: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e41a9bac42d0c1cb103674ae9039b7af.asciidoc b/docs/examples/guide/e41a9bac42d0c1cb103674ae9039b7af.asciidoc deleted file mode 100644 index b0ac027a37..0000000000 --- a/docs/examples/guide/e41a9bac42d0c1cb103674ae9039b7af.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - numeric_detection: true - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - my_float: '1.0', - my_integer: '1' - } -) -puts response ----- diff --git a/docs/examples/guide/e441cb3be3c2f007621ee1f8c9a2e0ef.asciidoc b/docs/examples/guide/e441cb3be3c2f007621ee1f8c9a2e0ef.asciidoc deleted file mode 100644 index 4cb6e32333..0000000000 --- a/docs/examples/guide/e441cb3be3c2f007621ee1f8c9a2e0ef.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - statistics: { - matrix_stats: { - fields: [ - 'poverty', - 'income' - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e451900efbd8be50c2b8347a83816aa6.asciidoc b/docs/examples/guide/e451900efbd8be50c2b8347a83816aa6.asciidoc deleted file mode 100644 index 96356d52bd..0000000000 --- a/docs/examples/guide/e451900efbd8be50c2b8347a83816aa6.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - } - } - }, - stats_monthly_sales: { - extended_stats_bucket: { - buckets_path: 'sales_per_month>sales' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e46c83db1580e14be844079cd008f518.asciidoc b/docs/examples/guide/e46c83db1580e14be844079cd008f518.asciidoc deleted file mode 100644 index 363ef500ed..0000000000 --- a/docs/examples/guide/e46c83db1580e14be844079cd008f518.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - index: { - 'routing.allocation.enable' => 'all' - } - } -) -puts response ----- diff --git a/docs/examples/guide/e47a71a2e314dbbee5db8142a23957ce.asciidoc b/docs/examples/guide/e47a71a2e314dbbee5db8142a23957ce.asciidoc deleted file mode 100644 index 239fcde893..0000000000 --- a/docs/examples/guide/e47a71a2e314dbbee5db8142a23957ce.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - processors: [ - { - set: { - description: "Index the ingest timestamp as 'event.ingested'", - field: 'event.ingested', - value: '{{{_ingest.timestamp}}}' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/e48e7da65c2b32d724fd7e3bfa175c6f.asciidoc b/docs/examples/guide/e48e7da65c2b32d724fd7e3bfa175c6f.asciidoc deleted file mode 100644 index ac6601c60a..0000000000 --- a/docs/examples/guide/e48e7da65c2b32d724fd7e3bfa175c6f.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_overall_buckets( - job_id: 'job-*', - body: { - overall_score: 80, - start: '1403532000000' - } -) -puts response ----- diff --git a/docs/examples/guide/e4b2b5e0aaedf3cbbcde3d61eb1f13fc.asciidoc b/docs/examples/guide/e4b2b5e0aaedf3cbbcde3d61eb1f13fc.asciidoc deleted file mode 100644 index bab7c49008..0000000000 --- a/docs/examples/guide/e4b2b5e0aaedf3cbbcde3d61eb1f13fc.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'test', - id: 4, - refresh: 'wait_for', - body: { - test: 'test' - } -) -puts response ----- diff --git a/docs/examples/guide/e4b6a6a921c97b4c0bbe97bd89f4cf33.asciidoc b/docs/examples/guide/e4b6a6a921c97b4c0bbe97bd89f4cf33.asciidoc deleted file mode 100644 index 48a96ce8e4..0000000000 --- a/docs/examples/guide/e4b6a6a921c97b4c0bbe97bd89f4cf33.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.promote_data_stream( - name: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/e4be53736bcc02b03068fd72fdbfe271.asciidoc b/docs/examples/guide/e4be53736bcc02b03068fd72fdbfe271.asciidoc deleted file mode 100644 index 486f9af387..0000000000 --- a/docs/examples/guide/e4be53736bcc02b03068fd72fdbfe271.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'publications', - body: { - properties: { - title: { - type: 'text' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e4d1f01c025fb797a1d87f372760eabf.asciidoc b/docs/examples/guide/e4d1f01c025fb797a1d87f372760eabf.asciidoc deleted file mode 100644 index 143ab2ffcc..0000000000 --- a/docs/examples/guide/e4d1f01c025fb797a1d87f372760eabf.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.tasks.list( - human: true, - detailed: true -) -puts response ----- diff --git a/docs/examples/guide/e4de6035653e8202c43631f02d244661.asciidoc b/docs/examples/guide/e4de6035653e8202c43631f02d244661.asciidoc deleted file mode 100644 index 1b553355f5..0000000000 --- a/docs/examples/guide/e4de6035653e8202c43631f02d244661.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'cluster_one:my-index-000001', - body: { - size: 1, - query: { - match: { - 'user.id' => 'kimchy' - } - }, - _source: [ - 'user.id', - 'message', - 'http.response.status_code' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/e51a86b666f447cda5f634547a8e1a4a.asciidoc b/docs/examples/guide/e51a86b666f447cda5f634547a8e1a4a.asciidoc deleted file mode 100644 index 5b7b69ff48..0000000000 --- a/docs/examples/guide/e51a86b666f447cda5f634547a8e1a4a.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.create_data_stream( - name: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/e551ea38a2d8f8deac110b33304200cc.asciidoc b/docs/examples/guide/e551ea38a2d8f8deac110b33304200cc.asciidoc deleted file mode 100644 index 33b81209a1..0000000000 --- a/docs/examples/guide/e551ea38a2d8f8deac110b33304200cc.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index', - body: { - query: { - multi_match: { - fields: [ - 'title', - 'content' - ], - query: 'the quick brown fox' - } - }, - rescore: { - learning_to_rank: { - model_id: 'ltr-model', - params: { - query_text: 'the quick brown fox' - } - }, - window_size: 100 - } - } -) -puts response ----- diff --git a/docs/examples/guide/e566e898902e432bc7ea0568400f0c50.asciidoc b/docs/examples/guide/e566e898902e432bc7ea0568400f0c50.asciidoc deleted file mode 100644 index 2527c8c20f..0000000000 --- a/docs/examples/guide/e566e898902e432bc7ea0568400f0c50.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - ip: { - type: 'ip' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - ip: [ - '192.168.0.1', - '192.168.0.1', - '10.10.12.123', - '2001:db8::1:0:0:1', - '::afff:4567:890a' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/e586d1d2a997133e039fd352a42a72b3.asciidoc b/docs/examples/guide/e586d1d2a997133e039fd352a42a72b3.asciidoc deleted file mode 100644 index e549e58664..0000000000 --- a/docs/examples/guide/e586d1d2a997133e039fd352a42a72b3.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'job-candidates', - body: { - query: { - terms_set: { - programming_languages: { - terms: [ - 'c++', - 'java', - 'php' - ], - minimum_should_match_field: 'required_matches' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e58833449d01379df20ad06dc28144d8.asciidoc b/docs/examples/guide/e58833449d01379df20ad06dc28144d8.asciidoc deleted file mode 100644 index 54247101db..0000000000 --- a/docs/examples/guide/e58833449d01379df20ad06dc28144d8.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.update_by_query( - index: 'my-index-000001', - conflicts: 'proceed', - body: { - query: { - term: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e58b7965c3a314c34bc444c6db3b1b79.asciidoc b/docs/examples/guide/e58b7965c3a314c34bc444c6db3b1b79.asciidoc deleted file mode 100644 index d744bf8b22..0000000000 --- a/docs/examples/guide/e58b7965c3a314c34bc444c6db3b1b79.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_settings( - index: 'my-index-000001', - name: 'index.routing.allocation.enable', - flat_settings: true -) -puts response ----- diff --git a/docs/examples/guide/e5901f48eb8a419b878fc2cb815d8691.asciidoc b/docs/examples/guide/e5901f48eb8a419b878fc2cb815d8691.asciidoc deleted file mode 100644 index f0edf74839..0000000000 --- a/docs/examples/guide/e5901f48eb8a419b878fc2cb815d8691.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'indices.recovery.max_bytes_per_sec' => '50mb' - } - } -) -puts response ----- diff --git a/docs/examples/guide/e5c710b08a545522d50b4ce35503bc46.asciidoc b/docs/examples/guide/e5c710b08a545522d50b4ce35503bc46.asciidoc deleted file mode 100644 index 79a209aa9c..0000000000 --- a/docs/examples/guide/e5c710b08a545522d50b4ce35503bc46.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-data-stream', - pipeline: 'my-pipeline', - body: { - "@timestamp": '2099-03-07T11:04:05.000Z', - "my-keyword-field": 'foo' - } -) -puts response - -response = client.bulk( - index: 'my-data-stream', - pipeline: 'my-pipeline', - body: [ - { - create: {} - }, - { - "@timestamp": '2099-03-07T11:04:06.000Z', - "my-keyword-field": 'foo' - }, - { - create: {} - }, - { - "@timestamp": '2099-03-07T11:04:07.000Z', - "my-keyword-field": 'bar' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/e5f89a04f50df707a0a53ec0f2eecbbd.asciidoc b/docs/examples/guide/e5f89a04f50df707a0a53ec0f2eecbbd.asciidoc deleted file mode 100644 index bbf9b0745f..0000000000 --- a/docs/examples/guide/e5f89a04f50df707a0a53ec0f2eecbbd.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'my-index-000001', - id: 0, - _source_includes: '*.id', - _source_excludes: 'entities' -) -puts response ----- diff --git a/docs/examples/guide/e5f8f83df37ab2296dc4bfed95d7aba7.asciidoc b/docs/examples/guide/e5f8f83df37ab2296dc4bfed95d7aba7.asciidoc deleted file mode 100644 index a152187d74..0000000000 --- a/docs/examples/guide/e5f8f83df37ab2296dc4bfed95d7aba7.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.enable' => 'all' - } - } -) -puts response ----- diff --git a/docs/examples/guide/e608cd0c034f6c245ea87f425e09ce2f.asciidoc b/docs/examples/guide/e608cd0c034f6c245ea87f425e09ce2f.asciidoc deleted file mode 100644 index 3a0410df15..0000000000 --- a/docs/examples/guide/e608cd0c034f6c245ea87f425e09ce2f.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - span_term: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e60c2bf89fdf38187709d04dd1c55330.asciidoc b/docs/examples/guide/e60c2bf89fdf38187709d04dd1c55330.asciidoc deleted file mode 100644 index 502a05e6d3..0000000000 --- a/docs/examples/guide/e60c2bf89fdf38187709d04dd1c55330.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - more_like_this: { - fields: [ - 'title', - 'description' - ], - like: 'Once upon a time', - min_term_freq: 1, - max_query_terms: 12 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e60ded7becfd5b2ccaef5bad2aaa93f5.asciidoc b/docs/examples/guide/e60ded7becfd5b2ccaef5bad2aaa93f5.asciidoc deleted file mode 100644 index fef20b7c76..0000000000 --- a/docs/examples/guide/e60ded7becfd5b2ccaef5bad2aaa93f5.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - products: { - terms: { - field: 'product', - size: 5, - show_term_doc_count_error: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e61b5abe85000cc954a42e2cd74f3a26.asciidoc b/docs/examples/guide/e61b5abe85000cc954a42e2cd74f3a26.asciidoc deleted file mode 100644 index fcdc4c8346..0000000000 --- a/docs/examples/guide/e61b5abe85000cc954a42e2cd74f3a26.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.put_calendar( - calendar_id: 'planned-outages' -) -puts response ----- diff --git a/docs/examples/guide/e6369e7cef82d881af593d5526bf79bd.asciidoc b/docs/examples/guide/e6369e7cef82d881af593d5526bf79bd.asciidoc deleted file mode 100644 index e4b2122a1c..0000000000 --- a/docs/examples/guide/e6369e7cef82d881af593d5526bf79bd.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - span_term: { - 'user.id' => { - value: 'kimchy', - boost: 2 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e63775a2ff22b945ab9d5f630b80c506.asciidoc b/docs/examples/guide/e63775a2ff22b945ab9d5f630b80c506.asciidoc deleted file mode 100644 index 2039a9e829..0000000000 --- a/docs/examples/guide/e63775a2ff22b945ab9d5f630b80c506.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cluster.health( - index: 'my-index-000001', - level: 'shards' -) -puts response ----- diff --git a/docs/examples/guide/e63cf08350e9381f519c2835843be7cd.asciidoc b/docs/examples/guide/e63cf08350e9381f519c2835843be7cd.asciidoc deleted file mode 100644 index 3d38e961b2..0000000000 --- a/docs/examples/guide/e63cf08350e9381f519c2835843be7cd.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_date_formats: [ - 'yyyy/MM||MM/dd/yyyy' - ] - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - create_date: '09/25/2015' - } -) -puts response ----- diff --git a/docs/examples/guide/e642be44a62a89cf4afb2db28220c9a9.asciidoc b/docs/examples/guide/e642be44a62a89cf4afb2db28220c9a9.asciidoc deleted file mode 100644 index 33cd07e9f1..0000000000 --- a/docs/examples/guide/e642be44a62a89cf4afb2db28220c9a9.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'ingest.geoip.downloader.enabled' => true, - 'indices.lifecycle.history_index_enabled' => true - } - } -) -puts response ----- diff --git a/docs/examples/guide/e650d73c57ab313e686fec01e3b0c90f.asciidoc b/docs/examples/guide/e650d73c57ab313e686fec01e3b0c90f.asciidoc deleted file mode 100644 index f1fc31d0c1..0000000000 --- a/docs/examples/guide/e650d73c57ab313e686fec01e3b0c90f.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'my-index-000001' - }, - dest: { - index: 'my-new-index-000001', - version_type: 'external' - }, - script: { - source: "if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}", - lang: 'painless' - } - } -) -puts response ----- diff --git a/docs/examples/guide/e697ef947f3fb7835f7fadb9125b1043.asciidoc b/docs/examples/guide/e697ef947f3fb7835f7fadb9125b1043.asciidoc deleted file mode 100644 index 2580673fbc..0000000000 --- a/docs/examples/guide/e697ef947f3fb7835f7fadb9125b1043.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'txt', - body: { - query: 'SELECT * FROM library ORDER BY page_count DESC', - filter: { - range: { - page_count: { - gte: 100, - lte: 200 - } - } - }, - fetch_size: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/e6b972611c0ec8ab4c240f33f323d85b.asciidoc b/docs/examples/guide/e6b972611c0ec8ab4c240f33f323d85b.asciidoc deleted file mode 100644 index e22f0e32a9..0000000000 --- a/docs/examples/guide/e6b972611c0ec8ab4c240f33f323d85b.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - size: 0, - body: { - aggregations: { - by_day: { - date_histogram: { - field: 'date', - calendar_interval: 'day', - time_zone: '-01:00' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e6ccd979c34ba03007e625c6ec3e71a9.asciidoc b/docs/examples/guide/e6ccd979c34ba03007e625c6ec3e71a9.asciidoc deleted file mode 100644 index db43bd9e45..0000000000 --- a/docs/examples/guide/e6ccd979c34ba03007e625c6ec3e71a9.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_alias -puts response ----- diff --git a/docs/examples/guide/e6dcc2911d2416a65eaec9846b956e15.asciidoc b/docs/examples/guide/e6dcc2911d2416a65eaec9846b956e15.asciidoc deleted file mode 100644 index dc81e74fc2..0000000000 --- a/docs/examples/guide/e6dcc2911d2416a65eaec9846b956e15.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.refresh( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/e6e47da87079a8b67f767a2a01878cf2.asciidoc b/docs/examples/guide/e6e47da87079a8b67f767a2a01878cf2.asciidoc deleted file mode 100644 index 527dc1f9ff..0000000000 --- a/docs/examples/guide/e6e47da87079a8b67f767a2a01878cf2.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - processors: [ - { - set: { - description: 'Use geo_point dynamic template for address field', - field: '_dynamic_templates', - value: { - address: 'geo_point' - } - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/e6faae2e272ee57727f38e55a3de5bb2.asciidoc b/docs/examples/guide/e6faae2e272ee57727f38e55a3de5bb2.asciidoc deleted file mode 100644 index 16f5f43228..0000000000 --- a/docs/examples/guide/e6faae2e272ee57727f38e55a3de5bb2.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - highlight: { - fields: [ - { - title: {} - }, - { - text: {} - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/e71d300cd87f09a9527cf45395dd7eb1.asciidoc b/docs/examples/guide/e71d300cd87f09a9527cf45395dd7eb1.asciidoc deleted file mode 100644 index 6bbe78c1f6..0000000000 --- a/docs/examples/guide/e71d300cd87f09a9527cf45395dd7eb1.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.slm.execute_retention -puts response ----- diff --git a/docs/examples/guide/e7811867397b305efbbe8925d8a01c1a.asciidoc b/docs/examples/guide/e7811867397b305efbbe8925d8a01c1a.asciidoc deleted file mode 100644 index 1ee5850321..0000000000 --- a/docs/examples/guide/e7811867397b305efbbe8925d8a01c1a.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - intervals: { - my_text: { - any_of: { - intervals: [ - { - match: { - query: 'the big bad wolf', - ordered: true, - max_gaps: 0 - } - }, - { - match: { - query: 'the big wolf', - ordered: true, - max_gaps: 0 - } - } - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e784fc00894635470adfd78a0c46b427.asciidoc b/docs/examples/guide/e784fc00894635470adfd78a0c46b427.asciidoc deleted file mode 100644 index 96964504de..0000000000 --- a/docs/examples/guide/e784fc00894635470adfd78a0c46b427.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'template_1', - body: { - template: { - settings: { - number_of_shards: 1 - }, - mappings: { - _source: { - enabled: false - }, - properties: { - host_name: { - type: 'keyword' - }, - created_at: { - type: 'date', - format: 'EEE MMM dd HH:mm:ss Z yyyy' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e7e95022867c72a6563137f066dd2973.asciidoc b/docs/examples/guide/e7e95022867c72a6563137f066dd2973.asciidoc deleted file mode 100644 index 3e22054f04..0000000000 --- a/docs/examples/guide/e7e95022867c72a6563137f066dd2973.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - hotspots: { - geohash_grid: { - field: 'location', - precision: 5 - }, - aggregations: { - significant_crime_types: { - significant_terms: { - field: 'crime_type' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e7eca57a5bf5a53cbbe2463bce11495b.asciidoc b/docs/examples/guide/e7eca57a5bf5a53cbbe2463bce11495b.asciidoc deleted file mode 100644 index e3b4f0af4f..0000000000 --- a/docs/examples/guide/e7eca57a5bf5a53cbbe2463bce11495b.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - types_count: { - value_count: { - field: 'type' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e821d27a8b810821707ba860e31f8b78.asciidoc b/docs/examples/guide/e821d27a8b810821707ba860e31f8b78.asciidoc deleted file mode 100644 index f5370174a6..0000000000 --- a/docs/examples/guide/e821d27a8b810821707ba860e31f8b78.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - properties: { - city: { - type: 'text', - fields: { - raw: { - type: 'keyword' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e82c33def91faddcfeed7b02cd258605.asciidoc b/docs/examples/guide/e82c33def91faddcfeed7b02cd258605.asciidoc deleted file mode 100644 index 4321b2e258..0000000000 --- a/docs/examples/guide/e82c33def91faddcfeed7b02cd258605.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'products', - body: { - aggregations: { - genres_and_products: { - multi_terms: { - terms: [ - { - field: 'genre' - }, - { - field: 'product', - missing: 'Product Z' - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e84e23232c7ecc8d6377ec2c16a60269.asciidoc b/docs/examples/guide/e84e23232c7ecc8d6377ec2c16a60269.asciidoc deleted file mode 100644 index d39c1ff733..0000000000 --- a/docs/examples/guide/e84e23232c7ecc8d6377ec2c16a60269.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - aliases: { - "alias_1": {}, - "alias_2": { - filter: { - term: { - 'user.id' => 'kimchy' - } - }, - routing: 'shard-1' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e88a057a13e191e4d5faa22edf2ae8ed.asciidoc b/docs/examples/guide/e88a057a13e191e4d5faa22edf2ae8ed.asciidoc deleted file mode 100644 index 131a7fe7c7..0000000000 --- a/docs/examples/guide/e88a057a13e191e4d5faa22edf2ae8ed.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_settings( - filter_path: '**.xpack.profiling.templates.enabled', - include_defaults: true -) -puts response ----- diff --git a/docs/examples/guide/e891e1d4805172da45a81f62b6b44aca.asciidoc b/docs/examples/guide/e891e1d4805172da45a81f62b6b44aca.asciidoc deleted file mode 100644 index 8adb2a5f69..0000000000 --- a/docs/examples/guide/e891e1d4805172da45a81f62b6b44aca.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - size: 0, - runtime_mappings: { - normalized_genre: { - type: 'keyword', - script: "\n String genre = doc['genre'].value;\n if (doc['product'].value.startsWith('Anthology')) {\n emit(genre + ' anthology');\n } else {\n emit(genre);\n }\n " - } - }, - aggregations: { - genres: { - terms: { - field: 'normalized_genre' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e8a2726eea5545355d1d0835d4599f55.asciidoc b/docs/examples/guide/e8a2726eea5545355d1d0835d4599f55.asciidoc deleted file mode 100644 index 2979f2e582..0000000000 --- a/docs/examples/guide/e8a2726eea5545355d1d0835d4599f55.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - term: { - ip_addr: '2001:db8::/48' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e8bb5c57bdeff22be8e5f39a99dfe70e.asciidoc b/docs/examples/guide/e8bb5c57bdeff22be8e5f39a99dfe70e.asciidoc deleted file mode 100644 index 0893eadb5a..0000000000 --- a/docs/examples/guide/e8bb5c57bdeff22be8e5f39a99dfe70e.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'stackoverflow', - size: 0, - body: { - query: { - query_string: { - query: 'tags:kibana OR tags:javascript' - } - }, - aggregations: { - sample: { - sampler: { - shard_size: 200 - }, - aggregations: { - keywords: { - significant_terms: { - field: 'tags', - exclude: [ - 'kibana', - 'javascript' - ] - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e8c348cabe15dfe58ab4c3cc13a963fe.asciidoc b/docs/examples/guide/e8c348cabe15dfe58ab4c3cc13a963fe.asciidoc deleted file mode 100644 index a3cafddf4c..0000000000 --- a/docs/examples/guide/e8c348cabe15dfe58ab4c3cc13a963fe.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.search_shards( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/e8cbe2269f3dff6b231e73119e81511d.asciidoc b/docs/examples/guide/e8cbe2269f3dff6b231e73119e81511d.asciidoc deleted file mode 100644 index 338cc0e9ac..0000000000 --- a/docs/examples/guide/e8cbe2269f3dff6b231e73119e81511d.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - exists: { - field: 'user' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e8ea65153d7775f25b08dfdfe6954498.asciidoc b/docs/examples/guide/e8ea65153d7775f25b08dfdfe6954498.asciidoc deleted file mode 100644 index ffc6267a93..0000000000 --- a/docs/examples/guide/e8ea65153d7775f25b08dfdfe6954498.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - simple_query_string: { - query: 'Will Smith', - fields: [ - 'title', - '*_name' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e8f1c9ee003d115ec8f55e57990df6e4.asciidoc b/docs/examples/guide/e8f1c9ee003d115ec8f55e57990df6e4.asciidoc deleted file mode 100644 index 5bf79f3bc9..0000000000 --- a/docs/examples/guide/e8f1c9ee003d115ec8f55e57990df6e4.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_categories( - job_id: 'esxi_log', - body: { - page: { - size: 1 - } - } -) -puts response ----- diff --git a/docs/examples/guide/e905543b281e9c41395304da76ed2ea3.asciidoc b/docs/examples/guide/e905543b281e9c41395304da76ed2ea3.asciidoc deleted file mode 100644 index 7b42e1b499..0000000000 --- a/docs/examples/guide/e905543b281e9c41395304da76ed2ea3.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete( - index: '.watches' -) -puts response ----- diff --git a/docs/examples/guide/e930a572e8ddfdecc13498c04007b9e3.asciidoc b/docs/examples/guide/e930a572e8ddfdecc13498c04007b9e3.asciidoc deleted file mode 100644 index 74197fa382..0000000000 --- a/docs/examples/guide/e930a572e8ddfdecc13498c04007b9e3.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'openai-embeddings', - body: { - mappings: { - properties: { - content_embedding: { - type: 'dense_vector', - dims: 1536, - element_type: 'float', - similarity: 'dot_product' - }, - content: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc b/docs/examples/guide/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc deleted file mode 100644 index f023deb367..0000000000 --- a/docs/examples/guide/e93ff228ab3e63738e1c83fdfb7424b9.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - 'user.id' => 'kimchy' - } - }, - highlight: { - pre_tags: [ - '' - ], - post_tags: [ - '' - ], - fields: { - body: {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e944653610f311fa06148d5b0afdf697.asciidoc b/docs/examples/guide/e944653610f311fa06148d5b0afdf697.asciidoc deleted file mode 100644 index 876f914b81..0000000000 --- a/docs/examples/guide/e944653610f311fa06148d5b0afdf697.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_component_template( - name: 'component_template1', - body: { - template: { - mappings: { - properties: { - "@timestamp": { - type: 'date' - } - } - } - } - } -) -puts response - -response = client.cluster.put_component_template( - name: 'runtime_component_template', - body: { - template: { - mappings: { - runtime: { - day_of_week: { - type: 'keyword', - script: { - source: "emit(doc['@timestamp'].value.dayOfWeekEnum.getDisplayName(TextStyle.FULL, Locale.ROOT))" - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e95e61988dc3073a007f7b7445dd233b.asciidoc b/docs/examples/guide/e95e61988dc3073a007f7b7445dd233b.asciidoc deleted file mode 100644 index 3e18e16ab3..0000000000 --- a/docs/examples/guide/e95e61988dc3073a007f7b7445dd233b.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'dsl-data-stream-template', - body: { - index_patterns: [ - 'dsl-data-stream*' - ], - data_stream: {}, - priority: 500, - template: { - settings: { - 'index.lifecycle.name' => 'pre-dsl-ilm-policy', - 'index.lifecycle.prefer_ilm' => false - }, - lifecycle: { - data_retention: '7d' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e9738fe09a99080506a07945795e8eda.asciidoc b/docs/examples/guide/e9738fe09a99080506a07945795e8eda.asciidoc deleted file mode 100644 index e3d2fe29ff..0000000000 --- a/docs/examples/guide/e9738fe09a99080506a07945795e8eda.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'stop' - ], - text: 'a quick fox jumps over the lazy dog' - } -) -puts response ----- diff --git a/docs/examples/guide/e99c45a47dc0ba7440aea8a9a99c84fa.asciidoc b/docs/examples/guide/e99c45a47dc0ba7440aea8a9a99c84fa.asciidoc deleted file mode 100644 index 270ca2b685..0000000000 --- a/docs/examples/guide/e99c45a47dc0ba7440aea8a9a99c84fa.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'news', - body: { - query: { - match: { - content: 'Bird flu' - } - }, - aggregations: { - my_sample: { - sampler: { - shard_size: 100 - }, - aggregations: { - keywords: { - significant_text: { - field: 'content' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e9a0b450af6219772631703d602c7092.asciidoc b/docs/examples/guide/e9a0b450af6219772631703d602c7092.asciidoc deleted file mode 100644 index 9e7fde1465..0000000000 --- a/docs/examples/guide/e9a0b450af6219772631703d602c7092.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index', - body: { - query: { - text_expansion: { - 'ml.tokens' => { - model_id: '.elser_model_2', - model_text: 'How is the weather in Jamaica?', - pruning_config: { - tokens_freq_ratio_threshold: 5, - tokens_weight_threshold: 0.4, - only_score_pruned_tokens: false - } - } - } - }, - rescore: { - window_size: 100, - query: { - rescore_query: { - text_expansion: { - 'ml.tokens' => { - model_id: '.elser_model_2', - model_text: 'How is the weather in Jamaica?', - pruning_config: { - tokens_freq_ratio_threshold: 5, - tokens_weight_threshold: 0.4, - only_score_pruned_tokens: true - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e9f9e184499a793828233e536fac0487.asciidoc b/docs/examples/guide/e9f9e184499a793828233e536fac0487.asciidoc deleted file mode 100644 index 42f4734bc8..0000000000 --- a/docs/examples/guide/e9f9e184499a793828233e536fac0487.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.delete_by_query( - index: 'my-index-000001', - scroll_size: 5000, - body: { - query: { - term: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/e9fe3b53b5b6e1ff9566b5237c0fa513.asciidoc b/docs/examples/guide/e9fe3b53b5b6e1ff9566b5237c0fa513.asciidoc deleted file mode 100644 index f23e07bfc5..0000000000 --- a/docs/examples/guide/e9fe3b53b5b6e1ff9566b5237c0fa513.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'child_example', - id: 2, - routing: 1, - body: { - join: { - name: 'answer', - parent: '1' - }, - owner: { - location: 'Norfolk, United Kingdom', - display_name: 'Sam', - id: 48 - }, - body: "Unfortunately you're pretty much limited to FTP...", - creation_date: '2009-05-04T13:45:37.030' - } -) -puts response - -response = client.index( - index: 'child_example', - id: 3, - routing: 1, - refresh: true, - body: { - join: { - name: 'answer', - parent: '1' - }, - owner: { - location: 'Norfolk, United Kingdom', - display_name: 'Troll', - id: 49 - }, - body: 'Use Linux...', - creation_date: '2009-05-05T13:45:37.030' - } -) -puts response ----- diff --git a/docs/examples/guide/ea020ea32d5cd35e577c61a120f92451.asciidoc b/docs/examples/guide/ea020ea32d5cd35e577c61a120f92451.asciidoc deleted file mode 100644 index 0272c02798..0000000000 --- a/docs/examples/guide/ea020ea32d5cd35e577c61a120f92451.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-data-stream', - body: [ - { - create: {} - }, - { - "@timestamp": '2099-05-06T16:21:15.000Z', - message: '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736' - }, - { - create: {} - }, - { - "@timestamp": '2099-05-06T16:25:42.000Z', - message: '192.0.2.255 - - [06/May/2099:16:25:42 +0000] "GET /favicon.ico HTTP/1.0" 200 3638' - } - ] -) -puts response - -response = client.index( - index: 'my-data-stream', - body: { - "@timestamp": '2099-05-06T16:21:15.000Z', - message: '192.0.2.42 - - [06/May/2099:16:21:15 +0000] "GET /images/bg.jpg HTTP/1.0" 200 24736' - } -) -puts response ----- diff --git a/docs/examples/guide/ea0a5762f297928ea79948250a3624ed.asciidoc b/docs/examples/guide/ea0a5762f297928ea79948250a3624ed.asciidoc deleted file mode 100644 index e3214cc744..0000000000 --- a/docs/examples/guide/ea0a5762f297928ea79948250a3624ed.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'mv', - body: { - mappings: { - properties: { - b: { - type: 'long' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'mv', - refresh: true, - body: [ - { - index: {} - }, - { - a: 1, - b: [ - 2, - 2, - 1 - ] - }, - { - index: {} - }, - { - a: 2, - b: [ - 1, - 1 - ] - } - ] -) -puts response - -response = client.esql.query( - body: { - query: 'FROM mv | LIMIT 2', - version: '2024.04.01' - } -) -puts response ----- diff --git a/docs/examples/guide/ea313059c18d6edbd28c3f743a5e7c1c.asciidoc b/docs/examples/guide/ea313059c18d6edbd28c3f743a5e7c1c.asciidoc deleted file mode 100644 index 845262d6c2..0000000000 --- a/docs/examples/guide/ea313059c18d6edbd28c3f743a5e7c1c.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - city: 'madrid' - } - }, - aggregations: { - tags: { - significant_terms: { - field: 'tag', - background_filter: { - term: { - text: 'spain' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ea5391267ced860c00214c096e08c8d4.asciidoc b/docs/examples/guide/ea5391267ced860c00214c096e08c8d4.asciidoc deleted file mode 100644 index 09aec8e92c..0000000000 --- a/docs/examples/guide/ea5391267ced860c00214c096e08c8d4.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - index: { - number_of_replicas: 2 - } - } -) -puts response ----- diff --git a/docs/examples/guide/ea5b4d2d87fd4e040afad18903c44869.asciidoc b/docs/examples/guide/ea5b4d2d87fd4e040afad18903c44869.asciidoc deleted file mode 100644 index 539183aca3..0000000000 --- a/docs/examples/guide/ea5b4d2d87fd4e040afad18903c44869.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_bounding_box: { - 'pin.location' => { - top_left: { - lat: 40.73, - lon: -74.1 - }, - bottom_right: { - lat: 40.01, - lon: -71.12 - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ea61aa2531ea73ccc0acd2d41f0518eb.asciidoc b/docs/examples/guide/ea61aa2531ea73ccc0acd2d41f0518eb.asciidoc deleted file mode 100644 index 1a7ff96e25..0000000000 --- a/docs/examples/guide/ea61aa2531ea73ccc0acd2d41f0518eb.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - pagerank: { - type: 'rank_feature' - }, - url_length: { - type: 'rank_feature', - positive_score_impact: false - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - pagerank: 8, - url_length: 22 - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - rank_feature: { - field: 'pagerank' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ea66a620c23337545e409c120c4ed5d9.asciidoc b/docs/examples/guide/ea66a620c23337545e409c120c4ed5d9.asciidoc deleted file mode 100644 index 9e1cb714b5..0000000000 --- a/docs/examples/guide/ea66a620c23337545e409c120c4ed5d9.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ilm.explain_lifecycle( - index: '.ds-timeseries-*' -) -puts response ----- diff --git a/docs/examples/guide/ea68e3428cc2ca3455bf312d09451489.asciidoc b/docs/examples/guide/ea68e3428cc2ca3455bf312d09451489.asciidoc deleted file mode 100644 index 6fa60b4ca0..0000000000 --- a/docs/examples/guide/ea68e3428cc2ca3455bf312d09451489.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'product-index', - body: { - mappings: { - properties: { - "product-vector": { - type: 'dense_vector', - dims: 5, - index: false - }, - price: { - type: 'long' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ea690283f301c6ce957efad93d7d5c5d.asciidoc b/docs/examples/guide/ea690283f301c6ce957efad93d7d5c5d.asciidoc deleted file mode 100644 index 53b049e055..0000000000 --- a/docs/examples/guide/ea690283f301c6ce957efad93d7d5c5d.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'length_example', - body: { - settings: { - analysis: { - analyzer: { - standard_length: { - tokenizer: 'standard', - filter: [ - 'length' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eab3cad0257c539c5efd2689aa52f242.asciidoc b/docs/examples/guide/eab3cad0257c539c5efd2689aa52f242.asciidoc deleted file mode 100644 index af483a7696..0000000000 --- a/docs/examples/guide/eab3cad0257c539c5efd2689aa52f242.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.data_streams_stats( - name: 'my-data-stream', - human: true -) -puts response ----- diff --git a/docs/examples/guide/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc b/docs/examples/guide/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc deleted file mode 100644 index 9f861bdb0f..0000000000 --- a/docs/examples/guide/eac3bc428d03eb4926fa51f74b9bc4d5.asciidoc +++ /dev/null @@ -1,60 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match: { - comment: { - query: 'foo bar' - } - } - }, - rescore: { - window_size: 50, - query: { - rescore_query: { - match_phrase: { - comment: { - query: 'foo bar', - slop: 1 - } - } - }, - rescore_query_weight: 10 - } - }, - _source: false, - highlight: { - order: 'score', - fields: { - comment: { - fragment_size: 150, - number_of_fragments: 3, - highlight_query: { - bool: { - must: { - match: { - comment: { - query: 'foo bar' - } - } - }, - should: { - match_phrase: { - comment: { - query: 'foo bar', - slop: 1, - boost: 10 - } - } - }, - minimum_should_match: 0 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc b/docs/examples/guide/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc deleted file mode 100644 index 4676c691d0..0000000000 --- a/docs/examples/guide/eada8af6588584ac88f1e5b15f4a5c2a.asciidoc +++ /dev/null @@ -1,67 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'metrics_index', - id: 1, - body: { - 'network.name' => 'net-1', - latency_histo: { - values: [ - 0.1, - 0.2, - 0.3, - 0.4, - 0.5 - ], - counts: [ - 3, - 7, - 23, - 12, - 6 - ] - } - } -) -puts response - -response = client.index( - index: 'metrics_index', - id: 2, - body: { - 'network.name' => 'net-2', - latency_histo: { - values: [ - 0.1, - 0.2, - 0.3, - 0.4, - 0.5 - ], - counts: [ - 8, - 17, - 8, - 7, - 6 - ] - } - } -) -puts response - -response = client.search( - index: 'metrics_index', - size: 0, - body: { - aggregations: { - total_requests: { - value_count: { - field: 'latency_histo' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eae8931d01b3b878dd0c45214121e662.asciidoc b/docs/examples/guide/eae8931d01b3b878dd0c45214121e662.asciidoc deleted file mode 100644 index f4205e60b5..0000000000 --- a/docs/examples/guide/eae8931d01b3b878dd0c45214121e662.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - query: { - geo_bounding_box: { - 'pin.location' => { - top_left: 'dr', - bottom_right: 'dr' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eaf53b05959cc6b7fb09579baf34de68.asciidoc b/docs/examples/guide/eaf53b05959cc6b7fb09579baf34de68.asciidoc deleted file mode 100644 index 097cd0c231..0000000000 --- a/docs/examples/guide/eaf53b05959cc6b7fb09579baf34de68.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sale_type: { - terms: { - field: 'type' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - } - } - }, - hat_vs_bag_ratio: { - bucket_script: { - buckets_path: { - hats: "sale_type['hat']>sales", - bags: "sale_type['bag']>sales" - }, - script: 'params.hats / params.bags' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eaf6a846ded090fd6ac48269ad2b328b.asciidoc b/docs/examples/guide/eaf6a846ded090fd6ac48269ad2b328b.asciidoc deleted file mode 100644 index 3ad6059478..0000000000 --- a/docs/examples/guide/eaf6a846ded090fd6ac48269ad2b328b.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - 'index.lifecycle.name' => 'my_policy', - 'index.lifecycle.rollover_alias' => 'my_data' - }, - aliases: { - my_data: { - is_write_index: true - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eb09235533a1c65a0627ba05f7d4ad4d.asciidoc b/docs/examples/guide/eb09235533a1c65a0627ba05f7d4ad4d.asciidoc deleted file mode 100644 index 9feab8044d..0000000000 --- a/docs/examples/guide/eb09235533a1c65a0627ba05f7d4ad4d.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'place', - id: 1, - body: { - suggest: { - input: "timmy's", - contexts: { - location: [ - { - lat: 43.6624803, - lon: -79.3863353 - }, - { - lat: 43.6624718, - lon: -79.3873227 - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eb14cedd3bdda9ffef3c118f3d528dcd.asciidoc b/docs/examples/guide/eb14cedd3bdda9ffef3c118f3d528dcd.asciidoc deleted file mode 100644 index b3e63877ec..0000000000 --- a/docs/examples/guide/eb14cedd3bdda9ffef3c118f3d528dcd.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'test', - id: 1, - body: { - script: "ctx._source.new_field = 'value_of_new_field'" - } -) -puts response ----- diff --git a/docs/examples/guide/eb33a7e5a0fe83fdaa0f79354f659428.asciidoc b/docs/examples/guide/eb33a7e5a0fe83fdaa0f79354f659428.asciidoc deleted file mode 100644 index 51a912995b..0000000000 --- a/docs/examples/guide/eb33a7e5a0fe83fdaa0f79354f659428.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-index-000001', - body: { - runtime: { - client_ip: { - type: 'ip', - script: { - source: 'String m = doc["message"].value; int end = m.indexOf(" "); emit(m.substring(0, end));' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eb4e43b47867b54214a8630172dd0e21.asciidoc b/docs/examples/guide/eb4e43b47867b54214a8630172dd0e21.asciidoc deleted file mode 100644 index b28726b2d4..0000000000 --- a/docs/examples/guide/eb4e43b47867b54214a8630172dd0e21.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_forecast( - job_id: 'total-requests', - forecast_id: '_all' -) -puts response ----- diff --git a/docs/examples/guide/eb5486d2fe4283475bf9e0e09280be16.asciidoc b/docs/examples/guide/eb5486d2fe4283475bf9e0e09280be16.asciidoc deleted file mode 100644 index b94ea59b5b..0000000000 --- a/docs/examples/guide/eb5486d2fe4283475bf9e0e09280be16.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - warm: { - actions: { - forcemerge: { - max_num_segments: 1 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eb5987b58dae90c3a8a1609410be0570.asciidoc b/docs/examples/guide/eb5987b58dae90c3a8a1609410be0570.asciidoc deleted file mode 100644 index 7e8eb8d9fc..0000000000 --- a/docs/examples/guide/eb5987b58dae90c3a8a1609410be0570.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'indonesian_example', - body: { - settings: { - analysis: { - filter: { - indonesian_stop: { - type: 'stop', - stopwords: '_indonesian_' - }, - indonesian_keywords: { - type: 'keyword_marker', - keywords: [ - 'contoh' - ] - }, - indonesian_stemmer: { - type: 'stemmer', - language: 'indonesian' - } - }, - analyzer: { - rebuilt_indonesian: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'indonesian_stop', - 'indonesian_keywords', - 'indonesian_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eb964d8d7f27c057a4542448ba5b74e4.asciidoc b/docs/examples/guide/eb964d8d7f27c057a4542448ba5b74e4.asciidoc deleted file mode 100644 index a774fdfb41..0000000000 --- a/docs/examples/guide/eb964d8d7f27c057a4542448ba5b74e4.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.get( - repository: 'my_repository', - snapshot: 'snapshot*', - size: 2, - sort: 'name', - after: 'c25hcHNob3RfMixteV9yZXBvc2l0b3J5LHNuYXBzaG90XzI=' -) -puts response ----- diff --git a/docs/examples/guide/ebb1c7554e91adb4552599f3e5de1865.asciidoc b/docs/examples/guide/ebb1c7554e91adb4552599f3e5de1865.asciidoc deleted file mode 100644 index b23226a45e..0000000000 --- a/docs/examples/guide/ebb1c7554e91adb4552599f3e5de1865.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - index: { - number_of_routing_shards: 30 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ebef3dc8ed1766d433a5cffc40fde7ae.asciidoc b/docs/examples/guide/ebef3dc8ed1766d433a5cffc40fde7ae.asciidoc deleted file mode 100644 index 4dfe4f5a7d..0000000000 --- a/docs/examples/guide/ebef3dc8ed1766d433a5cffc40fde7ae.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ilm.remove_policy( - index: 'logs-my_app-default' -) -puts response ----- diff --git a/docs/examples/guide/ec0e50f78390b8622cef4e0b0cd45967.asciidoc b/docs/examples/guide/ec0e50f78390b8622cef4e0b0cd45967.asciidoc deleted file mode 100644 index e60d004ed1..0000000000 --- a/docs/examples/guide/ec0e50f78390b8622cef4e0b0cd45967.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.eql.search( - index: 'my-data-stream', - body: { - query: "\n process where (process.name == \"cmd.exe\" and process.pid != 2013)\n " - } -) -puts response ----- diff --git a/docs/examples/guide/ec195297eb804cba1cb19c9926773059.asciidoc b/docs/examples/guide/ec195297eb804cba1cb19c9926773059.asciidoc deleted file mode 100644 index 3e835dd728..0000000000 --- a/docs/examples/guide/ec195297eb804cba1cb19c9926773059.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'mylogs-pre-ilm*', - body: { - index: { - lifecycle: { - name: 'mylogs_policy_existing' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ec5a2ce156c36aaa267fa31dd9367307.asciidoc b/docs/examples/guide/ec5a2ce156c36aaa267fa31dd9367307.asciidoc deleted file mode 100644 index 31b0bc346c..0000000000 --- a/docs/examples/guide/ec5a2ce156c36aaa267fa31dd9367307.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'set_ingest_time', - body: { - description: 'Set ingest timestamp.', - processors: [ - { - set: { - field: 'event.ingested', - value: '{{{_ingest.timestamp}}}' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/ec736c31f49c54e5424efa2e53b22906.asciidoc b/docs/examples/guide/ec736c31f49c54e5424efa2e53b22906.asciidoc deleted file mode 100644 index 2731d516de..0000000000 --- a/docs/examples/guide/ec736c31f49c54e5424efa2e53b22906.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'user_agent', - body: { - description: 'Add user agent information', - processors: [ - { - user_agent: { - field: 'agent' - } - } - ] - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'my_id', - pipeline: 'user_agent', - body: { - agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36' - } -) -puts response - -response = client.get( - index: 'my-index-000001', - id: 'my_id' -) -puts response ----- diff --git a/docs/examples/guide/ec8f176ebf436d5719bdeca4a9ea8220.asciidoc b/docs/examples/guide/ec8f176ebf436d5719bdeca4a9ea8220.asciidoc deleted file mode 100644 index 5879a26fe4..0000000000 --- a/docs/examples/guide/ec8f176ebf436d5719bdeca4a9ea8220.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'products', - body: { - runtime_mappings: { - 'genre.length' => { - type: 'long', - script: "emit(doc['genre'].value.length())" - } - }, - aggregations: { - genres_and_products: { - multi_terms: { - terms: [ - { - field: 'genre.length' - }, - { - field: 'product' - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ecc57597f6b791d1151ad79d9f4ce67b.asciidoc b/docs/examples/guide/ecc57597f6b791d1151ad79d9f4ce67b.asciidoc deleted file mode 100644 index 325ddf304d..0000000000 --- a/docs/examples/guide/ecc57597f6b791d1151ad79d9f4ce67b.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - sales_over_time: { - date_histogram: { - field: 'date', - calendar_interval: '1M', - format: 'yyyy-MM-dd', - keyed: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ece01f9382e450f669c0e0925e5b30e5.asciidoc b/docs/examples/guide/ece01f9382e450f669c0e0925e5b30e5.asciidoc deleted file mode 100644 index 5f15903378..0000000000 --- a/docs/examples/guide/ece01f9382e450f669c0e0925e5b30e5.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - range: { - date_range: { - field: 'date', - format: 'MM-yyy', - ranges: [ - { - to: 'now-10M/M' - }, - { - from: 'now-10M/M' - } - ], - keyed: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ecfd0d94dd14ef05dfa861f22544b388.asciidoc b/docs/examples/guide/ecfd0d94dd14ef05dfa861f22544b388.asciidoc deleted file mode 100644 index cb49956e46..0000000000 --- a/docs/examples/guide/ecfd0d94dd14ef05dfa861f22544b388.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.connector.update_error( - connector_id: 'my-connector', - body: { - error: 'Houston, we have a problem!' - } -) -puts response ----- diff --git a/docs/examples/guide/ed01d27b8f80bb4ea54bf4e32b8d6258.asciidoc b/docs/examples/guide/ed01d27b8f80bb4ea54bf4e32b8d6258.asciidoc deleted file mode 100644 index 294ad31063..0000000000 --- a/docs/examples/guide/ed01d27b8f80bb4ea54bf4e32b8d6258.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - rings_around_amsterdam: { - geo_distance: { - field: 'location', - origin: 'POINT (4.894 52.3760)', - ranges: [ - { - to: 100_000, - key: 'first_ring' - }, - { - from: 100_000, - to: 300_000, - key: 'second_ring' - }, - { - from: 300_000, - key: 'third_ring' - } - ], - keyed: true - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ed09432c6069e41409f0a5e0d1d3842a.asciidoc b/docs/examples/guide/ed09432c6069e41409f0a5e0d1d3842a.asciidoc deleted file mode 100644 index 653c1c1768..0000000000 --- a/docs/examples/guide/ed09432c6069e41409f0a5e0d1d3842a.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.reload_search_analyzers( - index: 'my-index-000001' -) -puts response - -response = client.indices.clear_cache( - index: 'my-index-000001', - request: true -) -puts response ----- diff --git a/docs/examples/guide/ed12eeadb4e530b53c4975dadaa06054.asciidoc b/docs/examples/guide/ed12eeadb4e530b53c4975dadaa06054.asciidoc deleted file mode 100644 index c53ce7570f..0000000000 --- a/docs/examples/guide/ed12eeadb4e530b53c4975dadaa06054.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ingest.processor_grok( - ecs_compatibility: 'v1' -) -puts response ----- diff --git a/docs/examples/guide/ed250b74bc77c15bb794f55a12d762c3.asciidoc b/docs/examples/guide/ed250b74bc77c15bb794f55a12d762c3.asciidoc deleted file mode 100644 index 15dfa668f6..0000000000 --- a/docs/examples/guide/ed250b74bc77c15bb794f55a12d762c3.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.nodes.info( - filter_path: '**.mlockall' -) -puts response ----- diff --git a/docs/examples/guide/ed27843eff311f3011b679e97e6fda50.asciidoc b/docs/examples/guide/ed27843eff311f3011b679e97e6fda50.asciidoc deleted file mode 100644 index d6a5dfbef3..0000000000 --- a/docs/examples/guide/ed27843eff311f3011b679e97e6fda50.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.restore( - repository: 'my_repository', - snapshot: 'my_snapshot_2099.05.06', - body: { - indices: 'my-index,logs-my_app-default', - index_settings: { - 'index.number_of_replicas' => 1 - } - } -) -puts response ----- diff --git a/docs/examples/guide/ed3bdf4d6799b43526851e92b6a60c55.asciidoc b/docs/examples/guide/ed3bdf4d6799b43526851e92b6a60c55.asciidoc deleted file mode 100644 index f09e9ea24f..0000000000 --- a/docs/examples/guide/ed3bdf4d6799b43526851e92b6a60c55.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_field_mapping( - index: 'publications', - fields: 'author.id,abstract,name' -) -puts response ----- diff --git a/docs/examples/guide/ed5bfa68d01e079aac94de78dc5caddf.asciidoc b/docs/examples/guide/ed5bfa68d01e079aac94de78dc5caddf.asciidoc deleted file mode 100644 index 38ed6fed23..0000000000 --- a/docs/examples/guide/ed5bfa68d01e079aac94de78dc5caddf.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.master( - v: true -) -puts response ----- diff --git a/docs/examples/guide/ed5c3b45e8de912faba44507d827eb93.asciidoc b/docs/examples/guide/ed5c3b45e8de912faba44507d827eb93.asciidoc deleted file mode 100644 index 9e142c5eed..0000000000 --- a/docs/examples/guide/ed5c3b45e8de912faba44507d827eb93.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - sort: [ - { - _geo_distance: { - 'pin.location' => 'POINT (-70 40)', - order: 'asc', - unit: 'km' - } - } - ], - query: { - term: { - user: 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ed688d86eeaa4d7969acb0f574eb917f.asciidoc b/docs/examples/guide/ed688d86eeaa4d7969acb0f574eb917f.asciidoc deleted file mode 100644 index 54461f57f8..0000000000 --- a/docs/examples/guide/ed688d86eeaa4d7969acb0f574eb917f.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my_queries1', - id: 1, - refresh: true, - body: { - query: { - term: { - 'my_field.prefix' => 'abc' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ed6b996ea389e0955a01c2e67f4c8339.asciidoc b/docs/examples/guide/ed6b996ea389e0955a01c2e67f4c8339.asciidoc deleted file mode 100644 index 560a362ba0..0000000000 --- a/docs/examples/guide/ed6b996ea389e0955a01c2e67f4c8339.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.field_caps( - index: 'my-index-000001', - fields: 'my-field' -) -puts response ----- diff --git a/docs/examples/guide/ed7fa1971ac322aeccd6391ab32d0490.asciidoc b/docs/examples/guide/ed7fa1971ac322aeccd6391ab32d0490.asciidoc deleted file mode 100644 index 349952075b..0000000000 --- a/docs/examples/guide/ed7fa1971ac322aeccd6391ab32d0490.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.nodes( - v: true, - h: 'name,master,node.role,disk.used_percent,disk.used,disk.avail,disk.total' -) -puts response ----- diff --git a/docs/examples/guide/ed85ed833bec7286a0dfbe64077c5715.asciidoc b/docs/examples/guide/ed85ed833bec7286a0dfbe64077c5715.asciidoc deleted file mode 100644 index d10a1c8f64..0000000000 --- a/docs/examples/guide/ed85ed833bec7286a0dfbe64077c5715.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'danish_example', - body: { - settings: { - analysis: { - filter: { - danish_stop: { - type: 'stop', - stopwords: '_danish_' - }, - danish_keywords: { - type: 'keyword_marker', - keywords: [ - 'eksempel' - ] - }, - danish_stemmer: { - type: 'stemmer', - language: 'danish' - } - }, - analyzer: { - rebuilt_danish: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'danish_stop', - 'danish_keywords', - 'danish_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/edae616e1244babf6032aecc6aaaf836.asciidoc b/docs/examples/guide/edae616e1244babf6032aecc6aaaf836.asciidoc deleted file mode 100644 index 5deea04c70..0000000000 --- a/docs/examples/guide/edae616e1244babf6032aecc6aaaf836.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - sort: [ - { - _geo_distance: { - 'pin.location' => { - lat: 40, - lon: -70 - }, - order: 'asc', - unit: 'km' - } - } - ], - query: { - term: { - user: 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/edb5cad890208014ecd91f3f739ce193.asciidoc b/docs/examples/guide/edb5cad890208014ecd91f3f739ce193.asciidoc deleted file mode 100644 index 5ad7d941be..0000000000 --- a/docs/examples/guide/edb5cad890208014ecd91f3f739ce193.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.rollover( - alias: 'metrics-weather_sensors-dev' -) -puts response ----- diff --git a/docs/examples/guide/edcfadbfb14d97a2f5e6e21ef7039818.asciidoc b/docs/examples/guide/edcfadbfb14d97a2f5e6e21ef7039818.asciidoc deleted file mode 100644 index 2c193ace41..0000000000 --- a/docs/examples/guide/edcfadbfb14d97a2f5e6e21ef7039818.asciidoc +++ /dev/null @@ -1,39 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - function_score: { - query: { - match_all: {} - }, - boost: '5', - functions: [ - { - filter: { - match: { - test: 'bar' - } - }, - random_score: {}, - weight: 23 - }, - { - filter: { - match: { - test: 'cat' - } - }, - weight: 42 - } - ], - max_boost: 42, - score_mode: 'max', - boost_mode: 'multiply', - min_score: 42 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ee08328cd157d547de19b4abe867b23e.asciidoc b/docs/examples/guide/ee08328cd157d547de19b4abe867b23e.asciidoc deleted file mode 100644 index fc15995bca..0000000000 --- a/docs/examples/guide/ee08328cd157d547de19b4abe867b23e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_alias( - name: 'logs' -) -puts response ----- diff --git a/docs/examples/guide/ee0fd67acc807f1bddf5e9807c06e7eb.asciidoc b/docs/examples/guide/ee0fd67acc807f1bddf5e9807c06e7eb.asciidoc deleted file mode 100644 index 45cfc002e9..0000000000 --- a/docs/examples/guide/ee0fd67acc807f1bddf5e9807c06e7eb.asciidoc +++ /dev/null @@ -1,94 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index', - body: { - query: { - weighted_tokens: { - query_expansion_field: { - tokens: { - "2161": 0.4679, - "2621": 0.307, - "2782": 0.1299, - "2851": 0.1056, - "3088": 0.3041, - "3376": 0.1038, - "3467": 0.4873, - "3684": 0.8958, - "4380": 0.334, - "4542": 0.4636, - "4633": 2.2805, - "4785": 1.2628, - "4860": 1.0655, - "5133": 1.0709, - "7139": 1.0016, - "7224": 0.2486, - "7387": 0.0985, - "7394": 0.0542, - "8915": 0.369, - "9156": 2.8947, - "10505": 0.2771, - "11464": 0.3996, - "13525": 0.0088, - "14178": 0.8161, - "16893": 0.1376, - "17851": 1.5348, - "19939": 0.6012 - }, - pruning_config: { - tokens_freq_ratio_threshold: 5, - tokens_weight_threshold: 0.4, - only_score_pruned_tokens: false - } - } - } - }, - rescore: { - window_size: 100, - query: { - rescore_query: { - weighted_tokens: { - query_expansion_field: { - tokens: { - "2161": 0.4679, - "2621": 0.307, - "2782": 0.1299, - "2851": 0.1056, - "3088": 0.3041, - "3376": 0.1038, - "3467": 0.4873, - "3684": 0.8958, - "4380": 0.334, - "4542": 0.4636, - "4633": 2.2805, - "4785": 1.2628, - "4860": 1.0655, - "5133": 1.0709, - "7139": 1.0016, - "7224": 0.2486, - "7387": 0.0985, - "7394": 0.0542, - "8915": 0.369, - "9156": 2.8947, - "10505": 0.2771, - "11464": 0.3996, - "13525": 0.0088, - "14178": 0.8161, - "16893": 0.1376, - "17851": 1.5348, - "19939": 0.6012 - }, - pruning_config: { - tokens_freq_ratio_threshold: 5, - tokens_weight_threshold: 0.4, - only_score_pruned_tokens: true - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ee2d97090d617ed8aa2a87ea33556dd7.asciidoc b/docs/examples/guide/ee2d97090d617ed8aa2a87ea33556dd7.asciidoc deleted file mode 100644 index 37dc74dfb7..0000000000 --- a/docs/examples/guide/ee2d97090d617ed8aa2a87ea33556dd7.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'whitespace', - filter: [ - 'truncate' - ], - text: 'the quinquennial extravaganza carried on' - } -) -puts response ----- diff --git a/docs/examples/guide/eeb35b759bd239bb773c8ebd5fe63d05.asciidoc b/docs/examples/guide/eeb35b759bd239bb773c8ebd5fe63d05.asciidoc deleted file mode 100644 index f06d8e78d8..0000000000 --- a/docs/examples/guide/eeb35b759bd239bb773c8ebd5fe63d05.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'museums', - size: 0, - body: { - aggregations: { - cities: { - terms: { - field: 'city.keyword' - }, - aggregations: { - centroid: { - geo_centroid: { - field: 'location' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eec051555c8050d017d3fe38ea59e3a0.asciidoc b/docs/examples/guide/eec051555c8050d017d3fe38ea59e3a0.asciidoc deleted file mode 100644 index af7b7ab1fd..0000000000 --- a/docs/examples/guide/eec051555c8050d017d3fe38ea59e3a0.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - from: 40, - size: 20, - body: { - query: { - term: { - 'user.id' => 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eef9deff7f9799d1f7657bb7e2afb7f1.asciidoc b/docs/examples/guide/eef9deff7f9799d1f7657bb7e2afb7f1.asciidoc deleted file mode 100644 index 7b7add90d4..0000000000 --- a/docs/examples/guide/eef9deff7f9799d1f7657bb7e2afb7f1.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete( - index: '*', - expand_wildcards: 'all' -) -puts response ----- diff --git a/docs/examples/guide/ef10e8d07d9fae945e035d5dee1e9754.asciidoc b/docs/examples/guide/ef10e8d07d9fae945e035d5dee1e9754.asciidoc deleted file mode 100644 index 9f5d19a06d..0000000000 --- a/docs/examples/guide/ef10e8d07d9fae945e035d5dee1e9754.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - { - type: 'synonym_graph', - synonyms: [ - 'dns, domain name system' - ] - }, - 'flatten_graph' - ], - text: 'domain name system is fragile' - } -) -puts response ----- diff --git a/docs/examples/guide/ef22234b97cc06d7dd620b4ce7c97b31.asciidoc b/docs/examples/guide/ef22234b97cc06d7dd620b4ce7c97b31.asciidoc deleted file mode 100644 index 0c43da5280..0000000000 --- a/docs/examples/guide/ef22234b97cc06d7dd620b4ce7c97b31.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - max_docs: 1, - source: { - index: 'my-index-000001' - }, - dest: { - index: 'my-new-index-000001' - } - } -) -puts response ----- diff --git a/docs/examples/guide/ef33b3b373f7040b874146599db5d557.asciidoc b/docs/examples/guide/ef33b3b373f7040b874146599db5d557.asciidoc deleted file mode 100644 index de8f594d3e..0000000000 --- a/docs/examples/guide/ef33b3b373f7040b874146599db5d557.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'keyword', - filter: [ - 'lowercase' - ], - text: 'this is a test' - } -) -puts response ----- diff --git a/docs/examples/guide/ef3666b5d288faefbcbc4a25e8f506da.asciidoc b/docs/examples/guide/ef3666b5d288faefbcbc4a25e8f506da.asciidoc deleted file mode 100644 index b47d4bffd8..0000000000 --- a/docs/examples/guide/ef3666b5d288faefbcbc4a25e8f506da.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.count( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc b/docs/examples/guide/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc deleted file mode 100644 index 9772ac2d70..0000000000 --- a/docs/examples/guide/ef779b87b3b0fb6e6bae9c8875e3a1cf.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - runtime_mappings: { - 'date.promoted_is_tomorrow' => { - type: 'date', - script: "\n long date = doc['date'].value.toInstant().toEpochMilli();\n if (doc['promoted'].value) {\n date += 86400;\n }\n emit(date);\n " - } - }, - aggregations: { - sales_over_time: { - date_histogram: { - field: 'date.promoted_is_tomorrow', - calendar_interval: '1M' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ef867e563cbffe7866769a096b5d7a92.asciidoc b/docs/examples/guide/ef867e563cbffe7866769a096b5d7a92.asciidoc deleted file mode 100644 index 5d1418134f..0000000000 --- a/docs/examples/guide/ef867e563cbffe7866769a096b5d7a92.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - size: 0, - aggregations: { - sales_per_month: { - date_histogram: { - field: 'date', - calendar_interval: 'month' - }, - aggregations: { - sales: { - sum: { - field: 'price' - } - }, - cumulative_sales: { - cumulative_sum: { - buckets_path: 'sales' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ef8f30e85e12e9a5a8817d28977598e4.asciidoc b/docs/examples/guide/ef8f30e85e12e9a5a8817d28977598e4.asciidoc deleted file mode 100644 index bf7e2931d3..0000000000 --- a/docs/examples/guide/ef8f30e85e12e9a5a8817d28977598e4.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - body: { - aggregations: { - price_ranges: { - range: { - field: 'price', - ranges: [ - { - to: 100 - }, - { - from: 100, - to: 200 - }, - { - from: 200 - } - ] - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ef9c29759459904fef162acd223462c4.asciidoc b/docs/examples/guide/ef9c29759459904fef162acd223462c4.asciidoc deleted file mode 100644 index 9f3f884651..0000000000 --- a/docs/examples/guide/ef9c29759459904fef162acd223462c4.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - metric: 'ingest', - filter_path: 'nodes.*.ingest' -) -puts response ----- diff --git a/docs/examples/guide/eff2fc92d46eb3c8f4d424eed18f54a2.asciidoc b/docs/examples/guide/eff2fc92d46eb3c8f4d424eed18f54a2.asciidoc deleted file mode 100644 index dc32c28d77..0000000000 --- a/docs/examples/guide/eff2fc92d46eb3c8f4d424eed18f54a2.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - function_score: { - query: { - match_all: {} - }, - boost: '5', - random_score: {}, - boost_mode: 'multiply' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/eff8ecaed1ed084909c64450fc363a20.asciidoc b/docs/examples/guide/eff8ecaed1ed084909c64450fc363a20.asciidoc deleted file mode 100644 index c94a451c56..0000000000 --- a/docs/examples/guide/eff8ecaed1ed084909c64450fc363a20.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - transient: { - 'indices.recovery.max_bytes_per_sec' => nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/f04e1284d09ceb4443d67b2ef9c7f476.asciidoc b/docs/examples/guide/f04e1284d09ceb4443d67b2ef9c7f476.asciidoc deleted file mode 100644 index 623e3d1d8c..0000000000 --- a/docs/examples/guide/f04e1284d09ceb4443d67b2ef9c7f476.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.delete( - repository: 'my_repository', - snapshot: 'my_snapshot' -) -puts response ----- diff --git a/docs/examples/guide/f0816beb8ac21cb0940858b72f6b1946.asciidoc b/docs/examples/guide/f0816beb8ac21cb0940858b72f6b1946.asciidoc deleted file mode 100644 index a066f232f3..0000000000 --- a/docs/examples/guide/f0816beb8ac21cb0940858b72f6b1946.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.fielddata( - fields: 'body,soul', - v: true -) -puts response ----- diff --git a/docs/examples/guide/f097c02541056f3c0fc855e7bbeef8a8.asciidoc b/docs/examples/guide/f097c02541056f3c0fc855e7bbeef8a8.asciidoc deleted file mode 100644 index 5f44e262a7..0000000000 --- a/docs/examples/guide/f097c02541056f3c0fc855e7bbeef8a8.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'swedish_example', - body: { - settings: { - analysis: { - filter: { - swedish_stop: { - type: 'stop', - stopwords: '_swedish_' - }, - swedish_keywords: { - type: 'keyword_marker', - keywords: [ - 'exempel' - ] - }, - swedish_stemmer: { - type: 'stemmer', - language: 'swedish' - } - }, - analyzer: { - rebuilt_swedish: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'swedish_stop', - 'swedish_keywords', - 'swedish_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f09817fd13ff3dce52eb79d0722409c3.asciidoc b/docs/examples/guide/f09817fd13ff3dce52eb79d0722409c3.asciidoc deleted file mode 100644 index 451b2f9ae6..0000000000 --- a/docs/examples/guide/f09817fd13ff3dce52eb79d0722409c3.asciidoc +++ /dev/null @@ -1,52 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'new_index', - body: { - mappings: { - properties: { - query: { - type: 'percolator' - }, - body: { - type: 'text' - } - } - } - } -) -puts response - -response = client.reindex( - refresh: true, - body: { - source: { - index: 'index' - }, - dest: { - index: 'new_index' - } - } -) -puts response - -response = client.indices.update_aliases( - body: { - actions: [ - { - remove: { - index: 'index', - alias: 'queries' - } - }, - { - add: { - index: 'new_index', - alias: 'queries' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/f0bfc8d7ab4eb94ea5fdf2e087d8cf5b.asciidoc b/docs/examples/guide/f0bfc8d7ab4eb94ea5fdf2e087d8cf5b.asciidoc deleted file mode 100644 index 8f6f3a714e..0000000000 --- a/docs/examples/guide/f0bfc8d7ab4eb94ea5fdf2e087d8cf5b.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'latency', - body: { - size: 0, - runtime_mappings: { - 'load_time.seconds' => { - type: 'long', - script: { - source: "emit(doc['load_time'].value / params.timeUnit)", - params: { - "timeUnit": 1000 - } - } - } - }, - aggregations: { - load_time_boxplot: { - boxplot: { - field: 'load_time.seconds' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f0c3235d8fce641d6ff8ce90ab7b7b8b.asciidoc b/docs/examples/guide/f0c3235d8fce641d6ff8ce90ab7b7b8b.asciidoc deleted file mode 100644 index 7f7f18af5a..0000000000 --- a/docs/examples/guide/f0c3235d8fce641d6ff8ce90ab7b7b8b.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.mtermvectors( - index: 'my-index-000001', - body: { - ids: [ - '1', - '2' - ], - parameters: { - fields: [ - 'message' - ], - term_statistics: true - } - } -) -puts response ----- diff --git a/docs/examples/guide/f10ab582387b2c157917a60205c993f7.asciidoc b/docs/examples/guide/f10ab582387b2c157917a60205c993f7.asciidoc deleted file mode 100644 index 4c6f482c8b..0000000000 --- a/docs/examples/guide/f10ab582387b2c157917a60205c993f7.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - latency: { - type: 'long', - meta: { - unit: 'ms' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f128a9dff5051b47efe2c53c4454a68f.asciidoc b/docs/examples/guide/f128a9dff5051b47efe2c53c4454a68f.asciidoc deleted file mode 100644 index 133c761ede..0000000000 --- a/docs/examples/guide/f128a9dff5051b47efe2c53c4454a68f.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.indices.rollover( - alias: 'my-data-stream', - body: { - conditions: { - max_age: '7d', - max_docs: 1000, - max_primary_shard_size: '50gb', - max_primary_shard_docs: '2000' - } - } -) -puts response ----- diff --git a/docs/examples/guide/f14d0e4a280fee540e8e5f0fc4d0e9f1.asciidoc b/docs/examples/guide/f14d0e4a280fee540e8e5f0fc4d0e9f1.asciidoc deleted file mode 100644 index b078ff5ec0..0000000000 --- a/docs/examples/guide/f14d0e4a280fee540e8e5f0fc4d0e9f1.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - size: 0, - aggregations: { - grouped: { - geotile_grid: { - field: 'location', - precision: 6 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f1508a2221152842894819e762e63491.asciidoc b/docs/examples/guide/f1508a2221152842894819e762e63491.asciidoc deleted file mode 100644 index d66373ce64..0000000000 --- a/docs/examples/guide/f1508a2221152842894819e762e63491.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'json', - body: { - keep_on_completion: true, - wait_for_completion_timeout: '2s', - query: 'SELECT * FROM library ORDER BY page_count DESC', - fetch_size: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/f160561efab38e40c2feebf5a2542ab5.asciidoc b/docs/examples/guide/f160561efab38e40c2feebf5a2542ab5.asciidoc deleted file mode 100644 index 36af284cab..0000000000 --- a/docs/examples/guide/f160561efab38e40c2feebf5a2542ab5.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.nodes.stats( - metric: 'ingest', - filter_path: 'nodes.*.ingest.pipelines' -) -puts response ----- diff --git a/docs/examples/guide/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc b/docs/examples/guide/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc deleted file mode 100644 index b86bb8e691..0000000000 --- a/docs/examples/guide/f1b24217b1d9ba6ea5e4fa6e6f412022.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.inference.inference( - task_type: 'rerank', - inference_id: 'cohere_rerank', - body: { - input: [ - 'luke', - 'like', - 'leia', - 'chewy', - 'r2d2', - 'star', - 'wars' - ], - query: 'star wars main character' - } -) -puts response ----- diff --git a/docs/examples/guide/f1bf3edbd9e6c7e01b00c74c99a58b61.asciidoc b/docs/examples/guide/f1bf3edbd9e6c7e01b00c74c99a58b61.asciidoc deleted file mode 100644 index 94853ee8c7..0000000000 --- a/docs/examples/guide/f1bf3edbd9e6c7e01b00c74c99a58b61.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - cluster: { - remote: { - cluster_one: { - seeds: [ - '127.0.0.1:9300' - ] - }, - cluster_two: { - seeds: [ - '127.0.0.1:9301' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f1d2b8169160adfd27f32988113f0f9f.asciidoc b/docs/examples/guide/f1d2b8169160adfd27f32988113f0f9f.asciidoc deleted file mode 100644 index ba500eb623..0000000000 --- a/docs/examples/guide/f1d2b8169160adfd27f32988113f0f9f.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_analyzer: { - tokenizer: 'keyword', - filter: [ - 'word_delimiter' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f1dc6f69453867ffafe86e998dd464d9.asciidoc b/docs/examples/guide/f1dc6f69453867ffafe86e998dd464d9.asciidoc deleted file mode 100644 index bee9cbda7a..0000000000 --- a/docs/examples/guide/f1dc6f69453867ffafe86e998dd464d9.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'file-path-test', - body: { - query: { - term: { - 'file_path.tree_reversed' => { - value: 'my_photo1.jpg' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f1e2af6dbb30fc5335e7d0b5507a2a93.asciidoc b/docs/examples/guide/f1e2af6dbb30fc5335e7d0b5507a2a93.asciidoc deleted file mode 100644 index 29123e054d..0000000000 --- a/docs/examples/guide/f1e2af6dbb30fc5335e7d0b5507a2a93.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.reset_job( - job_id: 'total-requests' -) -puts response ----- diff --git a/docs/examples/guide/f2175feadc2abe545899889e6d4ffcad.asciidoc b/docs/examples/guide/f2175feadc2abe545899889e6d4ffcad.asciidoc deleted file mode 100644 index e5abdda3e1..0000000000 --- a/docs/examples/guide/f2175feadc2abe545899889e6d4ffcad.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.slm.get_lifecycle( - policy_id: 'daily-snapshots', - human: true -) -puts response ----- diff --git a/docs/examples/guide/f235544a883fd04bed2dc369b0c450f3.asciidoc b/docs/examples/guide/f235544a883fd04bed2dc369b0c450f3.asciidoc deleted file mode 100644 index 124de192c0..0000000000 --- a/docs/examples/guide/f235544a883fd04bed2dc369b0c450f3.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'txt', - body: { - query: 'SELECT * FROM library', - filter: { - terms: { - _routing: [ - 'abc' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f268416813befd13c604642c6fe6eda9.asciidoc b/docs/examples/guide/f268416813befd13c604642c6fe6eda9.asciidoc deleted file mode 100644 index d366967da7..0000000000 --- a/docs/examples/guide/f268416813befd13c604642c6fe6eda9.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'custom_lowercase_example', - body: { - settings: { - analysis: { - analyzer: { - greek_lowercase_example: { - type: 'custom', - tokenizer: 'standard', - filter: [ - 'greek_lowercase' - ] - } - }, - filter: { - greek_lowercase: { - type: 'lowercase', - language: 'greek' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f27c28ddbf4c266b5f42d14da837b8de.asciidoc b/docs/examples/guide/f27c28ddbf4c266b5f42d14da837b8de.asciidoc deleted file mode 100644 index 2c0c0b61bc..0000000000 --- a/docs/examples/guide/f27c28ddbf4c266b5f42d14da837b8de.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.indices.flush -puts response ----- diff --git a/docs/examples/guide/f281ff50b2cdb67ac0ece93f1594fa95.asciidoc b/docs/examples/guide/f281ff50b2cdb67ac0ece93f1594fa95.asciidoc deleted file mode 100644 index 618b5a1f7f..0000000000 --- a/docs/examples/guide/f281ff50b2cdb67ac0ece93f1594fa95.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'example_points', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_shape: { - location: { - shape: { - type: 'envelope', - coordinates: [ - [ - 13, - 53 - ], - [ - 14, - 52 - ] - ] - }, - relation: 'intersects' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f298c4eb50ea97b34c57f8756eb350d3.asciidoc b/docs/examples/guide/f298c4eb50ea97b34c57f8756eb350d3.asciidoc deleted file mode 100644 index a623fa81f5..0000000000 --- a/docs/examples/guide/f298c4eb50ea97b34c57f8756eb350d3.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.cat.pending_tasks( - v: true -) -puts response ----- diff --git a/docs/examples/guide/f29a28fffa7ec604a33a838f48f7ea79.asciidoc b/docs/examples/guide/f29a28fffa7ec604a33a838f48f7ea79.asciidoc deleted file mode 100644 index 852e80fa76..0000000000 --- a/docs/examples/guide/f29a28fffa7ec604a33a838f48f7ea79.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - bool: { - must: [ - { - match: { - title: 'Search' - } - }, - { - match: { - content: 'Elasticsearch' - } - } - ], - filter: [ - { - term: { - status: 'published' - } - }, - { - range: { - publish_date: { - gte: '2015-01-01' - } - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f29b2674299ddf51a25ed87619025ede.asciidoc b/docs/examples/guide/f29b2674299ddf51a25ed87619025ede.asciidoc deleted file mode 100644 index 349c946933..0000000000 --- a/docs/examples/guide/f29b2674299ddf51a25ed87619025ede.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.rollup.rollup_search( - index: 'sensor_rollup', - body: { - size: 0, - aggregations: { - max_temperature: { - max: { - field: 'temperature' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc b/docs/examples/guide/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc deleted file mode 100644 index a4b6902fbe..0000000000 --- a/docs/examples/guide/f2a5f77f929cc7b893b80f4bd5b1a192.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.get( - connector_id: 'my-connector' -) -puts response ----- diff --git a/docs/examples/guide/f2c9afd052878b2ec00908739b0d0f74.asciidoc b/docs/examples/guide/f2c9afd052878b2ec00908739b0d0f74.asciidoc deleted file mode 100644 index 998ec83a1a..0000000000 --- a/docs/examples/guide/f2c9afd052878b2ec00908739b0d0f74.asciidoc +++ /dev/null @@ -1,38 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'my-pipeline', - body: { - processors: [ - { - rename: { - description: "Rename 'provider' to 'cloud.provider'", - field: 'provider', - target_field: 'cloud.provider', - on_failure: [ - { - set: { - description: "Set 'error.message'", - field: 'error.message', - value: "Field 'provider' does not exist. Cannot rename to 'cloud.provider'", - override: false, - on_failure: [ - { - set: { - description: "Set 'error.message.multi'", - field: 'error.message.multi', - value: 'Document encountered multiple ingest errors', - override: true - } - } - ] - } - } - ] - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/f2da3937e5f0718527e6eb73aa261b1f.asciidoc b/docs/examples/guide/f2da3937e5f0718527e6eb73aa261b1f.asciidoc deleted file mode 100644 index 89faf9ab29..0000000000 --- a/docs/examples/guide/f2da3937e5f0718527e6eb73aa261b1f.asciidoc +++ /dev/null @@ -1,53 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'mv', - body: { - mappings: { - properties: { - b: { - type: 'long' - } - } - } - } -) -puts response - -response = client.bulk( - index: 'mv', - refresh: true, - body: [ - { - index: {} - }, - { - a: 1, - b: [ - 2, - 2, - 1 - ] - }, - { - index: {} - }, - { - a: 2, - b: [ - 1, - 1 - ] - } - ] -) -puts response - -response = client.esql.query( - body: { - query: 'FROM mv | EVAL b=TO_STRING(b) | LIMIT 2', - version: '2024.04.01' - } -) -puts response ----- diff --git a/docs/examples/guide/f2e854b6c99659ccc1824e86c096e433.asciidoc b/docs/examples/guide/f2e854b6c99659ccc1824e86c096e433.asciidoc deleted file mode 100644 index 4513203db1..0000000000 --- a/docs/examples/guide/f2e854b6c99659ccc1824e86c096e433.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ccr.resume_auto_follow_pattern( - name: 'my_auto_follow_pattern' -) -puts response ----- diff --git a/docs/examples/guide/f2ec53c0ef5025de8890d0ff8ec287a0.asciidoc b/docs/examples/guide/f2ec53c0ef5025de8890d0ff8ec287a0.asciidoc deleted file mode 100644 index b1ee387f55..0000000000 --- a/docs/examples/guide/f2ec53c0ef5025de8890d0ff8ec287a0.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.rank_eval( - index: 'my-index-000001', - body: { - requests: [ - { - id: 'JFK query', - request: { - query: { - match_all: {} - } - }, - ratings: [] - } - ], - metric: { - mean_reciprocal_rank: { - k: 20, - relevant_rating_threshold: 1 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f2f1cae094855a45fd8f73478bec8e70.asciidoc b/docs/examples/guide/f2f1cae094855a45fd8f73478bec8e70.asciidoc deleted file mode 100644 index 89a0e615a0..0000000000 --- a/docs/examples/guide/f2f1cae094855a45fd8f73478bec8e70.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.split( - index: 'my_source_index', - target: 'my_target_index', - body: { - settings: { - 'index.number_of_shards' => 5 - }, - aliases: { - my_search_indices: {} - } - } -) -puts response ----- diff --git a/docs/examples/guide/f329242d7c8406297eff9bf609870c37.asciidoc b/docs/examples/guide/f329242d7c8406297eff9bf609870c37.asciidoc deleted file mode 100644 index 828c71a15b..0000000000 --- a/docs/examples/guide/f329242d7c8406297eff9bf609870c37.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'music', - pretty: true, - body: { - suggest: { - "song-suggest": { - prefix: 'nor', - completion: { - field: 'suggest', - fuzzy: { - fuzziness: 2 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc b/docs/examples/guide/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc deleted file mode 100644 index 5641e5254f..0000000000 --- a/docs/examples/guide/f32f0c19b42de3b87dd764fe4ca17e7c.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - default_field: 'title', - query: 'ny city', - auto_generate_synonyms_phrase_query: false - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f342465c65ba76383dedbb334b57b616.asciidoc b/docs/examples/guide/f342465c65ba76383dedbb334b57b616.asciidoc deleted file mode 100644 index 0a50edf18f..0000000000 --- a/docs/examples/guide/f342465c65ba76383dedbb334b57b616.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - text: { - type: 'text', - index_options: 'offsets' - } - } - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - text: 'Quick brown fox' - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - text: 'brown fox' - } - }, - highlight: { - fields: { - text: {} - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f3574cfee3971d98417b8dc574a91be0.asciidoc b/docs/examples/guide/f3574cfee3971d98417b8dc574a91be0.asciidoc deleted file mode 100644 index de13a3ca09..0000000000 --- a/docs/examples/guide/f3574cfee3971d98417b8dc574a91be0.asciidoc +++ /dev/null @@ -1,43 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - flattened: { - type: 'flattened' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - flattened: { - field: [ - { - id: 1, - name: 'foo' - }, - { - id: 2, - name: 'bar' - }, - { - id: 3, - name: 'baz' - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/f3594de7ef39ab09b0bb12c1e76bfe6b.asciidoc b/docs/examples/guide/f3594de7ef39ab09b0bb12c1e76bfe6b.asciidoc deleted file mode 100644 index 48e2320a07..0000000000 --- a/docs/examples/guide/f3594de7ef39ab09b0bb12c1e76bfe6b.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.shrink( - index: 'my_source_index', - target: 'my_target_index', - body: { - settings: { - 'index.routing.allocation.require._name' => nil, - 'index.blocks.write' => nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/f3697682a886ab129530f3e5c1b30632.asciidoc b/docs/examples/guide/f3697682a886ab129530f3e5c1b30632.asciidoc deleted file mode 100644 index 676e500df5..0000000000 --- a/docs/examples/guide/f3697682a886ab129530f3e5c1b30632.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.termvectors( - index: 'my-index-000001', - id: 1 -) -puts response ----- diff --git a/docs/examples/guide/f37173a75cd1b0d683c6f67819dd1de3.asciidoc b/docs/examples/guide/f37173a75cd1b0d683c6f67819dd1de3.asciidoc deleted file mode 100644 index f099938a8e..0000000000 --- a/docs/examples/guide/f37173a75cd1b0d683c6f67819dd1de3.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.get( - index: 'my-new-index-000001', - id: 1 -) -puts response ----- diff --git a/docs/examples/guide/f38262ef72f73816ec35fa4c9c85760d.asciidoc b/docs/examples/guide/f38262ef72f73816ec35fa4c9c85760d.asciidoc deleted file mode 100644 index c219238128..0000000000 --- a/docs/examples/guide/f38262ef72f73816ec35fa4c9c85760d.asciidoc +++ /dev/null @@ -1,45 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - my_range: { - type: 'long_range' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - my_range: [ - { - gte: 200, - lte: 300 - }, - { - gte: 1, - lte: 100 - }, - { - gte: 200, - lte: 300 - }, - { - gte: 200, - lte: 500 - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/f39512478cae2db8f4566a1e4af9e8f5.asciidoc b/docs/examples/guide/f39512478cae2db8f4566a1e4af9e8f5.asciidoc deleted file mode 100644 index c529ddcfb5..0000000000 --- a/docs/examples/guide/f39512478cae2db8f4566a1e4af9e8f5.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.rollup.rollup_search( - index: 'sensor_rollup', - body: { - size: 0, - aggregations: { - timeline: { - date_histogram: { - field: 'timestamp', - fixed_interval: '7d' - }, - aggregations: { - nodes: { - terms: { - field: 'node' - }, - aggregations: { - max_temperature: { - max: { - field: 'temperature' - } - }, - avg_voltage: { - avg: { - field: 'voltage' - } - } - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f3b185131f40687c25d2f85e1231d8bd.asciidoc b/docs/examples/guide/f3b185131f40687c25d2f85e1231d8bd.asciidoc deleted file mode 100644 index 7162bcbbba..0000000000 --- a/docs/examples/guide/f3b185131f40687c25d2f85e1231d8bd.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.validate_query( - index: 'my-index-000001', - q: 'user.id:kimchy' -) -puts response ----- diff --git a/docs/examples/guide/f3b4ddce8ff21fc1a76a7c0d9c36650e.asciidoc b/docs/examples/guide/f3b4ddce8ff21fc1a76a7c0d9c36650e.asciidoc deleted file mode 100644 index e04e9951a4..0000000000 --- a/docs/examples/guide/f3b4ddce8ff21fc1a76a7c0d9c36650e.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - warm: { - actions: { - shrink: { - number_of_shards: 1 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f3c696cd63a3f042e62cbb94b75c2427.asciidoc b/docs/examples/guide/f3c696cd63a3f042e62cbb94b75c2427.asciidoc deleted file mode 100644 index 117792621f..0000000000 --- a/docs/examples/guide/f3c696cd63a3f042e62cbb94b75c2427.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cluster.get_settings( - flat_settings: true, - filter_path: 'persistent.archived*' -) -puts response ----- diff --git a/docs/examples/guide/f3e1dfe1c440e3590be26f265e19425d.asciidoc b/docs/examples/guide/f3e1dfe1c440e3590be26f265e19425d.asciidoc deleted file mode 100644 index d6390dfae3..0000000000 --- a/docs/examples/guide/f3e1dfe1c440e3590be26f265e19425d.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - script_score: { - query: { - bool: { - filter: { - term: { - status: 'published' - } - } - } - }, - script: { - source: "1 / (1 + l2norm(params.queryVector, 'my_dense_vector'))", - params: { - "queryVector": [ - 4, - 3.4, - -0.2 - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f3fb52680482925c202c2e2f8af6f044.asciidoc b/docs/examples/guide/f3fb52680482925c202c2e2f8af6f044.asciidoc deleted file mode 100644 index e9fb64b457..0000000000 --- a/docs/examples/guide/f3fb52680482925c202c2e2f8af6f044.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.cat.count( - index: 'my-index-000001', - v: true -) -puts response ----- diff --git a/docs/examples/guide/f3fe2012557ebbce1ebad4fc997c092d.asciidoc b/docs/examples/guide/f3fe2012557ebbce1ebad4fc997c092d.asciidoc deleted file mode 100644 index 8fb105f535..0000000000 --- a/docs/examples/guide/f3fe2012557ebbce1ebad4fc997c092d.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.create_repository( - repository: 'my_fs_backup', - body: { - type: 'fs', - settings: { - location: 'my_fs_backup_location' - } - } -) -puts response ----- diff --git a/docs/examples/guide/f43d551aaaad73d979adf1b86533e6a3.asciidoc b/docs/examples/guide/f43d551aaaad73d979adf1b86533e6a3.asciidoc deleted file mode 100644 index 163c95d522..0000000000 --- a/docs/examples/guide/f43d551aaaad73d979adf1b86533e6a3.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - sales_over_time: { - date_histogram: { - field: 'date', - fixed_interval: '2w' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f43ec4041e3b72bbde063452990bfc4b.asciidoc b/docs/examples/guide/f43ec4041e3b72bbde063452990bfc4b.asciidoc deleted file mode 100644 index 4e9e26ad37..0000000000 --- a/docs/examples/guide/f43ec4041e3b72bbde063452990bfc4b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.clear_cache( - index: 'my-index-000001,my-index-000002' -) -puts response ----- diff --git a/docs/examples/guide/f44d287c6937785eb09b91353c1deb1e.asciidoc b/docs/examples/guide/f44d287c6937785eb09b91353c1deb1e.asciidoc deleted file mode 100644 index badf14b014..0000000000 --- a/docs/examples/guide/f44d287c6937785eb09b91353c1deb1e.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_datafeed_stats( - datafeed_id: 'datafeed-high_sum_total_sales' -) -puts response ----- diff --git a/docs/examples/guide/f453e14bcf30853e57618bf12f83e148.asciidoc b/docs/examples/guide/f453e14bcf30853e57618bf12f83e148.asciidoc deleted file mode 100644 index 71ccc32c41..0000000000 --- a/docs/examples/guide/f453e14bcf30853e57618bf12f83e148.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'pattern_example', - body: { - settings: { - analysis: { - tokenizer: { - split_on_non_word: { - type: 'pattern', - pattern: '\\W+' - } - }, - analyzer: { - rebuilt_pattern: { - tokenizer: 'split_on_non_word', - filter: [ - 'lowercase' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f454e3f8ad5f5bd82a4a25af7dee9ca1.asciidoc b/docs/examples/guide/f454e3f8ad5f5bd82a4a25af7dee9ca1.asciidoc deleted file mode 100644 index 7e6df7c137..0000000000 --- a/docs/examples/guide/f454e3f8ad5f5bd82a4a25af7dee9ca1.asciidoc +++ /dev/null @@ -1,51 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - message: 'some arrays in this document...', - tags: [ - 'elasticsearch', - 'wow' - ], - lists: [ - { - name: 'prog_list', - description: 'programming list' - }, - { - name: 'cool_list', - description: 'cool stuff list' - } - ] - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 2, - body: { - message: 'no arrays in this document...', - tags: 'elasticsearch', - lists: { - name: 'prog_list', - description: 'programming list' - } - } -) -puts response - -response = client.search( - index: 'my-index-000001', - body: { - query: { - match: { - tags: 'elasticsearch' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f45990264f8755b96b11c69c12c90ff4.asciidoc b/docs/examples/guide/f45990264f8755b96b11c69c12c90ff4.asciidoc deleted file mode 100644 index 315d7f712e..0000000000 --- a/docs/examples/guide/f45990264f8755b96b11c69c12c90ff4.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.exists( - index: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/f495f9c99916a05e3b28166d31955fad.asciidoc b/docs/examples/guide/f495f9c99916a05e3b28166d31955fad.asciidoc deleted file mode 100644 index 5be84ab8b9..0000000000 --- a/docs/examples/guide/f495f9c99916a05e3b28166d31955fad.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - genres: { - terms: { - field: 'genre', - order: { - 'playback_stats.max' => 'desc' - } - }, - aggregations: { - playback_stats: { - stats: { - field: 'play_count' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f49ac80f0130cae8d0ea6f4472a149dd.asciidoc b/docs/examples/guide/f49ac80f0130cae8d0ea6f4472a149dd.asciidoc deleted file mode 100644 index 003a91cb15..0000000000 --- a/docs/examples/guide/f49ac80f0130cae8d0ea6f4472a149dd.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-image-index', - body: { - mappings: { - properties: { - "image-vector": { - type: 'dense_vector', - dims: 3, - index: true, - similarity: 'l2_norm' - }, - "file-type": { - type: 'keyword' - }, - title: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f4ae3f3fbf07a7d39122ac5ac20b9c03.asciidoc b/docs/examples/guide/f4ae3f3fbf07a7d39122ac5ac20b9c03.asciidoc deleted file mode 100644 index 86ec87cc05..0000000000 --- a/docs/examples/guide/f4ae3f3fbf07a7d39122ac5ac20b9c03.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'quantized-image-index', - body: { - mappings: { - properties: { - "image-vector": { - type: 'dense_vector', - element_type: 'float', - dims: 2, - index: true, - index_options: { - type: 'int8_hnsw' - } - }, - title: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f4b9baed3c6a82be3672cbc8999c2368.asciidoc b/docs/examples/guide/f4b9baed3c6a82be3672cbc8999c2368.asciidoc deleted file mode 100644 index 84886012d1..0000000000 --- a/docs/examples/guide/f4b9baed3c6a82be3672cbc8999c2368.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.terms_enum( - index: 'stackoverflow', - body: { - field: 'tags', - string: 'kiba' - } -) -puts response ----- diff --git a/docs/examples/guide/f4d0ef2e0f76babee83d999fe35127f2.asciidoc b/docs/examples/guide/f4d0ef2e0f76babee83d999fe35127f2.asciidoc deleted file mode 100644 index 664be67972..0000000000 --- a/docs/examples/guide/f4d0ef2e0f76babee83d999fe35127f2.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.ingest.put_pipeline( - id: 'attachment', - body: { - description: 'Extract attachment information', - processors: [ - { - attachment: { - field: 'data', - indexed_chars: 11, - indexed_chars_field: 'max_size', - remove_binary: false - } - } - ] - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 'my_id_2', - pipeline: 'attachment', - body: { - data: 'e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=', - max_size: 5 - } -) -puts response - -response = client.get( - index: 'my-index-000001', - id: 'my_id_2' -) -puts response ----- diff --git a/docs/examples/guide/f4dc1286d0a2f8d1fde64fbf12fd9f8d.asciidoc b/docs/examples/guide/f4dc1286d0a2f8d1fde64fbf12fd9f8d.asciidoc deleted file mode 100644 index 60df29c193..0000000000 --- a/docs/examples/guide/f4dc1286d0a2f8d1fde64fbf12fd9f8d.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - 'cluster.routing.allocation.disk.watermark.low' => nil, - 'cluster.routing.allocation.disk.watermark.low.max_headroom' => nil, - 'cluster.routing.allocation.disk.watermark.high' => nil, - 'cluster.routing.allocation.disk.watermark.high.max_headroom' => nil, - 'cluster.routing.allocation.disk.watermark.flood_stage' => nil, - 'cluster.routing.allocation.disk.watermark.flood_stage.max_headroom' => nil, - 'cluster.routing.allocation.disk.watermark.flood_stage.frozen' => nil, - 'cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom' => nil - } - } -) -puts response ----- diff --git a/docs/examples/guide/f4e38856cd6a7531e8fa8df4abe0e1c4.asciidoc b/docs/examples/guide/f4e38856cd6a7531e8fa8df4abe0e1c4.asciidoc deleted file mode 100644 index 89ee8479d4..0000000000 --- a/docs/examples/guide/f4e38856cd6a7531e8fa8df4abe0e1c4.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index', - body: { - query: { - text_expansion: { - content_embedding: { - model_id: '.elser_model_2', - model_text: 'How to avoid muscle soreness after running?' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f4f557716049b23f8840d58d71e748f0.asciidoc b/docs/examples/guide/f4f557716049b23f8840d58d71e748f0.asciidoc deleted file mode 100644 index 5dddcc9807..0000000000 --- a/docs/examples/guide/f4f557716049b23f8840d58d71e748f0.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_settings( - index: 'my-index-000001', - body: { - index: { - refresh_interval: '-1' - } - } -) -puts response ----- diff --git a/docs/examples/guide/f5013174f77868da4dc40cdd745d4ea4.asciidoc b/docs/examples/guide/f5013174f77868da4dc40cdd745d4ea4.asciidoc deleted file mode 100644 index c422bf80a1..0000000000 --- a/docs/examples/guide/f5013174f77868da4dc40cdd745d4ea4.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - aggregations: { - genres: { - rare_terms: { - field: 'genre', - max_doc_count: 2 - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f5140f08f56c64b5789357539f8b9ba8.asciidoc b/docs/examples/guide/f5140f08f56c64b5789357539f8b9ba8.asciidoc deleted file mode 100644 index 499f8c6681..0000000000 --- a/docs/examples/guide/f5140f08f56c64b5789357539f8b9ba8.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete_alias( - index: 'my-data-stream', - name: 'my-alias' -) -puts response ----- diff --git a/docs/examples/guide/f545bb95214769aca993c1632a71ad2c.asciidoc b/docs/examples/guide/f545bb95214769aca993c1632a71ad2c.asciidoc deleted file mode 100644 index a3d32cf405..0000000000 --- a/docs/examples/guide/f545bb95214769aca993c1632a71ad2c.asciidoc +++ /dev/null @@ -1,60 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'french_example', - body: { - settings: { - analysis: { - filter: { - french_elision: { - type: 'elision', - articles_case: true, - articles: [ - 'l', - 'm', - 't', - 'qu', - 'n', - 's', - 'j', - 'd', - 'c', - 'jusqu', - 'quoiqu', - 'lorsqu', - 'puisqu' - ] - }, - french_stop: { - type: 'stop', - stopwords: '_french_' - }, - french_keywords: { - type: 'keyword_marker', - keywords: [ - 'Example' - ] - }, - french_stemmer: { - type: 'stemmer', - language: 'light_french' - } - }, - analyzer: { - rebuilt_french: { - tokenizer: 'standard', - filter: [ - 'french_elision', - 'lowercase', - 'french_stop', - 'french_keywords', - 'french_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f5815d573cee0447910c9668003887b8.asciidoc b/docs/examples/guide/f5815d573cee0447910c9668003887b8.asciidoc deleted file mode 100644 index a3c17c7101..0000000000 --- a/docs/examples/guide/f5815d573cee0447910c9668003887b8.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - aggregations: { - sales_over_time: { - date_histogram: { - field: 'date', - calendar_interval: '2d' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f58969ac405db85f439c5940d014964b.asciidoc b/docs/examples/guide/f58969ac405db85f439c5940d014964b.asciidoc deleted file mode 100644 index ee94af29bf..0000000000 --- a/docs/examples/guide/f58969ac405db85f439c5940d014964b.asciidoc +++ /dev/null @@ -1,23 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_bounding_box: { - 'pin.location' => { - wkt: 'BBOX (-74.1, -71.12, 40.73, 40.01)' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f58fd031597e2c3df78bf0efd07206e3.asciidoc b/docs/examples/guide/f58fd031597e2c3df78bf0efd07206e3.asciidoc deleted file mode 100644 index 588e141b7e..0000000000 --- a/docs/examples/guide/f58fd031597e2c3df78bf0efd07206e3.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.license.post_start_basic( - acknowledge: true -) -puts response ----- diff --git a/docs/examples/guide/f5bf2526af19d964f8c4c59d4795cffc.asciidoc b/docs/examples/guide/f5bf2526af19d964f8c4c59d4795cffc.asciidoc deleted file mode 100644 index c045c912b0..0000000000 --- a/docs/examples/guide/f5bf2526af19d964f8c4c59d4795cffc.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'imdb', - body: { - mappings: { - properties: { - title: { - type: 'text', - term_vector: 'yes' - }, - description: { - type: 'text' - }, - tags: { - type: 'text', - fields: { - raw: { - type: 'text', - analyzer: 'keyword', - term_vector: 'yes' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f5cbbb60ca26867a5d2da625a68a6e65.asciidoc b/docs/examples/guide/f5cbbb60ca26867a5d2da625a68a6e65.asciidoc deleted file mode 100644 index c236b7b5b2..0000000000 --- a/docs/examples/guide/f5cbbb60ca26867a5d2da625a68a6e65.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'ecommerce-customers', - body: { - mappings: { - properties: { - 'total_quantity.sum' => { - type: 'double' - }, - total_quantity: { - type: 'object' - }, - taxless_total_price: { - type: 'object' - }, - 'taxless_total_price.sum' => { - type: 'double' - }, - 'order_id.cardinality' => { - type: 'long' - }, - customer_id: { - type: 'keyword' - }, - 'total_quantity.max' => { - type: 'integer' - }, - order_id: { - type: 'object' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f5e6378cc41ddf5326fe4084396c59b2.asciidoc b/docs/examples/guide/f5e6378cc41ddf5326fe4084396c59b2.asciidoc deleted file mode 100644 index ac2f11e116..0000000000 --- a/docs/examples/guide/f5e6378cc41ddf5326fe4084396c59b2.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - default: { - type: 'simple' - }, - default_search: { - type: 'whitespace' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f5eed3f2e3558a238487bc85305b7a71.asciidoc b/docs/examples/guide/f5eed3f2e3558a238487bc85305b7a71.asciidoc deleted file mode 100644 index df847e9ade..0000000000 --- a/docs/examples/guide/f5eed3f2e3558a238487bc85305b7a71.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0))' - } -) -puts response ----- diff --git a/docs/examples/guide/f5ef80dd92c67059ca353a833e6b7b5e.asciidoc b/docs/examples/guide/f5ef80dd92c67059ca353a833e6b7b5e.asciidoc deleted file mode 100644 index 9dd353926f..0000000000 --- a/docs/examples/guide/f5ef80dd92c67059ca353a833e6b7b5e.asciidoc +++ /dev/null @@ -1,26 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - query: { - constant_score: { - filter: { - match: { - type: 'hat' - } - } - } - }, - aggregations: { - hat_prices: { - sum: { - field: 'price' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f642b64e592131f37209a5100fe161cc.asciidoc b/docs/examples/guide/f642b64e592131f37209a5100fe161cc.asciidoc deleted file mode 100644 index d900169677..0000000000 --- a/docs/examples/guide/f642b64e592131f37209a5100fe161cc.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - dynamic_templates: [ - { - named_analyzers: { - match_mapping_type: 'string', - match: '*', - mapping: { - type: 'text', - analyzer: '{name}' - } - } - }, - { - no_doc_values: { - match_mapping_type: '*', - mapping: { - type: '{dynamic_type}', - doc_values: false - } - } - } - ] - } - } -) -puts response - -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - english: 'Some English text', - count: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/f6566395f85d3afe917228643d7318d6.asciidoc b/docs/examples/guide/f6566395f85d3afe917228643d7318d6.asciidoc deleted file mode 100644 index 6180a61021..0000000000 --- a/docs/examples/guide/f6566395f85d3afe917228643d7318d6.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/f65abb38dd0cfedeb06e0cef206fbdab.asciidoc b/docs/examples/guide/f65abb38dd0cfedeb06e0cef206fbdab.asciidoc deleted file mode 100644 index e7ad4bdf71..0000000000 --- a/docs/examples/guide/f65abb38dd0cfedeb06e0cef206fbdab.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'ngram' - ], - text: 'Quick fox' - } -) -puts response ----- diff --git a/docs/examples/guide/f6911b0f2f56523ccbd8027f276981b3.asciidoc b/docs/examples/guide/f6911b0f2f56523ccbd8027f276981b3.asciidoc deleted file mode 100644 index 40c168ea9d..0000000000 --- a/docs/examples/guide/f6911b0f2f56523ccbd8027f276981b3.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - combined_fields: { - query: 'database systems', - fields: [ - 'title', - 'abstract', - 'body' - ], - operator: 'and' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f6982ff80b9a64cd5fcac5b20908c906.asciidoc b/docs/examples/guide/f6982ff80b9a64cd5fcac5b20908c906.asciidoc deleted file mode 100644 index c6efcdb873..0000000000 --- a/docs/examples/guide/f6982ff80b9a64cd5fcac5b20908c906.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.ml.delete_calendar_event( - calendar_id: 'planned-outages', - event_id: 'LS8LJGEBMTCMA-qz49st' -) -puts response ----- diff --git a/docs/examples/guide/f6c9d72fa26cbedd0c3f9fa64a88c38a.asciidoc b/docs/examples/guide/f6c9d72fa26cbedd0c3f9fa64a88c38a.asciidoc deleted file mode 100644 index 72725b8533..0000000000 --- a/docs/examples/guide/f6c9d72fa26cbedd0c3f9fa64a88c38a.asciidoc +++ /dev/null @@ -1,12 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - match_all: {} - }, - _source: 'route_length_miles' - } -) -puts response ----- diff --git a/docs/examples/guide/f6de702c3d097af0b0bd391c4f947233.asciidoc b/docs/examples/guide/f6de702c3d097af0b0bd391c4f947233.asciidoc deleted file mode 100644 index 6552d1c3bf..0000000000 --- a/docs/examples/guide/f6de702c3d097af0b0bd391c4f947233.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.cat.indices( - v: true, - s: 'rep:desc,pri.store.size:desc', - h: 'health,index,pri,rep,store.size,pri.store.size' -) -puts response ----- diff --git a/docs/examples/guide/f6edbed2b5b2709bbc13866a4780e27a.asciidoc b/docs/examples/guide/f6edbed2b5b2709bbc13866a4780e27a.asciidoc deleted file mode 100644 index 54bafbea79..0000000000 --- a/docs/examples/guide/f6edbed2b5b2709bbc13866a4780e27a.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - body: { - username: 'johnsmith', - name: { - first: 'John', - last: 'Smith' - } - } -) -puts response - -response = client.indices.get_mapping( - index: 'my-index-000001' -) -puts response ----- diff --git a/docs/examples/guide/f70a54cd9a9f4811bf962e469f2ca2ea.asciidoc b/docs/examples/guide/f70a54cd9a9f4811bf962e469f2ca2ea.asciidoc deleted file mode 100644 index 0dc8cd798a..0000000000 --- a/docs/examples/guide/f70a54cd9a9f4811bf962e469f2ca2ea.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - bool: { - filter: { - term: { - status: 'active' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f70ff57c80cdbce3f1e7c63ee307c92d.asciidoc b/docs/examples/guide/f70ff57c80cdbce3f1e7c63ee307c92d.asciidoc deleted file mode 100644 index 659627b89d..0000000000 --- a/docs/examples/guide/f70ff57c80cdbce3f1e7c63ee307c92d.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'my_test_scores' - }, - dest: { - index: 'my_test_scores_2', - pipeline: 'my_test_scores_pipeline' - } - } -) -puts response ----- diff --git a/docs/examples/guide/f733b25cd4c448b226bb76862974eef2.asciidoc b/docs/examples/guide/f733b25cd4c448b226bb76862974eef2.asciidoc deleted file mode 100644 index 921b63e70c..0000000000 --- a/docs/examples/guide/f733b25cd4c448b226bb76862974eef2.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - body: { - settings: { - analysis: { - filter: { - code: { - type: 'pattern_capture', - preserve_original: true, - patterns: [ - '(\\p{Ll}+|\\p{Lu}\\p{Ll}+|\\p{Lu}+)', - '(\\d+)' - ] - } - }, - analyzer: { - code: { - tokenizer: 'pattern', - filter: [ - 'code', - 'lowercase' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f749efe8f11ebd43ef83db91922c736e.asciidoc b/docs/examples/guide/f749efe8f11ebd43ef83db91922c736e.asciidoc deleted file mode 100644 index 6c98dce8e5..0000000000 --- a/docs/examples/guide/f749efe8f11ebd43ef83db91922c736e.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.cluster.put_settings( - body: { - persistent: { - cluster: { - remote: { - "clusterB": { - mode: 'proxy', - skip_unavailable: 'true', - server_name: 'clusterb.es.region-b.gcp.elastic-cloud.com', - proxy_socket_connections: '18', - proxy_address: 'clusterb.es.region-b.gcp.elastic-cloud.com:9400' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f7726cc2c60dea26b88bf0df99fb0813.asciidoc b/docs/examples/guide/f7726cc2c60dea26b88bf0df99fb0813.asciidoc deleted file mode 100644 index 6a871640db..0000000000 --- a/docs/examples/guide/f7726cc2c60dea26b88bf0df99fb0813.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - runtime: { - day_of_week: { - type: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc b/docs/examples/guide/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc deleted file mode 100644 index f2e52a81c5..0000000000 --- a/docs/examples/guide/f785b5d17eb59f8d2a353c2dee66eb5b.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.connector.sync_job_get( - connector_sync_job_id: 'my-connector-sync-job' -) -puts response ----- diff --git a/docs/examples/guide/f7d3d367a3d8e8ff0eca426b6ea85252.asciidoc b/docs/examples/guide/f7d3d367a3d8e8ff0eca426b6ea85252.asciidoc deleted file mode 100644 index 7d2efe648b..0000000000 --- a/docs/examples/guide/f7d3d367a3d8e8ff0eca426b6ea85252.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - index: 'k8s' - }, - dest: { - index: 'k9s', - op_type: 'create' - } - } -) -puts response ----- diff --git a/docs/examples/guide/f7dc2fed08e57abda2c3e8a14f8eb098.asciidoc b/docs/examples/guide/f7dc2fed08e57abda2c3e8a14f8eb098.asciidoc deleted file mode 100644 index 4036691476..0000000000 --- a/docs/examples/guide/f7dc2fed08e57abda2c3e8a14f8eb098.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'armenian_example', - body: { - settings: { - analysis: { - filter: { - armenian_stop: { - type: 'stop', - stopwords: '_armenian_' - }, - armenian_keywords: { - type: 'keyword_marker', - keywords: [ - 'օրինակ' - ] - }, - armenian_stemmer: { - type: 'stemmer', - language: 'armenian' - } - }, - analyzer: { - rebuilt_armenian: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'armenian_stop', - 'armenian_keywords', - 'armenian_stemmer' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f7ec9062b3a7578fed55f119d7c22b74.asciidoc b/docs/examples/guide/f7ec9062b3a7578fed55f119d7c22b74.asciidoc deleted file mode 100644 index ec6ae921ed..0000000000 --- a/docs/examples/guide/f7ec9062b3a7578fed55f119d7c22b74.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'standard', - filter: [ - 'lowercase', - 'asciifolding' - ], - text: 'Is this déja vu?' - } -) -puts response ----- diff --git a/docs/examples/guide/f823e4b87ed181b27f73ebc51351f0ee.asciidoc b/docs/examples/guide/f823e4b87ed181b27f73ebc51351f0ee.asciidoc deleted file mode 100644 index 24577d2d71..0000000000 --- a/docs/examples/guide/f823e4b87ed181b27f73ebc51351f0ee.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.delete_data_stream( - name: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/f83eb6605c7c56e297a494b318400ef0.asciidoc b/docs/examples/guide/f83eb6605c7c56e297a494b318400ef0.asciidoc deleted file mode 100644 index 8b0f41b0fa..0000000000 --- a/docs/examples/guide/f83eb6605c7c56e297a494b318400ef0.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'shirts', - body: { - query: { - bool: { - filter: [ - { - term: { - color: 'red' - } - }, - { - term: { - brand: 'gucci' - } - } - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f8525c2460a577edfef156c13f55b8a7.asciidoc b/docs/examples/guide/f8525c2460a577edfef156c13f55b8a7.asciidoc deleted file mode 100644 index e80f7d4712..0000000000 --- a/docs/examples/guide/f8525c2460a577edfef156c13f55b8a7.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'sales', - size: 0, - body: { - query: { - constant_score: { - filter: { - range: { - price: { - to: '500' - } - } - } - } - }, - aggregations: { - prices: { - histogram: { - field: 'price', - interval: 50, - hard_bounds: { - min: 100, - max: 200 - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f8651356ce2e7e93fa306c30f57ed588.asciidoc b/docs/examples/guide/f8651356ce2e7e93fa306c30f57ed588.asciidoc deleted file mode 100644 index a92cf3c9e6..0000000000 --- a/docs/examples/guide/f8651356ce2e7e93fa306c30f57ed588.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'custom_truncate_example', - body: { - settings: { - analysis: { - analyzer: { - standard_truncate: { - tokenizer: 'standard', - filter: [ - 'truncate' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f8a0010753b1ff563dc42d703902d2fa.asciidoc b/docs/examples/guide/f8a0010753b1ff563dc42d703902d2fa.asciidoc deleted file mode 100644 index dbb596c2ea..0000000000 --- a/docs/examples/guide/f8a0010753b1ff563dc42d703902d2fa.asciidoc +++ /dev/null @@ -1,44 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - bool: { - must: { - term: { - 'user.id' => 'kimchy' - } - }, - filter: { - term: { - tags: 'production' - } - }, - must_not: { - range: { - age: { - gte: 10, - lte: 20 - } - } - }, - should: [ - { - term: { - tags: 'env1' - } - }, - { - term: { - tags: 'deployed' - } - } - ], - minimum_should_match: 1, - boost: 1 - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f8cafb1a08bc9b2dd5239f99d4e93f4c.asciidoc b/docs/examples/guide/f8cafb1a08bc9b2dd5239f99d4e93f4c.asciidoc deleted file mode 100644 index 597c938f3d..0000000000 --- a/docs/examples/guide/f8cafb1a08bc9b2dd5239f99d4e93f4c.asciidoc +++ /dev/null @@ -1,17 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: { - type: 'char_group', - tokenize_on_chars: [ - 'whitespace', - '-', - "\n" - ] - }, - text: 'The QUICK brown-fox' - } -) -puts response ----- diff --git a/docs/examples/guide/f8cb1a04c2e487ff006b5ae0e1a7afbd.asciidoc b/docs/examples/guide/f8cb1a04c2e487ff006b5ae0e1a7afbd.asciidoc deleted file mode 100644 index d4e90473c0..0000000000 --- a/docs/examples/guide/f8cb1a04c2e487ff006b5ae0e1a7afbd.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.rollup.get_rollup_caps( - id: 'sensor-1' -) -puts response ----- diff --git a/docs/examples/guide/f92d2f5018a8843ffbb56ade15f84406.asciidoc b/docs/examples/guide/f92d2f5018a8843ffbb56ade15f84406.asciidoc deleted file mode 100644 index 2898435e5f..0000000000 --- a/docs/examples/guide/f92d2f5018a8843ffbb56ade15f84406.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.license.get_basic_status -puts response ----- diff --git a/docs/examples/guide/f96d4614f2fc294339fef325b794355f.asciidoc b/docs/examples/guide/f96d4614f2fc294339fef325b794355f.asciidoc deleted file mode 100644 index bf30d91d6b..0000000000 --- a/docs/examples/guide/f96d4614f2fc294339fef325b794355f.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_buckets( - job_id: 'low_request_rate', - body: { - anomaly_score: 80, - start: '1454530200001' - } -) -puts response ----- diff --git a/docs/examples/guide/f9732ce07960134ea7156e118c2da8a6.asciidoc b/docs/examples/guide/f9732ce07960134ea7156e118c2da8a6.asciidoc deleted file mode 100644 index d8b8172ca2..0000000000 --- a/docs/examples/guide/f9732ce07960134ea7156e118c2da8a6.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - settings: { - analysis: { - analyzer: { - my_custom_simple_analyzer: { - tokenizer: 'lowercase', - filter: [] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f97aa2efabbf11a534073041eb2658c9.asciidoc b/docs/examples/guide/f97aa2efabbf11a534073041eb2658c9.asciidoc deleted file mode 100644 index 9510432e70..0000000000 --- a/docs/examples/guide/f97aa2efabbf11a534073041eb2658c9.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.delete_script( - id: 'my-stored-script' -) -puts response ----- diff --git a/docs/examples/guide/f98687271e1bec031cc34d05d8f4b60b.asciidoc b/docs/examples/guide/f98687271e1bec031cc34d05d8f4b60b.asciidoc deleted file mode 100644 index 1582fcda8a..0000000000 --- a/docs/examples/guide/f98687271e1bec031cc34d05d8f4b60b.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - span_multi: { - match: { - prefix: { - 'user.id' => { - value: 'ki' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f9a315ea99bed0cf2f36be1d74eb3e4a.asciidoc b/docs/examples/guide/f9a315ea99bed0cf2f36be1d74eb3e4a.asciidoc deleted file mode 100644 index 27b502a47b..0000000000 --- a/docs/examples/guide/f9a315ea99bed0cf2f36be1d74eb3e4a.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: 'MULTIPOLYGON (((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0, 102.0 2.0)), ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))' - } -) -puts response ----- diff --git a/docs/examples/guide/f9c8245cc13770dff052b6759a749efa.asciidoc b/docs/examples/guide/f9c8245cc13770dff052b6759a749efa.asciidoc deleted file mode 100644 index a6cbee5604..0000000000 --- a/docs/examples/guide/f9c8245cc13770dff052b6759a749efa.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.get_source( - index: 'my-index-000001', - id: 1 -) -puts response ----- diff --git a/docs/examples/guide/f9cb2547ab04461a12bfd25a35be5f96.asciidoc b/docs/examples/guide/f9cb2547ab04461a12bfd25a35be5f96.asciidoc deleted file mode 100644 index d4f57568c3..0000000000 --- a/docs/examples/guide/f9cb2547ab04461a12bfd25a35be5f96.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - my_range: { - type: 'date_range' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - my_range: [ - { - gte: 1_504_224_000_000, - lte: 1_504_569_600_000 - }, - { - gte: '2017-09-01', - lte: '2017-09-10' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/f9ee5d55a73f4c1fe7d507609047aefd.asciidoc b/docs/examples/guide/f9ee5d55a73f4c1fe7d507609047aefd.asciidoc deleted file mode 100644 index 27ec468586..0000000000 --- a/docs/examples/guide/f9ee5d55a73f4c1fe7d507609047aefd.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - multi_match: { - query: 'brown f', - type: 'bool_prefix', - fields: [ - 'my_field', - 'my_field._2gram', - 'my_field._3gram' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/f9f541ae23a184301913f07e62d1afd3.asciidoc b/docs/examples/guide/f9f541ae23a184301913f07e62d1afd3.asciidoc deleted file mode 100644 index d983072842..0000000000 --- a/docs/examples/guide/f9f541ae23a184301913f07e62d1afd3.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.sql.query( - format: 'json', - body: { - keep_alive: '2d', - wait_for_completion_timeout: '2s', - query: 'SELECT * FROM library ORDER BY page_count DESC', - fetch_size: 5 - } -) -puts response ----- diff --git a/docs/examples/guide/fa42ae3bf6a300420cd0f77ba006458a.asciidoc b/docs/examples/guide/fa42ae3bf6a300420cd0f77ba006458a.asciidoc deleted file mode 100644 index 714ef21eb5..0000000000 --- a/docs/examples/guide/fa42ae3bf6a300420cd0f77ba006458a.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - analyzer: 'standard', - text: 'Quick Brown Foxes!' - } -) -puts response ----- diff --git a/docs/examples/guide/fa88f6f5a7d728ec4f1d05244228cb09.asciidoc b/docs/examples/guide/fa88f6f5a7d728ec4f1d05244228cb09.asciidoc deleted file mode 100644 index 2d4e5d27bc..0000000000 --- a/docs/examples/guide/fa88f6f5a7d728ec4f1d05244228cb09.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - term: { - status: 'active' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fa946228e946da256d40264c8b070a1a.asciidoc b/docs/examples/guide/fa946228e946da256d40264c8b070a1a.asciidoc deleted file mode 100644 index cfcaf1feaf..0000000000 --- a/docs/examples/guide/fa946228e946da256d40264c8b070a1a.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - aggregations: { - "my-agg-name": { - terms: { - field: 'my-field' - }, - meta: { - "my-metadata-field": 'foo' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fa9a3ef94470f3d9bd6500b65bf993d1.asciidoc b/docs/examples/guide/fa9a3ef94470f3d9bd6500b65bf993d1.asciidoc deleted file mode 100644 index 27c3c6ca56..0000000000 --- a/docs/examples/guide/fa9a3ef94470f3d9bd6500b65bf993d1.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - index: 'multiplexer_example', - body: { - analyzer: 'my_analyzer', - text: 'Going HOME' - } -) -puts response ----- diff --git a/docs/examples/guide/fab4b811ba968aa4df92fb1ac059ea31.asciidoc b/docs/examples/guide/fab4b811ba968aa4df92fb1ac059ea31.asciidoc deleted file mode 100644 index fff860b365..0000000000 --- a/docs/examples/guide/fab4b811ba968aa4df92fb1ac059ea31.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'example', - body: { - mappings: { - properties: { - location: { - type: 'geo_shape' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fabe14480624a99e8ee42c7338672058.asciidoc b/docs/examples/guide/fabe14480624a99e8ee42c7338672058.asciidoc deleted file mode 100644 index c61e6ec46c..0000000000 --- a/docs/examples/guide/fabe14480624a99e8ee42c7338672058.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'test', - wait_for_active_shards: 2 -) -puts response ----- diff --git a/docs/examples/guide/facd6a5e350af62d9481d86991a2b1cb.asciidoc b/docs/examples/guide/facd6a5e350af62d9481d86991a2b1cb.asciidoc deleted file mode 100644 index 81723d0fb7..0000000000 --- a/docs/examples/guide/facd6a5e350af62d9481d86991a2b1cb.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - query: 'comment.plain:running scissors', - fields: [ - 'comment' - ] - } - }, - highlight: { - order: 'score', - fields: { - comment: { - matched_fields: [ - 'comment', - 'comment.plain' - ], - type: 'fvh' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fad26f4fb5a1bc9c38db33394e877d94.asciidoc b/docs/examples/guide/fad26f4fb5a1bc9c38db33394e877d94.asciidoc deleted file mode 100644 index 0e7a3637c4..0000000000 --- a/docs/examples/guide/fad26f4fb5a1bc9c38db33394e877d94.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.ml.get_data_frame_analytics_stats( - id: 'weblog-outliers' -) -puts response ----- diff --git a/docs/examples/guide/fad524db23eb5718ff310956e590b00d.asciidoc b/docs/examples/guide/fad524db23eb5718ff310956e590b00d.asciidoc deleted file mode 100644 index 4de4d9f306..0000000000 --- a/docs/examples/guide/fad524db23eb5718ff310956e590b00d.asciidoc +++ /dev/null @@ -1,16 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - function_score: { - random_score: { - seed: 10, - field: '_seq_no' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/faf7d8b9827cf5c0db5c177f01dc31c4.asciidoc b/docs/examples/guide/faf7d8b9827cf5c0db5c177f01dc31c4.asciidoc deleted file mode 100644 index 278884e244..0000000000 --- a/docs/examples/guide/faf7d8b9827cf5c0db5c177f01dc31c4.asciidoc +++ /dev/null @@ -1,27 +0,0 @@ -[source, ruby] ----- -response = client.rank_eval( - index: 'my-index-000001', - body: { - requests: [ - { - id: 'JFK query', - request: { - query: { - match_all: {} - } - }, - ratings: [] - } - ], - metric: { - precision: { - k: 20, - relevant_rating_threshold: 1, - ignore_unlabeled: false - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fb1180992b2087dfb36576b44c4261e4.asciidoc b/docs/examples/guide/fb1180992b2087dfb36576b44c4261e4.asciidoc deleted file mode 100644 index 4f7797fe3e..0000000000 --- a/docs/examples/guide/fb1180992b2087dfb36576b44c4261e4.asciidoc +++ /dev/null @@ -1,20 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_mapping( - index: 'my-data-stream', - write_index_only: true, - body: { - properties: { - host: { - properties: { - ip: { - type: 'ip', - ignore_malformed: true - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fb1263cfdcbb6a89b20b57004d7e0dfc.asciidoc b/docs/examples/guide/fb1263cfdcbb6a89b20b57004d7e0dfc.asciidoc deleted file mode 100644 index 7a98e12591..0000000000 --- a/docs/examples/guide/fb1263cfdcbb6a89b20b57004d7e0dfc.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - processors: [ - { - set: { - field: 'my_field', - value: '{{{input_field.1}}}' - } - } - ] - }, - docs: [ - { - _index: 'index', - _id: 'id', - _source: { - input_field: [ - 'Ubuntu', - 'Windows', - 'Ventura' - ] - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/fb2b91206cfa8b86b4c7117ac1b5193b.asciidoc b/docs/examples/guide/fb2b91206cfa8b86b4c7117ac1b5193b.asciidoc deleted file mode 100644 index 97c95c7ba1..0000000000 --- a/docs/examples/guide/fb2b91206cfa8b86b4c7117ac1b5193b.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'user_hits', - body: { - size: 0, - aggregations: { - users_per_day: { - date_histogram: { - field: 'timestamp', - calendar_interval: 'day' - }, - aggregations: { - distinct_users: { - cardinality: { - field: 'user_id' - } - }, - total_new_users: { - cumulative_cardinality: { - buckets_path: 'distinct_users' - } - }, - incremental_new_users: { - derivative: { - buckets_path: 'total_new_users' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fb3505d976283fb7c7b9705a761e0dc2.asciidoc b/docs/examples/guide/fb3505d976283fb7c7b9705a761e0dc2.asciidoc deleted file mode 100644 index b34a9e90c6..0000000000 --- a/docs/examples/guide/fb3505d976283fb7c7b9705a761e0dc2.asciidoc +++ /dev/null @@ -1,37 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'polygon', - orientation: 'clockwise', - coordinates: [ - [ - [ - 1000, - 1000 - ], - [ - 1000, - 1001 - ], - [ - 1001, - 1001 - ], - [ - 1001, - 1000 - ], - [ - 1000, - 1000 - ] - ] - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/fb955375a202f66133af009c04cb77ad.asciidoc b/docs/examples/guide/fb955375a202f66133af009c04cb77ad.asciidoc deleted file mode 100644 index 3017ea22d2..0000000000 --- a/docs/examples/guide/fb955375a202f66133af009c04cb77ad.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'networks', - body: { - mappings: { - properties: { - range: { - type: 'ip_range' - }, - name: { - type: 'keyword' - }, - department: { - type: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fbb38243221c8fb311660616e3add9ce.asciidoc b/docs/examples/guide/fbb38243221c8fb311660616e3add9ce.asciidoc deleted file mode 100644 index 5aacb82f9b..0000000000 --- a/docs/examples/guide/fbb38243221c8fb311660616e3add9ce.asciidoc +++ /dev/null @@ -1,28 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - sort: [ - { - _geo_distance: { - 'pin.location' => [ - -70, - 40 - ], - order: 'asc', - unit: 'km', - mode: 'min', - distance_type: 'arc', - ignore_unmapped: true - } - } - ], - query: { - term: { - user: 'kimchy' - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fbc5ab85b908480bf944b55da0a43488.asciidoc b/docs/examples/guide/fbc5ab85b908480bf944b55da0a43488.asciidoc deleted file mode 100644 index 82a6ad3ed4..0000000000 --- a/docs/examples/guide/fbc5ab85b908480bf944b55da0a43488.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - prefix: { - 'user.id' => { - value: 'ki' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fbdad6620eb645f5f1f02e3673604d01.asciidoc b/docs/examples/guide/fbdad6620eb645f5f1f02e3673604d01.asciidoc deleted file mode 100644 index 0e93f5ecf9..0000000000 --- a/docs/examples/guide/fbdad6620eb645f5f1f02e3673604d01.asciidoc +++ /dev/null @@ -1,22 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my_locations', - body: { - query: { - bool: { - must: { - match_all: {} - }, - filter: { - geo_distance: { - distance: '12km', - 'pin.location' => 'drm3btev3e86' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fc1907515f6a913884a9f86451e90ee8.asciidoc b/docs/examples/guide/fc1907515f6a913884a9f86451e90ee8.asciidoc deleted file mode 100644 index 2d3789baf4..0000000000 --- a/docs/examples/guide/fc1907515f6a913884a9f86451e90ee8.asciidoc +++ /dev/null @@ -1,24 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index', - body: { - mappings: { - _source: { - excludes: [ - 'content_embedding' - ] - }, - properties: { - content_embedding: { - type: 'sparse_vector' - }, - content: { - type: 'text' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fc190fbbf71949331266dcb3f46a1198.asciidoc b/docs/examples/guide/fc190fbbf71949331266dcb3f46a1198.asciidoc deleted file mode 100644 index e7a10509ee..0000000000 --- a/docs/examples/guide/fc190fbbf71949331266dcb3f46a1198.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.data_streams_stats( - name: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/fc26f51bb22c0b5270a66b4722f18aa7.asciidoc b/docs/examples/guide/fc26f51bb22c0b5270a66b4722f18aa7.asciidoc deleted file mode 100644 index 79dd12e9d4..0000000000 --- a/docs/examples/guide/fc26f51bb22c0b5270a66b4722f18aa7.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - warm: { - actions: { - allocate: { - number_of_replicas: 2, - total_shards_per_node: 200 - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fc3f5f40fa283559ca615cd0eb0a1755.asciidoc b/docs/examples/guide/fc3f5f40fa283559ca615cd0eb0a1755.asciidoc deleted file mode 100644 index 28211dbd41..0000000000 --- a/docs/examples/guide/fc3f5f40fa283559ca615cd0eb0a1755.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my_index', - body: { - mappings: { - properties: { - my_histogram: { - type: 'histogram' - }, - my_text: { - type: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fc51fbc60b0e20aac83300a43ad90252.asciidoc b/docs/examples/guide/fc51fbc60b0e20aac83300a43ad90252.asciidoc deleted file mode 100644 index d06eb139cc..0000000000 --- a/docs/examples/guide/fc51fbc60b0e20aac83300a43ad90252.asciidoc +++ /dev/null @@ -1,34 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'example', - body: { - location: { - type: 'geometrycollection', - geometries: [ - { - type: 'point', - coordinates: [ - 1000, - 100 - ] - }, - { - type: 'linestring', - coordinates: [ - [ - 1001, - 100 - ], - [ - 1002, - 100 - ] - ] - } - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/fc5a81f34d416e4b45ca8a859dd3b8f1.asciidoc b/docs/examples/guide/fc5a81f34d416e4b45ca8a859dd3b8f1.asciidoc deleted file mode 100644 index 31346810c7..0000000000 --- a/docs/examples/guide/fc5a81f34d416e4b45ca8a859dd3b8f1.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - size: 0, - body: { - aggregations: { - by_day: { - auto_date_histogram: { - field: 'date', - buckets: 3, - time_zone: '-01:00' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fc75ea748e5f49b8ab292e453ab641a6.asciidoc b/docs/examples/guide/fc75ea748e5f49b8ab292e453ab641a6.asciidoc deleted file mode 100644 index 8af99e9ab5..0000000000 --- a/docs/examples/guide/fc75ea748e5f49b8ab292e453ab641a6.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'products', - size: 0, - body: { - query: { - match: { - name: 'led tv' - } - }, - aggregations: { - resellers: { - nested: { - path: 'resellers' - }, - aggregations: { - min_price: { - min: { - field: 'resellers.price' - } - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fc8a426f8a5112e61e2acb913982a8d9.asciidoc b/docs/examples/guide/fc8a426f8a5112e61e2acb913982a8d9.asciidoc deleted file mode 100644 index 6436fac887..0000000000 --- a/docs/examples/guide/fc8a426f8a5112e61e2acb913982a8d9.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'events', - body: { - size: 10, - sort: [ - { - timestamp: 'desc' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/fc9a1b1173690a911725cff3912e9755.asciidoc b/docs/examples/guide/fc9a1b1173690a911725cff3912e9755.asciidoc deleted file mode 100644 index 4275310129..0000000000 --- a/docs/examples/guide/fc9a1b1173690a911725cff3912e9755.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.ilm.put_lifecycle( - policy: 'my_policy', - body: { - policy: { - phases: { - warm: { - actions: { - readonly: {} - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fccbddfba9f975de7e321732874dfb78.asciidoc b/docs/examples/guide/fccbddfba9f975de7e321732874dfb78.asciidoc deleted file mode 100644 index 4591b1288c..0000000000 --- a/docs/examples/guide/fccbddfba9f975de7e321732874dfb78.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.data_streams_stats( - name: 'my-data-stream*', - human: true -) -puts response ----- diff --git a/docs/examples/guide/fce7a35a737fc9e54ac1225e310dd561.asciidoc b/docs/examples/guide/fce7a35a737fc9e54ac1225e310dd561.asciidoc deleted file mode 100644 index 3181db066f..0000000000 --- a/docs/examples/guide/fce7a35a737fc9e54ac1225e310dd561.asciidoc +++ /dev/null @@ -1,32 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - script_score: { - query: { - bool: { - filter: { - term: { - status: 'published' - } - } - } - }, - script: { - source: "\n double value = dotProduct(params.query_vector, 'my_dense_vector');\n return sigmoid(1, Math.E, -value); \n ", - params: { - query_vector: [ - 4, - 3.4, - -0.2 - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fd26bfdbe95b2d2db374385d12849f77.asciidoc b/docs/examples/guide/fd26bfdbe95b2d2db374385d12849f77.asciidoc deleted file mode 100644 index b2311bab2b..0000000000 --- a/docs/examples/guide/fd26bfdbe95b2d2db374385d12849f77.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'trim_example', - body: { - settings: { - analysis: { - analyzer: { - keyword_trim: { - tokenizer: 'keyword', - filter: [ - 'trim' - ] - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fd2d289e6b725fcc3cbe8fe7ffe02ea0.asciidoc b/docs/examples/guide/fd2d289e6b725fcc3cbe8fe7ffe02ea0.asciidoc deleted file mode 100644 index 9860895e28..0000000000 --- a/docs/examples/guide/fd2d289e6b725fcc3cbe8fe7ffe02ea0.asciidoc +++ /dev/null @@ -1,5 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_template -puts response ----- diff --git a/docs/examples/guide/fd352b472d44d197022a46fce90b6ecb.asciidoc b/docs/examples/guide/fd352b472d44d197022a46fce90b6ecb.asciidoc deleted file mode 100644 index bf6d9a82a3..0000000000 --- a/docs/examples/guide/fd352b472d44d197022a46fce90b6ecb.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.mget( - body: { - docs: [ - { - _index: 'test', - _id: '1', - _source: false - }, - { - _index: 'test', - _id: '2', - _source: [ - 'field3', - 'field4' - ] - }, - { - _index: 'test', - _id: '3', - _source: { - include: [ - 'user' - ], - exclude: [ - 'user.location' - ] - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/fd60b4092c6552164862cec287359676.asciidoc b/docs/examples/guide/fd60b4092c6552164862cec287359676.asciidoc deleted file mode 100644 index 4fd2ac03e3..0000000000 --- a/docs/examples/guide/fd60b4092c6552164862cec287359676.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.ml.stop_datafeed( - datafeed_id: 'datafeed-low_request_rate', - body: { - timeout: '30s' - } -) -puts response ----- diff --git a/docs/examples/guide/fd6fdc8fa994dd02cf1177077325304f.asciidoc b/docs/examples/guide/fd6fdc8fa994dd02cf1177077325304f.asciidoc deleted file mode 100644 index 31e4e154bf..0000000000 --- a/docs/examples/guide/fd6fdc8fa994dd02cf1177077325304f.asciidoc +++ /dev/null @@ -1,15 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.restore( - repository: 'my_repository', - snapshot: 'snapshot-20200617', - body: { - feature_states: [ - 'geoip' - ], - indices: 'kibana_sample_data_flights,.ds-my-data-stream-2022.06.17-000001', - include_aliases: true - } -) -puts response ----- diff --git a/docs/examples/guide/fd738a9af7b5d21da31a7722f03aade8.asciidoc b/docs/examples/guide/fd738a9af7b5d21da31a7722f03aade8.asciidoc deleted file mode 100644 index be510eaa67..0000000000 --- a/docs/examples/guide/fd738a9af7b5d21da31a7722f03aade8.asciidoc +++ /dev/null @@ -1,10 +0,0 @@ -[source, ruby] ----- -response = client.cat.shards( - v: true, - h: 'index,prirep,shard,store', - s: 'prirep,store', - bytes: 'gb' -) -puts response ----- diff --git a/docs/examples/guide/fd9b668eeb1f117950bd4991c7c03fb1.asciidoc b/docs/examples/guide/fd9b668eeb1f117950bd4991c7c03fb1.asciidoc deleted file mode 100644 index eb2fb59d3a..0000000000 --- a/docs/examples/guide/fd9b668eeb1f117950bd4991c7c03fb1.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - analyzer: 'standard', - text: [ - 'this is a test', - 'the second text' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/fdada036a875d7995d5d7aba9c06361e.asciidoc b/docs/examples/guide/fdada036a875d7995d5d7aba9c06361e.asciidoc deleted file mode 100644 index 254c14a466..0000000000 --- a/docs/examples/guide/fdada036a875d7995d5d7aba9c06361e.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-2', - body: { - mappings: { - properties: { - my_vector: { - type: 'dense_vector', - dims: 3, - index: false - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fdc8e090293e78e9a6b283650b682517.asciidoc b/docs/examples/guide/fdc8e090293e78e9a6b283650b682517.asciidoc deleted file mode 100644 index 6159a4aa7a..0000000000 --- a/docs/examples/guide/fdc8e090293e78e9a6b283650b682517.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.open( - index: 'my-data-stream' -) -puts response ----- diff --git a/docs/examples/guide/fde3463ddf136fdfff1306a60986515e.asciidoc b/docs/examples/guide/fde3463ddf136fdfff1306a60986515e.asciidoc deleted file mode 100644 index 95821f346d..0000000000 --- a/docs/examples/guide/fde3463ddf136fdfff1306a60986515e.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_settings( - index: '*', - flat_settings: true, - filter_path: '**.settings.archived*' -) -puts response ----- diff --git a/docs/examples/guide/fe208d94ec93eabf3bd06139fa70701e.asciidoc b/docs/examples/guide/fe208d94ec93eabf3bd06139fa70701e.asciidoc deleted file mode 100644 index b55fd5df6b..0000000000 --- a/docs/examples/guide/fe208d94ec93eabf3bd06139fa70701e.asciidoc +++ /dev/null @@ -1,45 +0,0 @@ -[source, ruby] ----- -response = client.indices.put_index_template( - name: 'sensor-template', - body: { - index_patterns: [ - 'sensor-*' - ], - data_stream: {}, - template: { - lifecycle: { - downsampling: [ - { - after: '1d', - fixed_interval: '1h' - } - ] - }, - settings: { - 'index.mode' => 'time_series' - }, - mappings: { - properties: { - node: { - type: 'keyword', - time_series_dimension: true - }, - temperature: { - type: 'half_float', - time_series_metric: 'gauge' - }, - voltage: { - type: 'half_float', - time_series_metric: 'gauge' - }, - "@timestamp": { - type: 'date' - } - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fe3a927d868cbc530e08e05964d5174a.asciidoc b/docs/examples/guide/fe3a927d868cbc530e08e05964d5174a.asciidoc deleted file mode 100644 index 0e43d3d257..0000000000 --- a/docs/examples/guide/fe3a927d868cbc530e08e05964d5174a.asciidoc +++ /dev/null @@ -1,35 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'my-index-000001', - id: 1, - refresh: true, - body: { - product: 'chocolate', - price: [ - 20, - 4 - ] - } -) -puts response - -response = client.search( - body: { - query: { - term: { - product: 'chocolate' - } - }, - sort: [ - { - price: { - order: 'asc', - mode: 'avg' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/fe6a21b4a6b33cd6abc522947d6f3ea2.asciidoc b/docs/examples/guide/fe6a21b4a6b33cd6abc522947d6f3ea2.asciidoc deleted file mode 100644 index 6dc9009d5b..0000000000 --- a/docs/examples/guide/fe6a21b4a6b33cd6abc522947d6f3ea2.asciidoc +++ /dev/null @@ -1,31 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'idx', - body: { - mappings: { - _source: { - mode: 'synthetic' - }, - properties: { - date: { - type: 'date' - } - } - } - } -) -puts response - -response = client.index( - index: 'idx', - id: 1, - body: { - date: [ - '2015-01-01T12:10:30Z', - '2014-01-01T12:10:30Z' - ] - } -) -puts response ----- diff --git a/docs/examples/guide/fe6c875158c75b6900034a637f199a99.asciidoc b/docs/examples/guide/fe6c875158c75b6900034a637f199a99.asciidoc deleted file mode 100644 index f1ec1df171..0000000000 --- a/docs/examples/guide/fe6c875158c75b6900034a637f199a99.asciidoc +++ /dev/null @@ -1,29 +0,0 @@ -[source, ruby] ----- -response = client.search( - body: { - query: { - query_string: { - query: 'running scissors', - fields: [ - 'comment', - 'comment.plain^10' - ] - } - }, - highlight: { - order: 'score', - fields: { - comment: { - matched_fields: [ - 'comment', - 'comment.plain' - ], - type: 'fvh' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fe6e35839f7d7381f8ec535c8f21959b.asciidoc b/docs/examples/guide/fe6e35839f7d7381f8ec535c8f21959b.asciidoc deleted file mode 100644 index 27965522d7..0000000000 --- a/docs/examples/guide/fe6e35839f7d7381f8ec535c8f21959b.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'index', - body: { - query: { - script_score: { - query: { - match: { - body: 'elasticsearch' - } - }, - script: { - source: "_score * saturation(doc['pagerank'].value, 10)" - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fe7169bab8e626f582c9ea87585d0f35.asciidoc b/docs/examples/guide/fe7169bab8e626f582c9ea87585d0f35.asciidoc deleted file mode 100644 index f78e5d7869..0000000000 --- a/docs/examples/guide/fe7169bab8e626f582c9ea87585d0f35.asciidoc +++ /dev/null @@ -1,19 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - my_histogram: { - type: 'histogram' - }, - my_text: { - type: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/fe806011466e7cdc1590da186297edb6.asciidoc b/docs/examples/guide/fe806011466e7cdc1590da186297edb6.asciidoc deleted file mode 100644 index 5241aa12f4..0000000000 --- a/docs/examples/guide/fe806011466e7cdc1590da186297edb6.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: '' -) -puts response ----- diff --git a/docs/examples/guide/fe825c05e13e8163073166572c7ac97d.asciidoc b/docs/examples/guide/fe825c05e13e8163073166572c7ac97d.asciidoc deleted file mode 100644 index 56abab22e3..0000000000 --- a/docs/examples/guide/fe825c05e13e8163073166572c7ac97d.asciidoc +++ /dev/null @@ -1,18 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'geocells', - id: 1, - pipeline: 'geohex2shape', - body: { - geocell: '811fbffffffffff' - } -) -puts response - -response = client.get( - index: 'geocells', - id: 1 -) -puts response ----- diff --git a/docs/examples/guide/fe96ca3b2a559d8411aca7ed5f3854bd.asciidoc b/docs/examples/guide/fe96ca3b2a559d8411aca7ed5f3854bd.asciidoc deleted file mode 100644 index 5b74fccca3..0000000000 --- a/docs/examples/guide/fe96ca3b2a559d8411aca7ed5f3854bd.asciidoc +++ /dev/null @@ -1,8 +0,0 @@ -[source, ruby] ----- -response = client.indices.get_settings( - index: 'my-index-000001', - flat_settings: true -) -puts response ----- diff --git a/docs/examples/guide/febb71d774e0a1fc67454213d7448c53.asciidoc b/docs/examples/guide/febb71d774e0a1fc67454213d7448c53.asciidoc deleted file mode 100644 index bd158117e2..0000000000 --- a/docs/examples/guide/febb71d774e0a1fc67454213d7448c53.asciidoc +++ /dev/null @@ -1,11 +0,0 @@ -[source, ruby] ----- -response = client.update( - index: 'my-index-000001', - id: 1, - body: { - script: "ctx._source.remove('new_field')" - } -) -puts response ----- diff --git a/docs/examples/guide/fece7c0fe1f7d113aa05ff5346a18aff.asciidoc b/docs/examples/guide/fece7c0fe1f7d113aa05ff5346a18aff.asciidoc deleted file mode 100644 index 9b6c6a4f8d..0000000000 --- a/docs/examples/guide/fece7c0fe1f7d113aa05ff5346a18aff.asciidoc +++ /dev/null @@ -1,40 +0,0 @@ -[source, ruby] ----- -response = client.bulk( - index: 'my-data-stream', - refresh: true, - body: [ - { - create: {} - }, - { - "@timestamp": '2099-03-08T11:04:05.000Z', - user: { - id: 'vlb44hny' - }, - message: 'Login attempt failed' - }, - { - create: {} - }, - { - "@timestamp": '2099-03-08T11:06:07.000Z', - user: { - id: '8a4f500d' - }, - message: 'Login successful' - }, - { - create: {} - }, - { - "@timestamp": '2099-03-09T11:07:08.000Z', - user: { - id: 'l7gk7f82' - }, - message: 'Logout successful' - } - ] -) -puts response ----- diff --git a/docs/examples/guide/ff05842419968a2141bde0371ac2f6f4.asciidoc b/docs/examples/guide/ff05842419968a2141bde0371ac2f6f4.asciidoc deleted file mode 100644 index ab78aab9e4..0000000000 --- a/docs/examples/guide/ff05842419968a2141bde0371ac2f6f4.asciidoc +++ /dev/null @@ -1,21 +0,0 @@ -[source, ruby] ----- -response = client.render_search_template( - body: { - source: { - query: { - match: { - 'user.group.emails' => '{{#join}}emails{{/join}}' - } - } - }, - params: { - emails: [ - 'user1@example.com', - 'user_one@example.com' - ] - } - } -) -puts response ----- diff --git a/docs/examples/guide/ff09e13391cecb2e8b9dd440b37e065f.asciidoc b/docs/examples/guide/ff09e13391cecb2e8b9dd440b37e065f.asciidoc deleted file mode 100644 index 5ddf3d873b..0000000000 --- a/docs/examples/guide/ff09e13391cecb2e8b9dd440b37e065f.asciidoc +++ /dev/null @@ -1,9 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-new-index-000001', - size: 0, - filter_path: 'hits.total' -) -puts response ----- diff --git a/docs/examples/guide/ff1b96d2fdcf628bd938bff9e939943c.asciidoc b/docs/examples/guide/ff1b96d2fdcf628bd938bff9e939943c.asciidoc deleted file mode 100644 index 924a2eb3b3..0000000000 --- a/docs/examples/guide/ff1b96d2fdcf628bd938bff9e939943c.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.indices.create( - index: 'my-index-000001', - body: { - mappings: { - properties: { - timestamp: { - type: 'date' - }, - temperature: { - type: 'long' - }, - voltage: { - type: 'double' - }, - node: { - type: 'keyword' - } - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ff27e5cddd1f58d8a8f84f807fd27eec.asciidoc b/docs/examples/guide/ff27e5cddd1f58d8a8f84f807fd27eec.asciidoc deleted file mode 100644 index c6537600db..0000000000 --- a/docs/examples/guide/ff27e5cddd1f58d8a8f84f807fd27eec.asciidoc +++ /dev/null @@ -1,30 +0,0 @@ -[source, ruby] ----- -response = client.ingest.simulate( - body: { - pipeline: { - processors: [ - { - redact: { - field: 'message', - patterns: [ - '%{GITHUB_NAME:GITHUB_NAME}' - ], - pattern_definitions: { - "GITHUB_NAME": '@%s' - } - } - } - ] - }, - docs: [ - { - _source: { - message: '@elastic-data-management the PR is ready for review' - } - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/ff56ded50c65998c70f3c5691ddc6f86.asciidoc b/docs/examples/guide/ff56ded50c65998c70f3c5691ddc6f86.asciidoc deleted file mode 100644 index 1bc6ae3dd6..0000000000 --- a/docs/examples/guide/ff56ded50c65998c70f3c5691ddc6f86.asciidoc +++ /dev/null @@ -1,7 +0,0 @@ -[source, ruby] ----- -response = client.snapshot.delete_repository( - repository: 'my_repository' -) -puts response ----- diff --git a/docs/examples/guide/ff63ae39c34925dbfa54282ec9989124.asciidoc b/docs/examples/guide/ff63ae39c34925dbfa54282ec9989124.asciidoc deleted file mode 100644 index 439000e989..0000000000 --- a/docs/examples/guide/ff63ae39c34925dbfa54282ec9989124.asciidoc +++ /dev/null @@ -1,25 +0,0 @@ -[source, ruby] ----- -response = client.reindex( - body: { - source: { - remote: { - host: 'http://otherhost:9200', - headers: { - "Authorization": 'ApiKey API_KEY_VALUE' - } - }, - index: 'my-index-000001', - query: { - match: { - test: 'data' - } - } - }, - dest: { - index: 'my-new-index-000001' - } - } -) -puts response ----- diff --git a/docs/examples/guide/ff776c0fccf93e1c7050f7cb7efbae0b.asciidoc b/docs/examples/guide/ff776c0fccf93e1c7050f7cb7efbae0b.asciidoc deleted file mode 100644 index 2e34dff72b..0000000000 --- a/docs/examples/guide/ff776c0fccf93e1c7050f7cb7efbae0b.asciidoc +++ /dev/null @@ -1,14 +0,0 @@ -[source, ruby] ----- -response = client.ml.infer_trained_model( - model_id: 'model2', - body: { - docs: [ - { - text_field: 'Hi my name is Josh and I live in Berlin' - } - ] - } -) -puts response ----- diff --git a/docs/examples/guide/ff945f5db7d8a9b0d9f6a2f2fcf849e3.asciidoc b/docs/examples/guide/ff945f5db7d8a9b0d9f6a2f2fcf849e3.asciidoc deleted file mode 100644 index b984f39c62..0000000000 --- a/docs/examples/guide/ff945f5db7d8a9b0d9f6a2f2fcf849e3.asciidoc +++ /dev/null @@ -1,36 +0,0 @@ -[source, ruby] ----- -response = client.index( - index: 'index_1', - id: 1, - body: { - text: 'Document in index 1' - } -) -puts response - -response = client.index( - index: 'index_2', - id: 2, - refresh: true, - body: { - text: 'Document in index 2' - } -) -puts response - -response = client.search( - index: 'index_1,index_2', - body: { - query: { - terms: { - _tier: [ - 'data_hot', - 'data_warm' - ] - } - } - } -) -puts response ----- diff --git a/docs/examples/guide/ffcf80e1094aa2d774f56f6b0bc54827.asciidoc b/docs/examples/guide/ffcf80e1094aa2d774f56f6b0bc54827.asciidoc deleted file mode 100644 index 64be48d692..0000000000 --- a/docs/examples/guide/ffcf80e1094aa2d774f56f6b0bc54827.asciidoc +++ /dev/null @@ -1,13 +0,0 @@ -[source, ruby] ----- -response = client.indices.analyze( - body: { - tokenizer: 'keyword', - filter: [ - 'word_delimiter_graph' - ], - text: "Neil's-Super-Duper-XL500--42+AutoCoder" - } -) -puts response ----- diff --git a/docs/examples/guide/ffe45a7c70071730c2078cabb8cbdf95.asciidoc b/docs/examples/guide/ffe45a7c70071730c2078cabb8cbdf95.asciidoc deleted file mode 100644 index 61696a01dc..0000000000 --- a/docs/examples/guide/ffe45a7c70071730c2078cabb8cbdf95.asciidoc +++ /dev/null @@ -1,33 +0,0 @@ -[source, ruby] ----- -response = client.search( - index: 'my-index-000001', - body: { - query: { - script_score: { - query: { - bool: { - filter: { - term: { - status: 'published' - } - } - } - }, - script: { - source: "\n float[] v = doc['my_dense_vector'].vectorValue;\n float vm = doc['my_dense_vector'].magnitude;\n float dotProduct = 0;\n for (int i = 0; i < v.length; i++) {\n dotProduct += v[i] * params.queryVector[i];\n }\n return dotProduct / (vm * (float) params.queryVectorMag);\n ", - params: { - "queryVector": [ - 4, - 3.4, - -0.2 - ], - "queryVectorMag": 5.25357 - } - } - } - } - } -) -puts response -----