This commit is contained in:
Martijn van Groningen 2013-12-05 03:17:56 +01:00
parent facd18086c
commit 9f57dc1de3
1 changed files with 1 additions and 1 deletions

View File

@ -1990,7 +1990,7 @@ public class SimpleChildQuerySearchTests extends ElasticsearchIntegrationTest {
client().prepareIndex("test", "child", "c3").setParent("p2").setSource("c_field", "red").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")
.setQuery(filteredQuery(QueryBuilders.hasChildQuery("child", termQuery("c_field", "blue")).scoreType(scoreMode), notFilter(termFilter("p_field", "3"))))
.execute().actionGet();