-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix_constant_keyword
Signed-off-by: kkewwei <kkewwei@163.com>
- Loading branch information
Showing
45 changed files
with
2,435 additions
and
473 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
plugins/repository-azure/licenses/reactor-netty-core-1.1.20.jar.sha1
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
plugins/repository-azure/licenses/reactor-netty-core-1.1.21.jar.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
acb98bd08107287c454ce74e7b1ed8e7a018a662 |
1 change: 0 additions & 1 deletion
1
plugins/repository-azure/licenses/reactor-netty-http-1.1.20.jar.sha1
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
plugins/repository-azure/licenses/reactor-netty-http-1.1.21.jar.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
b83542bb35630ef815b4177e3c670f62e952e695 |
1 change: 0 additions & 1 deletion
1
plugins/transport-reactor-netty4/licenses/reactor-netty-core-1.1.20.jar.sha1
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
plugins/transport-reactor-netty4/licenses/reactor-netty-core-1.1.21.jar.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
acb98bd08107287c454ce74e7b1ed8e7a018a662 |
1 change: 0 additions & 1 deletion
1
plugins/transport-reactor-netty4/licenses/reactor-netty-http-1.1.20.jar.sha1
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
plugins/transport-reactor-netty4/licenses/reactor-netty-http-1.1.21.jar.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
b83542bb35630ef815b4177e3c670f62e952e695 |
155 changes: 155 additions & 0 deletions
155
rest-api-spec/src/main/resources/rest-api-spec/test/index/110_strict_allow_templates.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
--- | ||
"Index documents with setting dynamic parameter to strict_allow_templates in the mapping of the index": | ||
- skip: | ||
version: " - 2.99.99" | ||
reason: "introduced in 3.0.0" | ||
|
||
- do: | ||
indices.create: | ||
index: test_1 | ||
body: | ||
mappings: | ||
dynamic: strict_allow_templates | ||
dynamic_templates: [ | ||
{ | ||
strings: { | ||
"match": "stringField*", | ||
"match_mapping_type": "string", | ||
"mapping": { | ||
"type": "keyword" | ||
} | ||
} | ||
}, | ||
{ | ||
object: { | ||
"match": "objectField*", | ||
"match_mapping_type": "object", | ||
"mapping": { | ||
"type": "object", | ||
"properties": { | ||
"bar1": { | ||
"type": "keyword" | ||
}, | ||
"bar2": { | ||
"type": "text" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
boolean: { | ||
"match": "booleanField*", | ||
"match_mapping_type": "boolean", | ||
"mapping": { | ||
"type": "boolean" | ||
} | ||
} | ||
}, | ||
{ | ||
double: { | ||
"match": "doubleField*", | ||
"match_mapping_type": "double", | ||
"mapping": { | ||
"type": "double" | ||
} | ||
} | ||
}, | ||
{ | ||
long: { | ||
"match": "longField*", | ||
"match_mapping_type": "long", | ||
"mapping": { | ||
"type": "long" | ||
} | ||
} | ||
}, | ||
{ | ||
array: { | ||
"match": "arrayField*", | ||
"mapping": { | ||
"type": "keyword" | ||
} | ||
} | ||
}, | ||
{ | ||
date: { | ||
"match": "dateField*", | ||
"match_mapping_type": "date", | ||
"mapping": { | ||
"type": "date" | ||
} | ||
} | ||
} | ||
] | ||
properties: | ||
test1: | ||
type: text | ||
|
||
- do: | ||
catch: /mapping set to strict_allow_templates, dynamic introduction of \[test2\] within \[\_doc\] is not allowed/ | ||
index: | ||
index: test_1 | ||
id: 1 | ||
body: { | ||
stringField: bar, | ||
objectField: { | ||
bar1: "bar1", | ||
bar2: "bar2" | ||
}, | ||
test1: test1, | ||
test2: test2 | ||
} | ||
|
||
- do: | ||
index: | ||
index: test_1 | ||
id: 1 | ||
body: { | ||
stringField: bar, | ||
objectField: { | ||
bar1: "bar1", | ||
bar2: "bar2" | ||
}, | ||
booleanField: true, | ||
doubleField: 1.0, | ||
longField: 100, | ||
arrayField: ["1","2"], | ||
dateField: "2024-06-25T05:11:51.243Z", | ||
test1: test1 | ||
} | ||
|
||
- do: | ||
get: | ||
index: test_1 | ||
id: 1 | ||
- match: { _source: { | ||
stringField: bar, | ||
objectField: { | ||
bar1: "bar1", | ||
bar2: "bar2" | ||
}, | ||
booleanField: true, | ||
doubleField: 1.0, | ||
longField: 100, | ||
arrayField: [ "1","2" ], | ||
dateField: "2024-06-25T05:11:51.243Z", | ||
test1: test1 | ||
} | ||
} | ||
|
||
- do: | ||
indices.get_mapping: { | ||
index: test_1 | ||
} | ||
|
||
- match: {test_1.mappings.dynamic: strict_allow_templates} | ||
- match: {test_1.mappings.properties.stringField.type: keyword} | ||
- match: {test_1.mappings.properties.objectField.properties.bar1.type: keyword} | ||
- match: {test_1.mappings.properties.objectField.properties.bar2.type: text} | ||
- match: {test_1.mappings.properties.booleanField.type: boolean} | ||
- match: {test_1.mappings.properties.doubleField.type: double} | ||
- match: {test_1.mappings.properties.longField.type: long} | ||
- match: {test_1.mappings.properties.arrayField.type: keyword} | ||
- match: {test_1.mappings.properties.dateField.type: date} | ||
- match: {test_1.mappings.properties.test1.type: text} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.