Skip to content

Commit

Permalink
Create the mapping explicitly, otherwise for 0 documents indices (ela…
Browse files Browse the repository at this point in the history
…stic#118015)

the mapping will not contain the "value" field

(cherry picked from commit 774c6ea)
  • Loading branch information
astefan committed Dec 5, 2024
1 parent bd26252 commit 95283b9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void testFieldExistsFilter_KeepWildcard() throws IOException {
indexTimestampData(docsTest1, "test1", "2024-11-26", "id1");
indexTimestampData(docsTest2, "test2", "2023-11-26", "id2");

// filter includes only test1. Columns are rows of test2 are filtered out
// filter includes only test1. Columns and rows of test2 are filtered out
RestEsqlTestCase.RequestObjectBuilder builder = existsFilter("id1").query("FROM test*");
Map<String, Object> result = runEsql(builder);
assertMap(
Expand Down Expand Up @@ -253,6 +253,9 @@ protected void indexTimestampData(int docs, String indexName, String date, Strin
"@timestamp": {
"type": "date"
},
"value": {
"type": "long"
},
"%differentiator_field_name%": {
"type": "integer"
}
Expand Down

0 comments on commit 95283b9

Please sign in to comment.