Fix compilation issues after merge with master
This commit is contained in:
parent
cd0941810f
commit
10d308578e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue