Removes typed calls from YAML REST tests (#37611)

This PR attempts to remove all typed calls from our YAML REST tests. The PR adds include_type_name: false to create index requests that use a mapping and also to put mapping requests. It also removes _type from index requests where they haven't already been removed. The PR ignores tests named *_with_types.yml since this are specifically testing typed API behaviour.

The change also includes changing the test harness to add the type _doc to index, update, get and bulk requests that do not specify the document type when the test is running against a mixed 7.x/6.x cluster.
This commit is contained in:
Colin Goodheart-Smithe 2019-01-30 16:32:58 +00:00 committed by GitHub
parent 2f7776c8b7
commit 21e392e95e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
245 changed files with 1433 additions and 2342 deletions

View File

@ -2,29 +2,27 @@
"Empty Bucket Aggregation":
- do:
indices.create:
include_type_name: false
index: empty_bucket_idx
body:
settings:
number_of_shards: "3"
mappings:
test:
"properties":
"value":
"type": "integer"
"val1":
"type": "double"
"properties":
"value":
"type": "integer"
"val1":
"type": "double"
- do:
index:
index: empty_bucket_idx
type: test
id: 1
body: { "value": 0, "val1": 3.1 }
- do:
index:
index: empty_bucket_idx
type: test
id: 2
body: { "value": 2, "val1": -3.1 }

View File

@ -3,20 +3,20 @@ setup:
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
number_of_shards: 3
number_of_routing_shards: 3
mappings:
test:
"properties":
"val1":
"type": "double"
"val2":
"type": "double"
"val3":
"type": "double"
"properties":
"val1":
"type": "double"
"val2":
"type": "double"
"val3":
"type": "double"
- do:
indices.create:
@ -28,91 +28,76 @@ setup:
- do:
index:
index: test
type: test
id: 1
body: { "val1": 1.9, "val2": 3.1, "val3": 2.3 }
- do:
index:
index: test
type: test
id: 2
body: { "val1": -5.2, "val2": -3.4, "val3": 2.3}
- do:
index:
index: test
type: test
id: 3
body: { "val1": -5.2, "val3": 2.3}
- do:
index:
index: test
type: test
id: 4
body: { "val1": 18.3, "val2": 104.4, "val3": 2.3}
- do:
index:
index: test
type: test
id: 5
body: { "val1": -53.2, "val2": -322.4, "val3": 2.3}
- do:
index:
index: test
type: test
id: 6
body: { "val1": -578.9, "val2": 69.9, "val3": 2.3}
- do:
index:
index: test
type: test
id: 7
body: { "val1": 16.2, "val2": 17.2, "val3": 2.3}
- do:
index:
index: test
type: test
id: 8
body: { "val1": -4222.63, "val2": 316.44, "val3": 2.3}
- do:
index:
index: test
type: test
id: 9
body: { "val1": -59999.55, "val2": -3163.4, "val3": 2.3}
- do:
index:
index: test
type: test
id: 10
body: { "val1": 782.7, "val2": 789.7, "val3": 2.3}
- do:
index:
index: test
type: test
id: 11
body: { "val1": -1.2, "val2": 6.3, "val3": 2.3}
- do:
index:
index: test
type: test
id: 12
body: { "val1": 0, "val2": 1.11, "val3": 2.3}
- do:
index:
index: test
type: test
id: 13
body: { "val1": 0.1, "val2": 0.92, "val3": 2.3}
- do:
index:
index: test
type: test
id: 14
body: { "val1": 0.12, "val2": -82.4, "val3": 2.3}
- do:
index:
index: test
type: test
id: 15
body: { "val1": 98.2, "val2": 32.4, "val3": 2.3}

View File

@ -3,20 +3,20 @@ setup:
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
number_of_shards: 3
number_of_routing_shards: 3
mappings:
test:
"properties":
"val1":
"type": "double"
"val2":
"type": "double"
"val3":
"type": "double"
"properties":
"val1":
"type": "double"
"val2":
"type": "double"
"val3":
"type": "double"
- do:
indices.create:
@ -28,91 +28,76 @@ setup:
- do:
index:
index: test
type: test
id: 1
body: { "val1": 1.9, "val2": 3.1, "val3": 2.3, "vals" : [1.9, 16.143] }
- do:
index:
index: test
type: test
id: 2
body: { "val1": -5.2, "val2": -3.4, "val3": 2.3, "vals" : [155, 16.23]}
- do:
index:
index: test
type: test
id: 3
body: { "val1": -5.2, "val3": 2.3, "vals" : [-455, -32.32]}
- do:
index:
index: test
type: test
id: 4
body: { "val1": 18.3, "val2": 104.4, "val3": 2.3, "vals" : [0.14, 92.1]}
- do:
index:
index: test
type: test
id: 5
body: { "val1": -53.2, "val2": -322.4, "val3": 2.3, "vals" : [16, 16]}
- do:
index:
index: test
type: test
id: 6
body: { "val1": -578.9, "val2": 69.9, "val3": 2.3}
- do:
index:
index: test
type: test
id: 7
body: { "val1": 16.2, "val2": 17.2, "val3": 2.3, "vals" : [1234.3, -3433]}
- do:
index:
index: test
type: test
id: 8
body: { "val1": -4222.63, "val2": 316.44, "val3": 2.3, "vals" : [177.2, -93.333]}
- do:
index:
index: test
type: test
id: 9
body: { "val1": -59999.55, "val2": -3163.4, "val3": 2.3, "vals" : [-29.9, 163.0]}
- do:
index:
index: test
type: test
id: 10
body: { "val1": 782.7, "val2": 789.7, "val3": 2.3, "vals" : [-0.2, 1343.3]}
- do:
index:
index: test
type: test
id: 11
body: { "val1": -1.2, "val2": 6.3, "val3": 2.3, "vals" : [15.3, 16.9]}
- do:
index:
index: test
type: test
id: 12
body: { "val1": 0, "val2": 1.11, "val3": 2.3, "vals" : [-644.4, -644.4]}
- do:
index:
index: test
type: test
id: 13
body: { "val1": 0.1, "val2": 0.92, "val3": 2.3, "vals" : [73.2, 0.12]}
- do:
index:
index: test
type: test
id: 14
body: { "val1": 0.12, "val2": -82.4, "val3": 2.3, "vals" : [-0.001, 1295.3]}
- do:
index:
index: test
type: test
id: 15
body: { "val1": 98.2, "val2": 32.4, "val3": 2.3, "vals" : [15.5, 16.5]}

View File

@ -23,6 +23,7 @@
- do:
indices.create:
include_type_name: false
index: test_deprecated_htmlstrip
body:
settings:
@ -33,18 +34,16 @@
tokenizer: keyword
char_filter: ["htmlStrip"]
mappings:
type:
properties:
name:
type: text
analyzer: my_htmlStripWithCharfilter
properties:
name:
type: text
analyzer: my_htmlStripWithCharfilter
- do:
warnings:
- 'The [htmpStrip] char filter name is deprecated and will be removed in a future version. Please change the filter name to [html_strip] instead.'
index:
index: test_deprecated_htmlstrip
type: type
id: 1
body: { "name": "foo bar" }
@ -53,7 +52,6 @@
- 'The [htmpStrip] char filter name is deprecated and will be removed in a future version. Please change the filter name to [html_strip] instead.'
index:
index: test_deprecated_htmlstrip
type: type
id: 2
body: { "name": "foo baz" }

View File

@ -2,6 +2,7 @@
"validate query with synonyms":
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
@ -16,11 +17,10 @@
tokenizer: standard
filter: [ syns ]
mappings:
test:
properties:
field:
type: text
analyzer: syns
properties:
field:
type: text
analyzer: syns
- do:
indices.validate_query:
@ -77,6 +77,3 @@
- is_true: valid
- length: { explanations: 1 }
- match: { explanations.0.explanation: "field:\"foo (one* two*)\"" }

View File

@ -5,6 +5,7 @@
# versions in the same position.
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
@ -24,17 +25,15 @@
type: unique
only_on_same_position: true
mappings:
doc:
properties:
text:
type: text
analyzer: index
search_analyzer: search
properties:
text:
type: text
analyzer: index
search_analyzer: search
- do:
index:
index: test
type: doc
id: 1
body: { "text": "the fox runs across the street" }
refresh: true
@ -53,7 +52,6 @@
- do:
index:
index: test
type: doc
id: 2
body: { "text": "run fox run" }
refresh: true

View File

@ -1,6 +1,7 @@
"ngram search":
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
@ -17,16 +18,14 @@
min: 2,
max: 2
mappings:
doc:
properties:
text:
type: text
analyzer: my_analyzer
properties:
text:
type: text
analyzer: my_analyzer
- do:
index:
index: test
type: doc
id: 1
body: { "text": "foo bar baz" }
refresh: true
@ -45,6 +44,7 @@
"testNGramCopyField":
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
@ -62,19 +62,17 @@
max: 10
token_chars: []
mappings:
doc:
properties:
origin:
type: text
copy_to: meta
meta:
type: text
analyzer: my_ngram_analyzer
properties:
origin:
type: text
copy_to: meta
meta:
type: text
analyzer: my_ngram_analyzer
- do:
index:
index: test
type: doc
id: 1
body: { "origin": "C.A1234.5678" }
refresh: true

View File

@ -1,6 +1,7 @@
"ngram highlighting":
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
@ -28,23 +29,21 @@
name_search_analyzer:
tokenizer: whitespace
mappings:
doc:
properties:
name:
type: text
term_vector: with_positions_offsets
analyzer: name_index_analyzer
search_analyzer: name_search_analyzer
name2:
type: text
term_vector: with_positions_offsets
analyzer: name2_index_analyzer
search_analyzer: name_search_analyzer
properties:
name:
type: text
term_vector: with_positions_offsets
analyzer: name_index_analyzer
search_analyzer: name_search_analyzer
name2:
type: text
term_vector: with_positions_offsets
analyzer: name2_index_analyzer
search_analyzer: name_search_analyzer
- do:
index:
index: test
type: doc
id: 1
refresh: true
body:

View File

@ -2,20 +2,19 @@
"Test query string with snowball":
- do:
indices.create:
include_type_name: false
index: test
body:
mappings:
test:
properties:
field:
type: text
number:
type: integer
properties:
field:
type: text
number:
type: integer
- do:
index:
index: test
type: test
id: 1
body: { field: foo bar}

View File

@ -2,6 +2,7 @@
"Test common terms query with stacked tokens":
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
@ -15,19 +16,17 @@
tokenizer: standard
filter: [ "syns" ]
mappings:
test:
properties:
field1:
type: text
analyzer: syns
field2:
type: text
analyzer: syns
properties:
field1:
type: text
analyzer: syns
field2:
type: text
analyzer: syns
- do:
index:
index: test
type: test
id: 3
body:
field1: quick lazy huge brown pidgin
@ -36,7 +35,6 @@
- do:
index:
index: test
type: test
id: 1
body:
field1: the quick brown fox
@ -44,7 +42,6 @@
- do:
index:
index: test
type: test
id: 2
body:
field1: the quick lazy huge brown fox jumps over the tree
@ -223,6 +220,7 @@
"Test match query with synonyms - see #3881 for extensive description of the issue":
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
@ -242,17 +240,15 @@
tokenizer: standard
filter: [ lowercase, synonym ]
mappings:
test:
properties:
text:
type: text
analyzer: index
search_analyzer: search
properties:
text:
type: text
analyzer: index
search_analyzer: search
- do:
index:
index: test
type: test
id: 1
body:
text: quick brown fox
@ -294,7 +290,6 @@
- do:
index:
index: test
type: test
id: 2
body:
text: fast brown fox
@ -321,5 +316,3 @@
query: quick brown
operator: and
- match: { hits.total: 2 }

View File

@ -1,6 +1,7 @@
setup:
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
@ -24,22 +25,19 @@ setup:
tokenizer: standard
filter: [ lowercase, graph_syns ]
mappings:
test:
properties:
field:
type: text
properties:
field:
type: text
- do:
index:
index: test
type: test
id: 1
body:
text: say wtf happened foo
- do:
index:
index: test
type: test
id: 2
body:
text: bar baz what the fudge man
@ -47,7 +45,6 @@ setup:
- do:
index:
index: test
type: test
id: 3
body:
text: wtf
@ -55,7 +52,6 @@ setup:
- do:
index:
index: test
type: test
id: 4
body:
text: what is the name for fudge
@ -63,7 +59,6 @@ setup:
- do:
index:
index: test
type: test
id: 5
body:
text: bar two three
@ -71,7 +66,6 @@ setup:
- do:
index:
index: test
type: test
id: 6
body:
text: bar baz two three
@ -184,7 +178,6 @@ setup:
- do:
index:
index: test
type: test
id: 7
body:
text: "WTFD!"
@ -192,7 +185,6 @@ setup:
- do:
index:
index: test
type: test
id: 8
body:
text: "Weird Al's WHAT THE FUDGESICLE"

View File

@ -3,6 +3,7 @@
setup:
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
@ -34,26 +35,24 @@ setup:
min_shingle_size: 2
max_shingle_size: 2
mappings:
doc:
properties:
body:
type: text
analyzer: body
fields:
bigram:
type: text
analyzer: bigram
ngram:
type: text
analyzer: ngram
reverse:
type: text
analyzer: reverse
properties:
body:
type: text
analyzer: body
fields:
bigram:
type: text
analyzer: bigram
ngram:
type: text
analyzer: ngram
reverse:
type: text
analyzer: reverse
- do:
bulk:
index: test
type: doc
refresh: true
body: |
{ "index": {} }
@ -226,4 +225,3 @@ setup:
post_filter: reverse
- match: {suggest.test.0.options.0.text: arthur king of the britons}

View File

@ -2,6 +2,7 @@
"suggestions with synonyms":
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
@ -16,16 +17,14 @@
type: synonym
synonyms: [ "foo,renamed"]
mappings:
test:
properties:
field:
type: completion
analyzer: suggest_analyzer_synonyms
properties:
field:
type: completion
analyzer: suggest_analyzer_synonyms
- do:
index:
index: test
type: test
id: 1
body:
field:

View File

@ -3,6 +3,7 @@
# because there are no token filters that support payloads in core.
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
@ -14,17 +15,15 @@
tokenizer: standard
filter: [type_as_payload]
mappings:
doc:
properties:
text:
type: text
term_vector: with_positions_offsets_payloads
analyzer: has_payloads
properties:
text:
type: text
term_vector: with_positions_offsets_payloads
analyzer: has_payloads
- do:
index:
index: test
type: doc
id: 1
refresh: true
body:
@ -33,7 +32,6 @@
- do:
termvectors:
index: test
type: doc
id: 1
payloads: true
- match: {term_vectors.text.field_statistics.sum_doc_freq: 5}

View File

@ -27,7 +27,6 @@ teardown:
- do:
index:
index: events
type: event
id: 1
pipeline: "1"
body: {

View File

@ -26,7 +26,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: >
@ -37,6 +36,5 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.values: ["bar", "baz", "foo"] }

View File

@ -27,7 +27,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field1: "123.42 400 <foo>"}
@ -35,7 +34,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.val: 123.42 }
- match: { _source.status: 400 }
@ -66,7 +64,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field1: "<foo>"}
@ -74,7 +71,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.msg: "foo" }
@ -103,7 +99,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field1: "<foo>"}
@ -111,7 +106,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.msg: "foo" }

View File

@ -25,7 +25,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "1"
body: {
@ -35,6 +34,5 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.foo.bar: "baz" }

View File

@ -50,7 +50,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "1"
body: {
@ -65,7 +64,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.foo_object.hello: "world" }
- match: { _source.foo_array.0: 1 }

View File

@ -27,7 +27,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "1"
body: {
@ -37,7 +36,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.goodbye: "everybody" }
- match: { _source.hello: "world" }

View File

@ -25,7 +25,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "1"
body: {
@ -35,6 +34,5 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.my_url: "https://elastic.co/" }

View File

@ -61,7 +61,6 @@ teardown:
catch: conflict
index:
index: test
type: test
id: 1
pipeline: "my_pipeline1"
body: {}
@ -69,7 +68,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline2"
body: {}

View File

@ -27,7 +27,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {bytes_source_field: "1kb"}
@ -35,8 +34,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.bytes_source_field: "1kb" }
- match: { _source.bytes_target_field: 1024 }

View File

@ -27,7 +27,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {source_field: "1kb"}
@ -35,7 +34,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.source_field: "1kb" }
- match: { _source.target_field: 1024 }
@ -62,7 +60,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {source_field: "FooBar"}
@ -70,7 +67,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.source_field: "FooBar" }
- match: { _source.target_field: "foobar" }
@ -97,7 +93,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {source_field: "FooBar"}
@ -105,7 +100,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.source_field: "FooBar" }
- match: { _source.target_field: "FOOBAR" }
@ -132,7 +126,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {source_field: "{\"foo\":\"bar\"}"}
@ -140,7 +133,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.source_field: "{\"foo\":\"bar\"}" }
- match: { _source.target_field.foo: "bar" }
@ -167,7 +159,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {source_field: "{\"foo\":\"bar\"}"}
@ -175,7 +166,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.source_field: "{\"foo\":\"bar\"}" }
- match: { _source.foo: "bar" }
@ -202,7 +192,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {source_field: "foo%20bar"}
@ -210,7 +199,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.source_field: "foo%20bar" }
- match: { _source.target_field: "foo bar" }

View File

@ -37,14 +37,12 @@ teardown:
- do:
index:
index: test
type: test
id: 1
body: {bytes_source_field: "1kb"}
- do:
get:
index: test
type: test
id: 1
- match: { _source.bytes_source_field: "1kb" }
- match: { _source.bytes_target_field: 1024 }
@ -52,14 +50,12 @@ teardown:
- do:
index:
index: test_alias
type: test
id: 2
body: {bytes_source_field: "1kb"}
- do:
get:
index: test
type: test
id: 2
- match: { _source.bytes_source_field: "1kb" }
- match: { _source.bytes_target_field: 1024 }
@ -67,7 +63,6 @@ teardown:
- do:
update:
index: test
type: test
id: 3
body:
script:
@ -77,7 +72,6 @@ teardown:
- do:
get:
index: test
type: test
id: 3
- match: { _source.bytes_source_field: "1kb" }
- match: { _source.bytes_target_field: 1024 }
@ -85,7 +79,6 @@ teardown:
- do:
update:
index: test
type: test
id: 4
body:
script:
@ -96,7 +89,6 @@ teardown:
- do:
get:
index: test
type: test
id: 4
- match: { _source.bytes_source_field: "1kb" }
- match: { _source.bytes_target_field: 1024 }
@ -104,7 +96,6 @@ teardown:
- do:
update:
index: test
type: test
id: 5
body:
doc: { "bytes_source_field":"1kb" }
@ -112,7 +103,6 @@ teardown:
- do:
get:
index: test
type: test
id: 5
- match: { _source.bytes_source_field: "1kb" }
- match: { _source.bytes_target_field: 1024 }
@ -123,20 +113,20 @@ teardown:
bulk:
refresh: true
body: |
{"update":{"_id":"6","_index":"test","_type":"test"}}
{"update":{"_id":"6","_index":"test"}}
{"script":"ctx._source.ran_script = true","upsert":{"bytes_source_field":"1kb"}}
{"update":{"_id":"7","_index":"test","_type":"test"}}
{"update":{"_id":"7","_index":"test"}}
{"doc":{"bytes_source_field":"2kb"}, "doc_as_upsert":true}
{"update":{"_id":"8","_index":"test","_type":"test"}}
{"update":{"_id":"8","_index":"test"}}
{"script": "ctx._source.ran_script = true","upsert":{"bytes_source_field":"3kb"}, "scripted_upsert" : true}
- do:
mget:
body:
docs:
- { _index: "test", _type: "_doc", _id: "6" }
- { _index: "test", _type: "_doc", _id: "7" }
- { _index: "test", _type: "_doc", _id: "8" }
- { _index: "test", _id: "6" }
- { _index: "test", _id: "7" }
- { _index: "test", _id: "8" }
- match: { docs.0._index: "test" }
- match: { docs.0._id: "6" }
- match: { docs.0._source.bytes_source_field: "1kb" }
@ -156,15 +146,13 @@ teardown:
- do:
index:
index: test
type: test
id: 9
pipeline: "_none"
body: {bytes_source_field: "1kb"}
- do:
get:
index: test
type: test
id: 9
- match: { _source.bytes_source_field: "1kb" }
- is_false: _source.bytes_target_field
@ -173,7 +161,6 @@ teardown:
catch: bad_request
index:
index: test
type: test
id: 10
pipeline: ""
body: {bytes_source_field: "1kb"}

View File

@ -27,7 +27,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {message: "foo bar baz"}
@ -35,7 +34,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.message: "foo bar baz" }
- match: { _source.a: "foo" }
@ -87,4 +85,3 @@ teardown:
}
]
}

View File

@ -28,7 +28,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {bytes_source_field: "1kb", conditional_field: "bar"}
@ -36,7 +35,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.bytes_source_field: "1kb" }
- match: { _source.conditional_field: "bar" }
@ -65,7 +63,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {bytes_source_field: "1kb", conditional_field: "bar"}
@ -73,9 +70,7 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.bytes_source_field: "1kb" }
- match: { _source.conditional_field: "bar" }
- is_false: _source.bytes_target_field

View File

@ -54,7 +54,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "outer"
body: {}
@ -62,7 +61,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.foo: "bar" }
- match: { _source.baz: "blub" }
@ -105,7 +103,6 @@ teardown:
catch: /illegal_state_exception/
index:
index: test
type: test
id: 1
pipeline: "outer"
body: {}

View File

@ -26,7 +26,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {
@ -36,7 +35,6 @@ teardown:
- do:
index:
index: test
type: test
id: 2
pipeline: "my_pipeline"
body: {
@ -47,14 +45,12 @@ teardown:
catch: missing
get:
index: test
type: test
id: 1
- match: { found: false }
- do:
get:
index: test
type: test
id: 2
- match: { _source.foo: "blub" }
@ -84,7 +80,6 @@ teardown:
- do:
index:
index: test
type: test
id: 3
pipeline: "my_pipeline_with_failure"
body: {
@ -95,6 +90,5 @@ teardown:
catch: missing
get:
index: test
type: test
id: 3
- match: { found: false }

View File

@ -29,7 +29,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {date_source_field: "12/06/2010"}
@ -37,8 +36,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.date_source_field: "12/06/2010" }
- match: { _source.date_target_field: "2010-06-12T00:00:00.000+02:00" }

View File

@ -84,7 +84,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: >
@ -103,7 +102,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- is_false: _source.field_to_rename
- is_false: _source.field_to_remove
@ -143,7 +141,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field: "value"}
@ -151,8 +148,6 @@ teardown:
- do:
get:
index: surprise
type: test
id: 1
- length: { _source: 1 }
- match: { _source.field: "value" }

View File

@ -47,7 +47,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field1: "value1"}
@ -55,7 +54,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.field1: "value1" }
- match: { _source._executed: true }
@ -105,7 +103,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field1: "value1"}
@ -113,7 +110,6 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.field1: "value1" }
- match: { _source.foofield: "exists" }
@ -202,7 +198,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {}
@ -210,6 +205,5 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.field: "value" }

View File

@ -27,7 +27,6 @@ teardown:
catch: request
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {}
@ -61,7 +60,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {}
@ -69,7 +67,5 @@ teardown:
- do:
get:
index: test
type: test
id: 1
- match: { _source.error_message: "fail_processor_ran" }

View File

@ -50,13 +50,11 @@ teardown:
body:
- index:
_index: test_index
_type: test_type
_id: test_id1
pipeline: pipeline1
- f1: v1
- index:
_index: test_index
_type: test_type
_id: test_id2
- f1: v2
- gte: { ingest_took: 0 }
@ -64,7 +62,6 @@ teardown:
- do:
get:
index: test_index
type: test_type
id: test_id1
- match: {_source.field1: value1}
@ -73,7 +70,6 @@ teardown:
- do:
get:
index: test_index
type: test_type
id: test_id2
- is_false: _source.field1
@ -106,12 +102,10 @@ teardown:
body:
- index:
_index: test_index
_type: test_type
_id: test_id1
- f1: v1
- index:
_index: test_index
_type: test_type
_id: test_id2
pipeline: pipeline2
- f1: v2
@ -138,7 +132,6 @@ teardown:
- do:
get:
index: test_index
type: test_type
id: test_id1
- match: {_source.field1: value1}
@ -147,9 +140,7 @@ teardown:
- do:
get:
index: test_index
type: test_type
id: test_id2
- is_false: _source.field1
- match: {_source.field2: value2}

View File

@ -19,7 +19,6 @@
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field1: "128.101.101.101"}
@ -27,7 +26,6 @@
- do:
get:
index: test
type: test
id: 1
- match: { _source.field1: "128.101.101.101" }
- length: { _source.geoip: 6 }
@ -65,7 +63,6 @@
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field1: "128.101.101.101"}
@ -73,7 +70,6 @@
- do:
get:
index: test
type: test
id: 1
- match: { _source.field1: "128.101.101.101" }
- length: { _source.geoip: 9 }
@ -110,7 +106,6 @@
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field1: "128.101.101.101"}
@ -118,7 +113,6 @@
- do:
get:
index: test
type: test
id: 1
- match: { _source.field1: "128.101.101.101" }
- length: { _source.geoip: 2 }
@ -163,7 +157,6 @@
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: { field1: "80.231.5.0" }
@ -171,7 +164,6 @@
- do:
get:
index: test
type: test
id: 1
- match: { _source.field1: "80.231.5.0" }
- is_false: _source.geoip
@ -179,7 +171,6 @@
- do:
index:
index: test
type: test
id: 2
pipeline: "my_pipeline"
body: { field1: "128.101.101.101" }
@ -187,7 +178,6 @@
- do:
get:
index: test
type: test
id: 2
- match: { _source.field1: "128.101.101.101" }
- length: { _source.geoip: 6 }
@ -221,7 +211,6 @@
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field1: "82.171.64.0"}
@ -229,7 +218,6 @@
- do:
get:
index: test
type: test
id: 1
- match: { _source.field1: "82.171.64.0" }
- length: { _source.geoip: 3 }

View File

@ -19,7 +19,6 @@
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field1: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36"}
@ -27,7 +26,6 @@
- do:
get:
index: test
type: test
id: 1
- match: { _source.field1: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36" }
- match: { _source.user_agent.name: "Chrome" }
@ -63,7 +61,6 @@
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field1: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36"}
@ -71,7 +68,6 @@
- do:
get:
index: test
type: test
id: 1
- match: { _source.field1: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36" }
- match: { _source.field2.os: "Mac OS X 10.9.2" }

View File

@ -20,7 +20,6 @@
- do:
index:
index: test
type: test
id: 1
pipeline: "my_pipeline"
body: {field1: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36"}
@ -28,7 +27,6 @@
- do:
get:
index: test
type: test
id: 1
- match: { _source.field1: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.149 Safari/537.36" }
- match: { _source.user_agent.name: "Test" }

View File

@ -2,17 +2,16 @@
setup:
- do:
indices.create:
include_type_name: false
index: test123
body:
mappings:
test:
properties:
age:
type: long
properties:
age:
type: long
- do:
index:
index: test123
type: test
id: 1
body: { age: 23 }
@ -33,4 +32,3 @@ setup:
source: 'doc["age"].value + 19'
- match: { hits.hits.0.fields.my_field.0: 42.0 }

View File

@ -109,13 +109,11 @@
- do:
index:
index: test
type: testtype
id: 1
body: { "text": "value1_foo" }
- do:
index:
index: test
type: testtype
id: 2
body: { "text": "value2_foo value3_foo" }
- do:

View File

@ -8,17 +8,16 @@
"source": {
"query": {
"match": {
"url": "https://localhost:9200/{{#url}}{{index}}{{/url}}/{{#url}}{{type}}{{/url}}/_search"
"url": "https://localhost:9200/{{#url}}{{index}}{{/url}}/_search"
}
}
},
"params": {
"index": "<logstash-{now/d-2d}>",
"type" : "métriques"
"index": "<logstash-{now/d-2d}>"
}
}
- match: { template_output.query.match.url: "https://localhost:9200/%3Clogstash-%7Bnow%2Fd-2d%7D%3E/m%C3%A9triques/_search" }
- match: { template_output.query.match.url: "https://localhost:9200/%3Clogstash-%7Bnow%2Fd-2d%7D%3E/_search" }
---
"Rendering using {{url}} and {{join}} functions":

View File

@ -4,13 +4,11 @@
- do:
index:
index: test
type: testtype
id: 1
body: { "text": "value1" }
- do:
index:
index: test
type: testtype
id: 2
body: { "text": "value2" }
- do:
@ -57,28 +55,24 @@
- do:
index:
index: test
type: type
id: 1
body: { "theField": "foo" }
- do:
index:
index: test
type: type
id: 2
body: { "theField": "foo 2" }
- do:
index:
index: test
type: type
id: 3
body: { "theField": "foo 3" }
- do:
index:
index: test
type: type
id: 4
body: { "theField": "foo 4" }
@ -87,7 +81,6 @@
- do:
index:
index: otherindex
type: type
id: 5
body: { "otherField": "foo" }
- do:
@ -142,7 +135,6 @@
- do:
index:
index: test
type: type
id: 1
body: {}
@ -159,4 +151,3 @@
- match: { hits.total.value: 0 }
- match: { hits.total.relation: eq }

View File

@ -4,28 +4,24 @@ setup:
- do:
index:
index: index_1
type: test
id: 1
body: { foo: bar }
- do:
index:
index: index_1
type: test
id: 2
body: { foo: baz }
- do:
index:
index: index_1
type: test
id: 3
body: { foo: foo }
- do:
index:
index: index_2
type: test
id: 1
body: { foo: foo }
@ -205,4 +201,3 @@ setup:
- match: { responses.1.hits.total.relation: eq }
- match: { responses.2.hits.total.value: 1 }
- match: { responses.1.hits.total.relation: eq }

View File

@ -4,7 +4,6 @@
- do:
index:
index: test_1
type: test
id: 1
body:
foo: bar
@ -13,7 +12,6 @@
- do:
update:
index: test_1
type: test
id: 1
body:
script:
@ -22,14 +20,13 @@
params: { bar: 'xxx' }
- match: { _index: test_1 }
- match: { _type: test }
- match: { _type: _doc }
- match: { _id: "1" }
- match: { _version: 2 }
- do:
get:
index: test_1
type: test
id: 1
- match: { _source.foo: xxx }
@ -38,7 +35,6 @@
- do:
update:
index: test_1
type: test
id: 1
body:
script:
@ -46,14 +42,13 @@
source: "ctx._source.foo = 'yyy'"
- match: { _index: test_1 }
- match: { _type: test }
- match: { _type: _doc }
- match: { _id: "1" }
- match: { _version: 3 }
- do:
get:
index: test_1
type: test
id: 1
- match: { _source.foo: yyy }
@ -62,7 +57,6 @@
- do:
update:
index: test_1
type: test
id: 1
body:
script:
@ -70,14 +64,13 @@
source: "ctx._source.missing_length = ctx._source.missing?.length()"
- match: { _index: test_1 }
- match: { _type: test }
- match: { _type: _doc }
- match: { _id: "1" }
- match: { _version: 4 }
- do:
get:
index: test_1
type: test
id: 1
- match: { _source.foo: yyy }
@ -88,7 +81,6 @@
- do:
update:
index: test_1
type: test
id: 1
body:
script:
@ -96,14 +88,13 @@
source: "ctx._source.foo_length = ctx._source.foo?.length()"
- match: { _index: test_1 }
- match: { _type: test }
- match: { _type: _doc }
- match: { _id: "1" }
- match: { _version: 5 }
- do:
get:
index: test_1
type: test
id: 1
- match: { _source.foo: yyy }
@ -117,7 +108,6 @@
- do:
index:
index: test_1
type: test
id: 2
body:
foo: bar
@ -127,7 +117,6 @@
catch: bad_request
update:
index: test_1
type: test
id: 2
body:
script:

View File

@ -3,25 +3,24 @@
setup:
- do:
indices.create:
include_type_name: false
index: test
body:
mappings:
test:
properties:
foo:
type: keyword
missing:
type: keyword
date:
type: date
format: yyyy/MM/dd
dates:
type: date
format: yyyy/MM/dd
properties:
foo:
type: keyword
missing:
type: keyword
date:
type: date
format: yyyy/MM/dd
dates:
type: date
format: yyyy/MM/dd
- do:
index:
index: test
type: test
id: 1
body: {
"foo": "aaa",
@ -156,4 +155,3 @@ setup:
- match: { error.failed_shards.0.reason.caused_by.reason: "While loop has no escape." }
- match: { error.failed_shards.0.reason.type: "script_exception" }
- match: { error.failed_shards.0.reason.reason: "compile error" }

View File

@ -4,7 +4,6 @@
- do:
update:
index: test_1
type: test
id: 1
body:
script:
@ -16,7 +15,6 @@
- do:
get:
index: test_1
type: test
id: 1
- match: { _source.foo: baz }
@ -25,7 +23,6 @@
- do:
update:
index: test_1
type: test
id: 1
body:
script:
@ -37,7 +34,6 @@
- do:
get:
index: test_1
type: test
id: 1
- match: { _source.foo: xxx }
@ -45,7 +41,6 @@
- do:
update:
index: test_1
type: test
id: 2
body:
script:
@ -58,7 +53,6 @@
- do:
get:
index: test_1
type: test
id: 2
- match: { _source.foo: xxx }
@ -66,7 +60,6 @@
- do:
update:
index: test_1
type: test
id: 3
body:
script:
@ -78,9 +71,6 @@
- do:
get:
index: test_1
type: test
id: 3
- match: { _source.has_now: true }

View File

@ -4,19 +4,16 @@
- do:
index:
index: test
type: test
id: 1
body: { "test": "value beck", "num1": 1.0, "bool": true }
- do:
index:
index: test
type: test
id: 2
body: { "test": "value beck", "num1": 2.0, "bool": false }
- do:
index:
index: test
type: test
id: 3
body: { "test": "value beck", "num1": 3.0, "bool": true }
- do:
@ -34,7 +31,7 @@
lang: painless
script_fields:
sNum1:
script:
script:
source: "doc['num1'].value;"
lang: painless
sort:
@ -86,7 +83,7 @@
script_fields:
sNum1:
script:
script:
source: "doc['num1'].value;"
lang: painless
sort:
@ -118,13 +115,11 @@
- do:
index:
index: test
type: test
id: 1
body: { "test": "value beck", "num1": 1.0 }
- do:
index:
index: test
type: test
id: 2
body: { "test": "value beck", "num1": 2.0 }
- do:
@ -277,7 +272,6 @@
- do:
index:
index: test
type: test
id: 1
body: { "dummy_field": 1 }
- do:
@ -328,7 +322,6 @@
- do:
index:
index: test
type: test
id: 1
body: { "dummy_field": 1 }
- do:
@ -368,7 +361,6 @@
- do:
index:
index: test
type: test
id: 1
body: { "f": 42 }
- do:
@ -382,7 +374,7 @@
body:
script_fields:
foobar:
script:
script:
source: "doc['f'].size()"
lang: painless
@ -396,7 +388,6 @@
- do:
index:
index: test
type: test
id: 1
body: { "dummy_field": 1 }
- do:
@ -433,7 +424,6 @@
- do:
index:
index: test
type: test
id: 1
body: { "genre": 1 }
@ -469,7 +459,6 @@
- do:
index:
index: test
type: test
id: 1
body: { "test": "value beck", "num1": 1.0 }
- do:

View File

@ -4,7 +4,6 @@
- do:
index:
index: test_1
type: test
id: 1
body:
foo: bar
@ -14,7 +13,6 @@
catch: /Regexes are disabled. Set \[script.painless.regex.enabled\] to \[true\] in elasticsearch.yaml to allow them. Be careful though, regexes break out of Painless's protection against deep recursion and long loops./
update:
index: test_1
type: test
id: 1
body:
script:

View File

@ -1,48 +1,47 @@
setup:
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
number_of_shards: 1
mappings:
test:
properties:
boolean:
type: boolean
date:
type: date
geo_point:
type: geo_point
ip:
type: ip
keyword:
type: keyword
long:
type: long
integer:
type: integer
short:
type: short
byte:
type: byte
double:
type: double
float:
type: float
half_float:
type: half_float
scaled_float:
type: scaled_float
scaling_factor: 100
token_count:
type: token_count
analyzer: standard
properties:
boolean:
type: boolean
date:
type: date
geo_point:
type: geo_point
ip:
type: ip
keyword:
type: keyword
long:
type: long
integer:
type: integer
short:
type: short
byte:
type: byte
double:
type: double
float:
type: float
half_float:
type: half_float
scaled_float:
type: scaled_float
scaling_factor: 100
token_count:
type: token_count
analyzer: standard
- do:
index:
index: test
type: test
id: 1
body:
boolean: true

View File

@ -4,14 +4,14 @@
features: ["headers"]
- do:
indices.create:
include_type_name: false
index: test
body:
mappings:
test:
properties:
binary:
type: binary
doc_values: true
properties:
binary:
type: binary
doc_values: true
- do:
#set the header so we won't randomize it
@ -19,7 +19,6 @@
Content-Type: application/json
index:
index: test
type: test
id: 1
body:
binary: U29tZSBiaW5hcnkgYmxvYg==
@ -46,4 +45,3 @@
script:
source: "doc['binary'].value.utf8ToString()"
- match: { hits.hits.0.fields.field.0: "Some binary blob" }

View File

@ -1,17 +1,17 @@
setup:
- do:
indices.create:
include_type_name: false
index: my-index
body:
mappings:
doc:
properties:
rank:
type: long
field:
type: keyword
text:
type: text
properties:
rank:
type: long
field:
type: keyword
text:
type: text
---
"Execute with defaults":

View File

@ -6,15 +6,15 @@ setup:
reason: "moving_fn added in 6.4.0"
- do:
indices.create:
include_type_name: false
index: test
body:
mappings:
_doc:
properties:
value_field:
type: integer
date:
type: date
properties:
value_field:
type: integer
date:
type: date
- do:
bulk:
@ -22,37 +22,31 @@ setup:
body:
- index:
_index: test
_type: _doc
_id: 1
- date: "2017-01-01T00:00:00"
value_field: 1
- index:
_index: test
_type: _doc
_id: 2
- date: "2017-01-02T00:00:00"
value_field: 2
- index:
_index: test
_type: _doc
_id: 3
- date: "2017-01-03T00:00:00"
value_field: 3
- index:
_index: test
_type: _doc
_id: 4
- date: "2017-01-04T00:00:00"
value_field: 4
- index:
_index: test
_type: _doc
_id: 5
- date: "2017-01-05T00:00:00"
value_field: 5
- index:
_index: test
_type: _doc
_id: 6
- date: "2017-01-06T00:00:00"
value_field: 6
@ -316,9 +310,3 @@ setup:
- match: { hits.total: 6 }
- length: { hits.hits: 0 }

View File

@ -80,31 +80,28 @@ setup:
"Random functions":
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
number_of_shards: 2
mappings:
_doc:
properties:
f1:
type: keyword
properties:
f1:
type: keyword
- do:
index:
index: test
type: _doc
id: 1
body: {"f1": "v1"}
- do:
index:
index: test
type: _doc
id: 2
body: {"f1": "v2"}
- do:
index:
index: test
type: _doc
id: 3
body: {"f1": "v3"}
@ -139,27 +136,25 @@ setup:
"Decay geo functions":
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
number_of_shards: 1
mappings:
_doc:
properties:
text-location:
type: keyword
location:
type: geo_point
properties:
text-location:
type: keyword
location:
type: geo_point
- do:
index:
index: test
type: _doc
id: 1
body: { "text-location": "location1", "location" : {"lat" : 40.24, "lon" : -70.24} }
- do:
index:
index: test
type: _doc
id: 2
body: { "text-location": "location2", "location" : {"lat" : 40.12, "lon" : -70.12} }
- do:
@ -239,13 +234,11 @@ setup:
- do:
index:
index: test
type: _doc
id: 1
body: { "date": "2018-01-01T02:00:00Z"}
- do:
index:
index: test
type: _doc
id: 2
body: { "date": "2018-01-01T01:00:00Z" }
- do:
@ -332,7 +325,6 @@ setup:
- do:
index:
index: test
type: _doc
id: 1
body: { "ival" : 40, "lval" : 40, "fval": 40.0, "dval": 40.0}
@ -340,7 +332,6 @@ setup:
- do:
index:
index: test
type: _doc
id: 2
body: { "ival" : [50, 40, 20], "lval" : [50, 40, 20], "fval" : [50.0, 40.0, 20.0], "dval" : [50.0, 40.0, 20.0] }
- do:

View File

@ -5,25 +5,25 @@ setup:
- do:
indices.create:
include_type_name: false
index: test
body:
mappings:
test:
properties:
text:
type: text
analyzer: standard
properties:
text:
type: text
analyzer: standard
- do:
bulk:
refresh: true
body:
- '{"index": {"_index": "test", "_type": "test", "_id": "1"}}'
- '{"index": {"_index": "test", "_id": "1"}}'
- '{"text" : "Some like it hot, some like it cold"}'
- '{"index": {"_index": "test", "_type": "test", "_id": "2"}}'
- '{"index": {"_index": "test", "_id": "2"}}'
- '{"text" : "Its cold outside, theres no kind of atmosphere"}'
- '{"index": {"_index": "test", "_type": "test", "_id": "3"}}'
- '{"index": {"_index": "test", "_id": "3"}}'
- '{"text" : "Baby its cold there outside"}'
- '{"index": {"_index": "test", "_type": "test", "_id": "4"}}'
- '{"index": {"_index": "test", "_id": "4"}}'
- '{"text" : "Outside it is cold and wet"}'
---
@ -42,5 +42,3 @@ setup:
source: "interval.start > 3"
- match: { hits.total.value: 1 }

View File

@ -5,15 +5,15 @@ setup:
- do:
indices.create:
include_type_name: false
index: test-index
body:
settings:
number_of_replicas: 0
mappings:
_doc:
properties:
my_dense_vector:
type: dense_vector
properties:
my_dense_vector:
type: dense_vector
---
@ -21,7 +21,6 @@ setup:
- do:
index:
index: test-index
type: _doc
id: 1
body:
my_dense_vector: [1.5, -10, 3455, 345452.4545]

View File

@ -5,23 +5,22 @@ setup:
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
number_of_replicas: 0
mappings:
_doc:
properties:
pagerank:
type: rank_feature
url_length:
type: rank_feature
positive_score_impact: false
properties:
pagerank:
type: rank_feature
url_length:
type: rank_feature
positive_score_impact: false
- do:
index:
index: test
type: _doc
id: 1
body:
pagerank: 10
@ -30,9 +29,8 @@ setup:
- do:
index:
index: test
type: _doc
id: 2
body:
body:
pagerank: 100
url_length: 20

View File

@ -5,20 +5,19 @@ setup:
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
number_of_replicas: 0
mappings:
_doc:
properties:
tags:
type: rank_features
properties:
tags:
type: rank_features
- do:
index:
index: test
type: _doc
id: 1
body:
tags:
@ -28,9 +27,8 @@ setup:
- do:
index:
index: test
type: _doc
id: 2
body:
body:
tags:
bar: 6
quux: 10

View File

@ -1,42 +1,38 @@
setup:
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
number_of_replicas: 0
mappings:
doc:
"properties":
"number":
"type" : "scaled_float"
"scaling_factor": 100
"properties":
"number":
"type" : "scaled_float"
"scaling_factor": 100
- do:
index:
index: test
type: doc
id: 1
body: { "number" : 1 }
- do:
index:
index: test
type: doc
id: 2
body: { "number" : 1.53 }
- do:
index:
index: test
type: doc
id: 3
body: { "number" : -2.1 }
- do:
index:
index: test
type: doc
id: 4
body: { "number" : 1.53 }
@ -107,4 +103,3 @@ setup:
- match: { hits.total: 4 }
- match: { hits.hits.0._id: "3" }

View File

@ -5,15 +5,15 @@ setup:
- do:
indices.create:
include_type_name: false
index: test-index
body:
settings:
number_of_replicas: 0
mappings:
_doc:
properties:
my_sparse_vector:
type: sparse_vector
properties:
my_sparse_vector:
type: sparse_vector
---
@ -21,7 +21,6 @@ setup:
- do:
index:
index: test-index
type: _doc
id: 1
body:
my_sparse_vector: { "50" : 1.8, "2" : -0.4, "10" : 1000.3, "4545" : -0.00004}

View File

@ -1,27 +1,25 @@
setup:
- do:
indices.create:
include_type_name: false
index: test
body:
mappings:
doc:
properties:
join_field:
type: join
relations:
parent: child
properties:
join_field:
type: join
relations:
parent: child
- do:
index:
index: test
type: doc
id: 1
body: {"foo": "bar", "join_field": {"name" : "parent"} }
- do:
index:
index: test
type: doc
id: 2
routing: 1
body: {"bar": "baz", "join_field": { "name" : "child", "parent": "1"} }

View File

@ -1,31 +1,28 @@
setup:
- do:
indices.create:
include_type_name: false
index: test
body:
mappings:
doc:
properties:
join_field: { "type": "join", "relations": { "parent": "child", "child": "grand_child" } }
properties:
join_field: { "type": "join", "relations": { "parent": "child", "child": "grand_child" } }
- do:
index:
index: test
type: doc
id: 1
body: { "join_field": { "name": "parent" } }
- do:
index:
index: test
type: doc
id: 2
body: { "join_field": { "name": "parent" } }
- do:
index:
index: test
type: doc
id: 3
routing: 1
body: { "join_field": { "name": "child", "parent": "1" } }
@ -33,7 +30,6 @@ setup:
- do:
index:
index: test
type: doc
id: 4
routing: 1
body: { "join_field": { "name": "child", "parent": "1" } }
@ -41,7 +37,6 @@ setup:
- do:
index:
index: test
type: doc
id: 5
routing: 1
body: { "join_field": { "name": "child", "parent": "2" } }
@ -49,7 +44,6 @@ setup:
- do:
index:
index: test
type: doc
id: 6
routing: 1
body: { "join_field": { "name": "grand_child", "parent": "5" } }
@ -66,35 +60,35 @@ setup:
- match: { hits.total: 6 }
- match: { hits.hits.0._index: "test" }
- match: { hits.hits.0._type: "doc" }
- match: { hits.hits.0._type: "_doc" }
- match: { hits.hits.0._id: "3" }
- match: { hits.hits.0._source.join_field.name: "child" }
- match: { hits.hits.0._source.join_field.parent: "1" }
- is_false: hits.hits.0.fields.join_field#child }
- match: { hits.hits.1._index: "test" }
- match: { hits.hits.1._type: "doc" }
- match: { hits.hits.1._type: "_doc" }
- match: { hits.hits.1._id: "4" }
- match: { hits.hits.1._source.join_field.name: "child" }
- match: { hits.hits.1._source.join_field.parent: "1" }
- is_false: hits.hits.1.fields.join_field#child }
- match: { hits.hits.2._index: "test" }
- match: { hits.hits.2._type: "doc" }
- match: { hits.hits.2._type: "_doc" }
- match: { hits.hits.2._id: "5" }
- match: { hits.hits.2._source.join_field.name: "child" }
- match: { hits.hits.2._source.join_field.parent: "2" }
- is_false: hits.hits.2.fields.join_field#child }
- match: { hits.hits.3._index: "test" }
- match: { hits.hits.3._type: "doc" }
- match: { hits.hits.3._type: "_doc" }
- match: { hits.hits.3._id: "6" }
- match: { hits.hits.3._source.join_field.name: "grand_child" }
- match: { hits.hits.3._source.join_field.parent: "5" }
- match: { hits.hits.4._index: "test" }
- match: { hits.hits.4._type: "doc" }
- match: { hits.hits.4._type: "_doc" }
- match: { hits.hits.4._id: "1" }
- match: { hits.hits.4._source.join_field.name: "parent" }
- is_false: hits.hits.4._source.join_field.parent
- match: { hits.hits.5._index: "test" }
- match: { hits.hits.5._type: "doc" }
- match: { hits.hits.5._type: "_doc" }
- match: { hits.hits.5._id: "2" }
- match: { hits.hits.5._source.join_field.name: "parent" }
- is_false: hits.hits.5._source.join_field.parent
@ -113,14 +107,12 @@ setup:
- match: { hits.total: 2 }
- match: { hits.hits.0._index: "test" }
- match: { hits.hits.0._type: "doc" }
- match: { hits.hits.0._type: "_doc" }
- match: { hits.hits.0._id: "3" }
- match: { hits.hits.0._source.join_field.name: "child" }
- match: { hits.hits.0._source.join_field.parent: "1" }
- match: { hits.hits.1._index: "test" }
- match: { hits.hits.1._type: "doc" }
- match: { hits.hits.1._type: "_doc" }
- match: { hits.hits.1._id: "4" }
- match: { hits.hits.1._source.join_field.name: "child" }
- match: { hits.hits.1._source.join_field.parent: "1" }

View File

@ -2,20 +2,19 @@
"Test percolator basics via rest":
- do:
indices.create:
include_type_name: false
index: queries_index
body:
mappings:
doc:
properties:
query:
type: percolator
foo:
type: keyword
properties:
query:
type: percolator
foo:
type: keyword
- do:
index:
index: queries_index
type: doc
id: test_percolator
body:
query:

View File

@ -1,4 +1,4 @@
setup:
setup:
- do:
indices.create:
index: foo
@ -9,28 +9,24 @@ setup:
- do:
index:
index: foo
type: bar
id: doc1
body: { "text": "berlin" }
- do:
index:
index: foo
type: bar
id: doc2
body: { "text": "amsterdam" }
- do:
index:
index: foo
type: bar
id: doc3
body: { "text": "amsterdam" }
- do:
index:
index: foo
type: bar
id: doc4
body: { "text": "something about amsterdam and berlin" }
@ -52,7 +48,7 @@ setup:
- do:
rank_eval:
index: foo,
body: {
body: {
"requests" : [
{
"id": "amsterdam_query",
@ -75,7 +71,7 @@ setup:
- match: { details.amsterdam_query.metric_score: 1.0}
- match: { details.amsterdam_query.unrated_docs: [ {"_index": "foo", "_id": "doc4"}]}
- match: { details.amsterdam_query.metric_details.precision: {"relevant_docs_retrieved": 2, "docs_retrieved": 2}}
- length: { details.amsterdam_query.hits: 3}
- match: { details.amsterdam_query.hits.0.hit._id: "doc2"}
- match: { details.amsterdam_query.hits.0.rating: 1}
@ -83,7 +79,7 @@ setup:
- match: { details.amsterdam_query.hits.1.rating: 1}
- match: { details.amsterdam_query.hits.2.hit._id: "doc4"}
- is_false: details.amsterdam_query.hits.2.rating
- match: { details.berlin_query.metric_score: 1.0}
- match: { details.berlin_query.unrated_docs: [ {"_index": "foo", "_id": "doc4"}]}
- match: { details.berlin_query.metric_details.precision: {"relevant_docs_retrieved": 1, "docs_retrieved": 1}}
@ -99,7 +95,7 @@ setup:
- do:
rank_eval:
index: alias
body: {
body: {
"requests" : [
{
"id": "amsterdam_query",
@ -142,7 +138,7 @@ setup:
{
"id" : "berlin_query",
"request": { "query": { "match" : { "text" : "berlin" } }, "size" : 10 },
# doc1 should be returned in first position, doc3 in second, so reciprocal rank is 1/2
# doc1 should be returned in first position, doc3 in second, so reciprocal rank is 1/2
"ratings": [{"_index": "foo", "_id": "doc4", "rating": 1}]
}
],
@ -183,7 +179,7 @@ setup:
"ratings": [{"_index": "foo", "_id": "doc4", "rating": 1}]
}
],
"metric" : {
"metric" : {
"expected_reciprocal_rank": {
"maximum_relevance" : 1,
"k" : 5

View File

@ -8,42 +8,36 @@
- do:
index:
index: foo
type: bar
id: doc1
body: { "bar": 1 }
- do:
index:
index: foo
type: bar
id: doc2
body: { "bar": 2 }
- do:
index:
index: foo
type: bar
id: doc3
body: { "bar": 3 }
- do:
index:
index: foo
type: bar
id: doc4
body: { "bar": 4 }
- do:
index:
index: foo
type: bar
id: doc5
body: { "bar": 5 }
- do:
index:
index: foo
type: bar
id: doc6
body: { "bar": 6 }
@ -91,7 +85,7 @@
{"_index" : "foo", "_id" : "doc4", "rating": 0},
{"_index" : "foo", "_id" : "doc5", "rating": 1},
{"_index" : "foo", "_id" : "doc6", "rating": 2}]
},
},
],
"metric" : { "dcg": { }}
}
@ -103,7 +97,7 @@
- match: {details.dcg_query_reverse.unrated_docs: [ ]}
# if we mix both, we should get the average
- do:
rank_eval:
body: {
@ -129,7 +123,7 @@
{"_index" : "foo", "_id" : "doc4", "rating": 0},
{"_index" : "foo", "_id" : "doc5", "rating": 1},
{"_index" : "foo", "_id" : "doc6", "rating": 2}]
},
},
],
"metric" : { "dcg": { }}
}

View File

@ -8,7 +8,6 @@
- do:
index:
index: foo
type: bar
id: doc1
body: { "bar": 1 }

View File

@ -10,42 +10,36 @@ setup:
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "berlin", "title" : "Berlin, Germany" }
- do:
index:
index: test
type: _doc
id: 2
body: { "text": "amsterdam" }
- do:
index:
index: test
type: _doc
id: 3
body: { "text": "amsterdam" }
- do:
index:
index: test
type: _doc
id: 4
body: { "text": "amsterdam" }
- do:
index:
index: test
type: _doc
id: 5
body: { "text": "amsterdam" }
- do:
index:
index: test
type: _doc
id: 6
body: { "text": "amsterdam" }

View File

@ -3,7 +3,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -42,7 +41,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -103,7 +101,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -112,7 +109,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test2" }
@ -162,7 +158,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -171,7 +166,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test2" }
@ -259,13 +253,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "user": "junk" }
- do:
@ -296,13 +288,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "user": "kimchy" }
- do:
@ -343,17 +333,14 @@
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
indices.refresh: {}

View File

@ -19,7 +19,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -36,7 +35,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -53,7 +51,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:

View File

@ -7,7 +7,6 @@
- do:
index:
index: index1
type: _doc
id: 1
version: 0 # Starting version is zero
version_type: external
@ -28,6 +27,5 @@
- do:
get:
index: index1
type: _doc
id: 1
- match: {_version: 0}

View File

@ -9,7 +9,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: {"text": "test"}
- do:

View File

@ -10,17 +10,14 @@
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
indices.refresh: {}
@ -50,17 +47,14 @@
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
indices.refresh: {}
@ -91,17 +85,14 @@
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
indices.refresh: {}
@ -151,17 +142,14 @@
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
indices.refresh: {}

View File

@ -3,25 +3,21 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 2
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 3
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 4
body: { "text": "test" }
- do:
@ -69,25 +65,21 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 2
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 3
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 4
body: { "text": "test" }
- do:
@ -176,37 +168,31 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 2
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 3
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 4
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 5
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 6
body: { "text": "test" }
- do:
@ -297,25 +283,21 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 2
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 3
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 4
body: { "text": "test" }
- do:

View File

@ -3,7 +3,6 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -38,13 +37,11 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: dest
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -79,7 +76,6 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -136,13 +132,11 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: dest
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -183,13 +177,11 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: dest
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -224,7 +216,6 @@
- do:
index:
index: source
type: _doc
id: 1
body: {}
- do:
@ -242,7 +233,6 @@
- do:
get:
index: dest
type: _doc
id: 1
- match: { _source: {} }
@ -258,7 +248,6 @@
- do:
index:
index: source
type: foo
id: 1
body: { "text": "test", "filtered": "removed" }
refresh: true
@ -287,7 +276,6 @@
- do:
get:
index: dest
type: _doc
id: 1
- match: { _source.text: "test" }
- is_false: _source.filtered

View File

@ -44,7 +44,6 @@
- do:
index:
index: source
type: foo
id: 1
body: { "text": "test" }
- do:
@ -100,7 +99,6 @@
- do:
index:
index: test
type: test
id: 1
body: { "text": "test" }
- do:
@ -174,7 +172,6 @@
- do:
index:
index: test
type: test
id: 1
body: { age: 23 }
- do:
@ -301,7 +298,6 @@
- do:
index:
index: source
type: foo
id: 1
body: { "text": "test" }
- do:

View File

@ -10,7 +10,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
body: { "text": "test" }
- do:
@ -37,7 +36,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
body: { "text": "test" }
- do:
@ -59,7 +57,6 @@ teardown:
- do:
index:
index: test
type: test
id: 1
body: { "text": "test" }
- do:

View File

@ -3,13 +3,11 @@
- do:
index:
index: test
type: test
id: 1
body: { "text": "test" }
- do:
index:
index: test
type: test
id: 2
body: { "text": "junk" }
- do:
@ -38,13 +36,11 @@
- do:
index:
index: test
type: test
id: 1
body: { "order": 1 }
- do:
index:
index: test
type: test
id: 2
body: { "order": 2 }
- do:

View File

@ -10,7 +10,6 @@
- do:
index:
index: source
type: foo
id: 1
body: { "text": "test" }
- do:

View File

@ -7,7 +7,6 @@
- do:
index:
index: src
type: test
id: 1
body: { "company": "cat" }
version: 2
@ -15,13 +14,11 @@
- do:
index:
index: src
type: test
id: 2
body: { "company": "cow" }
- do:
index:
index: dest
type: test
id: 1
body: { "company": "dog" }
- do:
@ -54,7 +51,6 @@
- do:
index:
index: src
type: test
id: 1
body: { "company": "cat" }
version: 2
@ -62,13 +58,11 @@
- do:
index:
index: src
type: test
id: 2
body: { "company": "cow" }
- do:
index:
index: dest
type: test
id: 1
body: { "company": "dog" }
- do:
@ -103,7 +97,6 @@
- do:
index:
index: src
type: test
id: 1
body: { "company": "cat" }
version: 2
@ -111,13 +104,11 @@
- do:
index:
index: src
type: test
id: 2
body: { "company": "cow" }
- do:
index:
index: dest
type: test
id: 1
body: { "company": "dog" }
- do:
@ -151,19 +142,16 @@
- do:
index:
index: src
type: test
id: 1
body: { "company": "cat" }
- do:
index:
index: src
type: test
id: 2
body: { "company": "cow" }
- do:
index:
index: dest
type: test
id: 1
body: { "company": "dog" }
- do:

View File

@ -3,7 +3,6 @@
- do:
index:
index: src
type: _doc
id: 1
body: { "company": "cat" }
- do:
@ -22,7 +21,6 @@
- do:
get:
index: dest
type: _doc
id: 1
routing: cat
- match: { _routing: cat }
@ -32,7 +30,6 @@
- do:
index:
index: src
type: _doc
id: 1
body: { "company": "cat" }
routing: null
@ -52,6 +49,5 @@
- do:
get:
index: dest
type: _doc
id: 1
- is_false: _routing

View File

@ -9,7 +9,6 @@
- do:
index:
index: src
type: _doc
id: 1
body: {"text": "test"}
- do:
@ -43,5 +42,4 @@
- do:
get:
index: dest
type: _doc
id: 1

View File

@ -12,19 +12,16 @@
- do:
index:
index: source
type: foo
id: 1
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 2
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 3
body: { "text": "test" }
- do:
@ -61,19 +58,16 @@
- do:
index:
index: source
type: foo
id: 1
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 2
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 3
body: { "text": "test" }
- do:
@ -110,19 +104,16 @@
- do:
index:
index: source
type: foo
id: 1
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 2
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 3
body: { "text": "test" }
- do:
@ -165,19 +156,16 @@
- do:
index:
index: source
type: foo
id: 1
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 2
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 3
body: { "text": "test" }
- do:

View File

@ -3,25 +3,21 @@
- do:
index:
index: source
type: foo
id: 1
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 2
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 3
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 4
body: { "text": "test" }
- do:
@ -65,25 +61,21 @@
- do:
index:
index: source
type: foo
id: 1
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 2
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 3
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 4
body: { "text": "test" }
- do:
@ -181,37 +173,31 @@
- do:
index:
index: source
type: foo
id: 1
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 2
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 3
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 4
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 5
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 6
body: { "text": "test" }
- do:
@ -306,25 +292,21 @@
- do:
index:
index: source
type: foo
id: 1
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 2
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 3
body: { "text": "test" }
- do:
index:
index: source
type: foo
id: 4
body: { "text": "test" }
- do:

View File

@ -3,7 +3,6 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
@ -38,13 +37,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "user": "blort" }
- do:
@ -89,13 +86,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "user": "foo" }
- do:
@ -118,7 +113,6 @@
- do:
get:
index: new_twitter
type: _doc
id: 1
routing: kimchy
- match: { _routing: kimchy }
@ -126,7 +120,6 @@
- do:
get:
index: new_twitter
type: _doc
id: 2
routing: foo
- match: { _routing: foo }
@ -136,13 +129,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "user": "foo" }
- do:
@ -192,13 +183,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "user": "foo" }
- do:
@ -227,7 +216,6 @@
- do:
index:
index: twitter
type: _doc
id: 1
version: 1
version_type: external
@ -235,7 +223,6 @@
- do:
index:
index: new_twitter
type: _doc
id: 1
version: 1
version_type: external
@ -273,13 +260,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: new_twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
@ -314,13 +299,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "user": "another" }
- do:
@ -366,32 +349,27 @@
- do:
index:
index: index1
type: _doc
id: 1
body: { "lang": "en", "id": 123 }
- do:
index:
index: index1
type: _doc
id: 2
body: { "lang": "en", "id": 456 }
- do:
index:
index: index1
type: _doc
id: 3
body: { "lang": "fr", "id": 789 }
# Destination index
- do:
index:
index: index2
type: _doc
id: fr_789
body: { "lang": "fr", "id": 789 }
- do:
index:
index: index2
type: _doc
id: en_123
body: { "lang": "en", "id": 123 }
- do:
@ -444,7 +422,6 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:

View File

@ -3,7 +3,6 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
refresh: true
@ -59,13 +58,11 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: source
type: _doc
id: 2
body: { "text": "test2" }
- do:
@ -116,7 +113,6 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
routing: foo
@ -169,7 +165,6 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
refresh: true
@ -227,14 +222,12 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
refresh: true
- do:
index:
index: source
type: _doc
id: 2
body: { "text": "test" }
refresh: true
@ -291,7 +284,6 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
refresh: true
@ -323,7 +315,6 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
refresh: true
@ -345,7 +336,6 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test", "filtered": "removed" }
refresh: true
@ -385,7 +375,6 @@
- do:
get:
index: dest
type: _doc
id: 1
- match: { _source.text: "test" }
- is_false: _source.filtered
@ -404,19 +393,16 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: source
type: _doc
id: 2
body: { "text": "test" }
- do:
index:
index: source
type: _doc
id: 3
body: { "text": "test" }
- do:

View File

@ -20,14 +20,12 @@ setup:
- do:
index:
index: source
type: doc
id: 1
body: { "join_field": { "name": "parent" } }
- do:
index:
index: source
type: doc
id: 2
routing: 1
body: { "join_field": { "name": "child", "parent": "1" } }
@ -35,7 +33,6 @@ setup:
- do:
index:
index: source
type: doc
id: 3
routing: 1
body: { "join_field": { "name": "grand_child", "parent": "2" } }

View File

@ -3,7 +3,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -30,7 +29,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -87,7 +85,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -96,7 +93,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test2" }
@ -132,7 +128,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -141,7 +136,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test2" }
@ -203,13 +197,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "user": "junk" }
- do:
@ -233,13 +225,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "user": "kimchy" }
- do:
@ -267,17 +257,14 @@
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
indices.refresh: {}
@ -293,7 +280,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: {}
- do:
@ -307,7 +293,6 @@
- do:
get:
index: test
type: _doc
id: 1
- match: { _source: {} }
- match: { _version: 2 }

View File

@ -3,7 +3,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -17,7 +16,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -31,7 +29,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
@ -53,7 +50,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: { age: 23 }
- do:

View File

@ -12,7 +12,6 @@
- do:
index:
index: test
type: _doc
id: 1
refresh: true
body: { "name": "bob! house" }

View File

@ -10,7 +10,6 @@
- do:
index:
index: source
type: _doc
id: 1
body: { "text": "test" }
- do:

View File

@ -3,7 +3,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: {"text": "test"}
- do:
@ -18,7 +17,6 @@
- do:
get:
index: test
type: _doc
id: 1
- match: {_version: 2}
@ -30,7 +28,6 @@
- do:
index:
index: index1
type: _doc
id: 1
version: 0 # Starting version is zero
version_type: external
@ -48,6 +45,5 @@
- do:
get:
index: index1
type: _doc
id: 1
- match: {_version: 0}

View File

@ -9,7 +9,6 @@
- do:
index:
index: test
type: _doc
id: 1
body: {"text": "test"}
- do:
@ -35,5 +34,4 @@
- do:
get:
index: test
type: _doc
id: 1

View File

@ -10,17 +10,14 @@
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
indices.refresh: {}
@ -46,17 +43,14 @@
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
indices.refresh: {}
@ -83,17 +77,14 @@
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
indices.refresh: {}
@ -130,17 +121,14 @@
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
index:
index: test
type: _doc
body: { "text": "test" }
- do:
indices.refresh: {}

View File

@ -3,25 +3,21 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 2
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 3
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 4
body: { "text": "test" }
- do:
@ -61,25 +57,21 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 2
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 3
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 4
body: { "text": "test" }
- do:
@ -163,37 +155,31 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 2
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 3
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 4
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 5
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 6
body: { "text": "test" }
- do:
@ -280,25 +266,21 @@
- do:
index:
index: test
type: _doc
id: 1
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 2
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 3
body: { "text": "test" }
- do:
index:
index: test
type: _doc
id: 4
body: { "text": "test" }
- do:

View File

@ -3,7 +3,6 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
@ -35,7 +34,6 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
@ -64,13 +62,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "user": "foo" }
- do:
@ -112,13 +108,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "user": "foo" }
- do:
@ -141,7 +135,6 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
@ -161,7 +154,6 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
@ -181,25 +173,21 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "level": 9, "last_updated": "2016-01-01T12:10:30Z" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "level": 10, "last_updated": "2016-01-01T12:10:30Z" }
- do:
index:
index: twitter
type: _doc
id: 3
body: { "level": 11, "last_updated": "2016-01-01T12:10:30Z" }
- do:
index:
index: twitter
type: _doc
id: 4
body: { "level": 12, "last_updated": "2016-01-01T12:10:30Z" }
- do:
@ -247,25 +235,21 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "level": 9, "last_updated": "2016-01-01T12:10:30Z" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "level": 10, "last_updated": "2016-01-01T12:10:30Z" }
- do:
index:
index: twitter
type: _doc
id: 3
body: { "level": 11, "last_updated": "2016-01-01T12:10:30Z" }
- do:
index:
index: twitter
type: _doc
id: 4
body: { "level": 12, "last_updated": "2016-01-01T12:10:30Z" }
- do:
@ -326,13 +310,11 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "user": "foo" }
- do:
@ -355,25 +337,21 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "level": 9, "last_updated": "2016-01-01T12:10:30Z" }
- do:
index:
index: twitter
type: _doc
id: 2
body: { "level": 10, "last_updated": "2016-01-01T12:10:30Z" }
- do:
index:
index: twitter
type: _doc
id: 3
body: { "level": 11, "last_updated": "2016-01-01T12:10:30Z" }
- do:
index:
index: twitter
type: _doc
id: 4
body: { "level": 12, "last_updated": "2016-01-01T12:10:30Z" }
- do:
@ -439,7 +417,6 @@
- do:
index:
index: twitter
type: _doc
id: 1
body: { "user": "kimchy" }
- do:

View File

@ -7,7 +7,7 @@
# snapshots. In order to do that it uses a URLFixture that exposes
# the content of the shared directory over HTTP. A second URL
# repository is used to test the snapshot restore but this time
# with a "file://" prefix.
# with a "file://" prefix.
setup:
# Ensure that the FS repository is registered, so we can create
@ -23,17 +23,14 @@ setup:
body:
- index:
_index: docs
_type: doc
_id: 1
- snapshot: one
- index:
_index: docs
_type: doc
_id: 2
- snapshot: one
- index:
_index: docs
_type: doc
_id: 3
- snapshot: one
@ -51,22 +48,18 @@ setup:
body:
- index:
_index: docs
_type: doc
_id: 4
- snapshot: two
- index:
_index: docs
_type: doc
_id: 5
- snapshot: two
- index:
_index: docs
_type: doc
_id: 6
- snapshot: two
- index:
_index: docs
_type: doc
_id: 7
- snapshot: two

View File

@ -4,6 +4,7 @@
"Index ICU content":
- do:
indices.create:
include_type_name: false
index: test
body:
settings:
@ -19,16 +20,14 @@
language: en
strength: primary
mappings:
type:
properties:
text:
type: text
analyzer: my_analyzer
properties:
text:
type: text
analyzer: my_analyzer
- do:
index:
index: test
type: type
id: 1
body: { "text": "Bâton enflammé" }
- do:

View File

@ -16,7 +16,6 @@
- do:
index:
index: test
type: type
id: 1
body: { "text": "JR新宿駅の近くにビールを飲みに行こうか" }
- do:

View File

@ -16,7 +16,6 @@
- do:
index:
index: test
type: type
id: 1
body: { "text": "뿌리가 깊은 나무는" }
- do:

View File

@ -4,6 +4,7 @@
"Index phonetic content":
- do:
indices.create:
include_type_name: false
index: phonetic_sample
body:
settings:
@ -19,16 +20,14 @@
encoder: metaphone
replace: false
mappings:
type:
properties:
text:
type: text
analyzer: my_analyzer
properties:
text:
type: text
analyzer: my_analyzer
- do:
index:
index: phonetic_sample
type: type
id: 1
body: { "text": "hello world" }
- do:

View File

@ -4,19 +4,18 @@
"Index Smartcn content":
- do:
indices.create:
include_type_name: false
index: test
body:
mappings:
type:
properties:
text:
type: text
analyzer: smartcn
properties:
text:
type: text
analyzer: smartcn
- do:
index:
index: test
type: type
id: 1
body: { "text": "我购买了道具和服装" }
- do:

View File

@ -4,19 +4,18 @@
"Index Stempel content":
- do:
indices.create:
include_type_name: false
index: test
body:
mappings:
type:
properties:
text:
type: text
analyzer: polish
properties:
text:
type: text
analyzer: polish
- do:
index:
index: test
type: type
id: 1
body: { "text": "studenta był" }
- do:

Some files were not shown because too many files have changed in this diff Show More