[TEST] Opt out of dummy documents where scores are relevant.

This commit is contained in:
Simon Willnauer 2014-05-20 10:20:11 +02:00
parent ac28557228
commit 223550bf3c
3 changed files with 4 additions and 4 deletions

View File

@ -400,7 +400,8 @@ public class MoreLikeThisActionTests extends ElasticsearchIntegrationTest {
for (int i = 0; i < texts.length; i++) { for (int i = 0; i < texts.length; i++) {
builders.add(client().prepareIndex("test", "type1").setSource("text", texts[i]).setId(String.valueOf(i))); builders.add(client().prepareIndex("test", "type1").setSource("text", texts[i]).setId(String.valueOf(i)));
} }
indexRandom(true, builders); indexRandom(true, false, builders);
int iters = between(10, 20); int iters = between(10, 20);
for (int j = 0; j < iters; j++) { for (int j = 0; j < iters; j++) {
logger.info("Running MoreLikeThis DSL with IDs"); logger.info("Running MoreLikeThis DSL with IDs");

View File

@ -252,8 +252,7 @@ public class DecayFunctionScoreTests extends ElasticsearchIntegrationTest {
.setSource( .setSource(
jsonBuilder().startObject().field("test", "value value").startObject("loc").field("lat", 11).field("lon", 20) jsonBuilder().startObject().field("test", "value value").startObject("loc").field("lat", 11).field("lon", 20)
.endObject().endObject())); .endObject().endObject()));
indexRandom(false, indexBuilders); // force no dummy docs indexRandom(true, false, indexBuilders); // force no dummy docs
refresh();
// Test Gauss // Test Gauss
List<Float> lonlat = new ArrayList<>(); List<Float> lonlat = new ArrayList<>();

View File

@ -118,7 +118,7 @@ public class MultiMatchQueryTests extends ElasticsearchIntegrationTest {
"category", randomBoolean() ? "marvel hero" : "bogus", "category", randomBoolean() ? "marvel hero" : "bogus",
"skill", between(1, 3))); "skill", between(1, 3)));
} }
indexRandom(true, builders); indexRandom(true, false, builders);
} }
private XContentBuilder createMapping() throws IOException { private XContentBuilder createMapping() throws IOException {