[TEST] stabilize SimpleSearchIT.testQueryNumericFieldWithRegex
Provide mappings explicitly instead of relying on dynamic mapping, also add missing ensureGreen. Closes #15105
This commit is contained in:
parent
059a675aa5
commit
d17d629422
|
@ -333,8 +333,8 @@ public class SimpleSearchIT extends ESIntegTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testQueryNumericFieldWithRegex() throws Exception {
|
public void testQueryNumericFieldWithRegex() throws Exception {
|
||||||
createIndex("idx");
|
assertAcked(prepareCreate("idx").addMapping("type", "num", "type=integer"));
|
||||||
indexRandom(true, client().prepareIndex("idx", "type").setSource("num", 34));
|
ensureGreen("idx");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
client().prepareSearch("idx").setQuery(QueryBuilders.regexpQuery("num", "34")).get();
|
client().prepareSearch("idx").setQuery(QueryBuilders.regexpQuery("num", "34")).get();
|
||||||
|
|
Loading…
Reference in New Issue