Fix compilation issues after merge with master

This commit is contained in:
Christoph Büscher 2017-05-18 17:52:58 +02:00
parent cd0941810f
commit 10d308578e
1 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.index.Index;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchShardTarget;
import org.elasticsearch.test.ESTestCase;
@ -62,7 +62,7 @@ public class DiscountedCumulativeGainTests extends ESTestCase {
rated.add(new RatedDocument("index", "type", Integer.toString(i), relevanceRatings[i]));
hits[i] = new SearchHit(i, Integer.toString(i), new Text("type"),
Collections.emptyMap());
hits[i].shard(new SearchShardTarget("testnode", new ShardId("index", "uuid", 0)));
hits[i].shard(new SearchShardTarget("testnode", new Index("index", "uuid"), 0));
}
DiscountedCumulativeGain dcg = new DiscountedCumulativeGain();
assertEquals(13.84826362927298, dcg.evaluate("id", hits, rated).getQualityLevel(), 0.00001);
@ -114,7 +114,7 @@ public class DiscountedCumulativeGainTests extends ESTestCase {
}
hits[i] = new SearchHit(i, Integer.toString(i), new Text("type"),
Collections.emptyMap());
hits[i].shard(new SearchShardTarget("testnode", new ShardId("index", "uuid", 0)));
hits[i].shard(new SearchShardTarget("testnode", new Index("index", "uuid"), 0));
}
DiscountedCumulativeGain dcg = new DiscountedCumulativeGain();
EvalQueryQuality result = dcg.evaluate("id", hits, rated);
@ -171,7 +171,7 @@ public class DiscountedCumulativeGainTests extends ESTestCase {
for (int i = 0; i < 4; i++) {
hits[i] = new SearchHit(i, Integer.toString(i), new Text("type"),
Collections.emptyMap());
hits[i].shard(new SearchShardTarget("testnode", new ShardId("index", "uuid", 0)));
hits[i].shard(new SearchShardTarget("testnode", new Index("index", "uuid"), 0));
}
DiscountedCumulativeGain dcg = new DiscountedCumulativeGain();
EvalQueryQuality result = dcg.evaluate("id", hits, ratedDocs);