use of com.yahoo.searchlib.aggregation.FS4Hit in project vespa by vespa-engine.
the class HitConverterTestCase method requireThatHitsAreConverted.
@Test
public void requireThatHitsAreConverted() {
HitConverter converter = new HitConverter(new MySearcher(), new Query());
Hit hit = converter.toSearchHit("default", new FS4Hit(1, createGlobalId(2), 3).setContext(new Hit("hit:ctx")));
assertNotNull(hit);
assertEquals(new URI("index:0/1/0/" + FastHit.asHexString(createGlobalId(2))), hit.getId());
hit = converter.toSearchHit("default", new FS4Hit(4, createGlobalId(5), 6).setContext(new Hit("hit:ctx")));
assertNotNull(hit);
assertEquals(new URI("index:0/4/0/" + FastHit.asHexString(createGlobalId(5))), hit.getId());
}
Aggregations