|
@@ -39,44 +39,257 @@
|
|
|
- match: { index.mappings.properties.foo.type: "keyword" }
|
|
|
- match: { index.mappings.properties.bar.type: "float" }
|
|
|
|
|
|
-# Explicit id
|
|
|
+---
|
|
|
+"Index explicit IDs without types":
|
|
|
+
|
|
|
+ - skip:
|
|
|
+ version: " - 6.99.99"
|
|
|
+ reason: include_type_name was introduced in 7.0.0
|
|
|
+
|
|
|
- do:
|
|
|
- index:
|
|
|
- index: index
|
|
|
- id: 1
|
|
|
- body: { foo: bar }
|
|
|
+ indices.create:
|
|
|
+ index: index
|
|
|
+ include_type_name: false
|
|
|
|
|
|
-# Implicit id
|
|
|
- do:
|
|
|
index:
|
|
|
+ include_type_name: false
|
|
|
index: index
|
|
|
+ id: 1
|
|
|
body: { foo: bar }
|
|
|
|
|
|
-# Bulk with explicit id
|
|
|
+ - match: { "_index": "index" }
|
|
|
+ - is_false: _type
|
|
|
+
|
|
|
- do:
|
|
|
bulk:
|
|
|
index: index
|
|
|
+ include_type_name: false
|
|
|
body: |
|
|
|
{ "index": { "_id": "2" } }
|
|
|
{ "doc": { "foo": "baz" } }
|
|
|
|
|
|
-# Bulk with implicit id
|
|
|
+ - match: { "items.0.index._index": "index" }
|
|
|
+ - is_false: items.0.index._type
|
|
|
+
|
|
|
+---
|
|
|
+"Index implicit IDs without types":
|
|
|
+
|
|
|
+ - skip:
|
|
|
+ version: " - 6.99.99"
|
|
|
+ reason: include_type_name was introduced in 7.0.0
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: index
|
|
|
+ include_type_name: false
|
|
|
+
|
|
|
+ - do:
|
|
|
+ index:
|
|
|
+ index: index
|
|
|
+ include_type_name: false
|
|
|
+ body: { foo: bar }
|
|
|
+
|
|
|
+ - match: { "_index": "index" }
|
|
|
+ - is_false: _type
|
|
|
+
|
|
|
- do:
|
|
|
bulk:
|
|
|
index: index
|
|
|
+ include_type_name: false
|
|
|
body: |
|
|
|
{ "index": { } }
|
|
|
{ "doc": { "foo": "baz" } }
|
|
|
|
|
|
+ - match: { "items.0.index._index": "index" }
|
|
|
+ - is_false: items.0.index._type
|
|
|
+
|
|
|
+---
|
|
|
+"Mixing include_type_name=false with explicit types":
|
|
|
+
|
|
|
+ - skip:
|
|
|
+ version: " - 6.99.99"
|
|
|
+ reason: include_type_name was introduced in 7.0.0
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: index
|
|
|
+ include_type_name: false
|
|
|
+
|
|
|
+ - do:
|
|
|
+ catch: /illegal_argument_exception/
|
|
|
+ index:
|
|
|
+ index: index
|
|
|
+ type: type
|
|
|
+ id: 1
|
|
|
+ include_type_name: false
|
|
|
+ body: { foo: bar }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ catch: /illegal_argument_exception/
|
|
|
+ index:
|
|
|
+ index: index
|
|
|
+ type: type
|
|
|
+ include_type_name: false
|
|
|
+ body: { foo: bar }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ catch: /illegal_argument_exception/
|
|
|
+ get:
|
|
|
+ index: index
|
|
|
+ type: type
|
|
|
+ id: 1
|
|
|
+ include_type_name: false
|
|
|
+
|
|
|
+ - do:
|
|
|
+ catch: /illegal_argument_exception/
|
|
|
+ update:
|
|
|
+ index: index
|
|
|
+ type: type
|
|
|
+ id: 1
|
|
|
+ include_type_name: false
|
|
|
+ body:
|
|
|
+ doc: { foo: baz }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ catch: /illegal_argument_exception/
|
|
|
+ delete:
|
|
|
+ index: index
|
|
|
+ type: type
|
|
|
+ id: 1
|
|
|
+ include_type_name: false
|
|
|
+
|
|
|
+ - do:
|
|
|
+ catch: /illegal_argument_exception/
|
|
|
+ search:
|
|
|
+ index: index
|
|
|
+ type: type
|
|
|
+ include_type_name: false
|
|
|
+
|
|
|
+ - do:
|
|
|
+ catch: /illegal_argument_exception/
|
|
|
+ search:
|
|
|
+ index: index
|
|
|
+ type: _doc
|
|
|
+ include_type_name: false
|
|
|
+
|
|
|
+---
|
|
|
+"Update API without types":
|
|
|
+
|
|
|
+ - skip:
|
|
|
+ version: " - 6.99.99"
|
|
|
+ reason: include_type_name was introduced in 7.0.0
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: index
|
|
|
+ include_type_name: false
|
|
|
+
|
|
|
+ - do:
|
|
|
+ index:
|
|
|
+ index: index
|
|
|
+ id: 1
|
|
|
+ include_type_name: false
|
|
|
+ body: { "foo": "bar" }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ update:
|
|
|
+ index: index
|
|
|
+ id: 1
|
|
|
+ include_type_name: false
|
|
|
+ body:
|
|
|
+ doc: { "foo": "baz" }
|
|
|
+
|
|
|
+ - match: { "_index": "index" }
|
|
|
+ - is_false: _type
|
|
|
+
|
|
|
+---
|
|
|
+"GET API without types":
|
|
|
+
|
|
|
+ - skip:
|
|
|
+ version: " - 6.99.99"
|
|
|
+ reason: include_type_name was introduced in 7.0.0
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: index
|
|
|
+ include_type_name: false
|
|
|
+
|
|
|
+ - do:
|
|
|
+ index:
|
|
|
+ index: index
|
|
|
+ id: 1
|
|
|
+ include_type_name: false
|
|
|
+ body: { "foo": "bar" }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ get:
|
|
|
+ index: index
|
|
|
+ id: 1
|
|
|
+ include_type_name: false
|
|
|
+
|
|
|
+ - match: { "_index": "index" }
|
|
|
+ - is_false: _type
|
|
|
+
|
|
|
+---
|
|
|
+"Delete API without types":
|
|
|
+
|
|
|
+ - skip:
|
|
|
+ version: " - 6.99.99"
|
|
|
+ reason: include_type_name was introduced in 7.0.0
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: index
|
|
|
+ include_type_name: false
|
|
|
+
|
|
|
+ - do:
|
|
|
+ index:
|
|
|
+ index: index
|
|
|
+ id: 1
|
|
|
+ include_type_name: false
|
|
|
+ body: { "foo": "bar" }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ delete:
|
|
|
+ index: index
|
|
|
+ id: 1
|
|
|
+ include_type_name: false
|
|
|
+
|
|
|
+ - match: { "_index": "index" }
|
|
|
+ - is_false: _type
|
|
|
+
|
|
|
+---
|
|
|
+"Search without types":
|
|
|
+
|
|
|
+ - skip:
|
|
|
+ version: " - 6.99.99"
|
|
|
+ reason: include_type_name was introduced in 7.0.0
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.create:
|
|
|
+ index: index
|
|
|
+ include_type_name: false
|
|
|
+
|
|
|
+ - do:
|
|
|
+ index:
|
|
|
+ index: index
|
|
|
+ id: 1
|
|
|
+ include_type_name: false
|
|
|
+ body: { "foo": "bar" }
|
|
|
+
|
|
|
- do:
|
|
|
indices.refresh:
|
|
|
- index: index
|
|
|
+ index: index
|
|
|
|
|
|
- do:
|
|
|
- count:
|
|
|
+ search:
|
|
|
index: index
|
|
|
+ include_type_name: false
|
|
|
|
|
|
- - match: { count: 4 }
|
|
|
+ - match: { "hits.total": 1 }
|
|
|
+ - match: { "hits.hits.0._index": "index" }
|
|
|
+ - is_false: hits.hits.0._type
|
|
|
|
|
|
---
|
|
|
"PUT mapping with a type and include_type_name: false":
|
|
@@ -88,6 +301,7 @@
|
|
|
- do:
|
|
|
indices.create:
|
|
|
index: index
|
|
|
+ include_type_name: false
|
|
|
|
|
|
- do:
|
|
|
catch: /illegal_argument_exception/
|
|
@@ -101,7 +315,7 @@
|
|
|
type: float
|
|
|
|
|
|
---
|
|
|
-"Empty index with the include_type_name=false option":
|
|
|
+"GET mappings on empty index with the include_type_name=false option":
|
|
|
|
|
|
- skip:
|
|
|
version: " - 6.99.99"
|