test fix
This commit is contained in:
parent
facd18086c
commit
9f57dc1de3
|
@ -1990,7 +1990,7 @@ public class SimpleChildQuerySearchTests extends ElasticsearchIntegrationTest {
|
||||||
client().prepareIndex("test", "child", "c3").setParent("p2").setSource("c_field", "red").execute().actionGet();
|
client().prepareIndex("test", "child", "c3").setParent("p2").setSource("c_field", "red").execute().actionGet();
|
||||||
client().admin().indices().prepareRefresh("test").execute().actionGet();
|
client().admin().indices().prepareRefresh("test").execute().actionGet();
|
||||||
|
|
||||||
String scoreMode = ScoreType.values()[randomInt(ScoreType.values().length) - 1].name().toLowerCase(Locale.ROOT);
|
String scoreMode = ScoreType.values()[getRandom().nextInt(ScoreType.values().length)].name().toLowerCase(Locale.ROOT);
|
||||||
SearchResponse searchResponse = client().prepareSearch("test")
|
SearchResponse searchResponse = client().prepareSearch("test")
|
||||||
.setQuery(filteredQuery(QueryBuilders.hasChildQuery("child", termQuery("c_field", "blue")).scoreType(scoreMode), notFilter(termFilter("p_field", "3"))))
|
.setQuery(filteredQuery(QueryBuilders.hasChildQuery("child", termQuery("c_field", "blue")).scoreType(scoreMode), notFilter(termFilter("p_field", "3"))))
|
||||||
.execute().actionGet();
|
.execute().actionGet();
|
||||||
|
|
Loading…
Reference in New Issue