-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix array_index_out_of_bounds_exception when indexing documents with …
…field name containing only dot Signed-off-by: Gao Binlong <[email protected]>
- Loading branch information
1 parent
49b7cd4
commit 94c912e
Showing
4 changed files
with
74 additions
and
0 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
38 changes: 38 additions & 0 deletions
38
rest-api-spec/src/main/resources/rest-api-spec/test/index/120_field_name.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,38 @@ | ||
--- | ||
"Index documents with field name containing only dot fail with an IllegalArgumentException": | ||
- skip: | ||
version: " - 2.99.99" | ||
reason: "introduced in 3.0.0" | ||
|
||
- do: | ||
indices.create: | ||
index: test_1 | ||
|
||
- do: | ||
catch: /field name cannot contain only dot/ | ||
index: | ||
index: test_1 | ||
id: 1 | ||
body: { | ||
.: bar | ||
} | ||
|
||
- do: | ||
catch: /field name cannot contain only dot/ | ||
index: | ||
index: test_1 | ||
id: 1 | ||
body: { | ||
..: bar | ||
} | ||
|
||
- do: | ||
catch: /field name cannot contain only dot/ | ||
index: | ||
index: test_1 | ||
id: 1 | ||
body: { | ||
foo: { | ||
.: bar | ||
} | ||
} |
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