Search in sources :

Example 6 with FS4Hit

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());
}
Also used : FS4Hit(com.yahoo.searchlib.aggregation.FS4Hit) FS4Hit(com.yahoo.searchlib.aggregation.FS4Hit) GroupingListHit(com.yahoo.prelude.fastsearch.GroupingListHit) FastHit(com.yahoo.prelude.fastsearch.FastHit) Hit(com.yahoo.search.result.Hit) VdsHit(com.yahoo.searchlib.aggregation.VdsHit) Query(com.yahoo.search.Query) URI(com.yahoo.net.URI) Test(org.junit.Test)

Aggregations

FS4Hit (com.yahoo.searchlib.aggregation.FS4Hit)6 FastHit (com.yahoo.prelude.fastsearch.FastHit)5 GroupingListHit (com.yahoo.prelude.fastsearch.GroupingListHit)5 Query (com.yahoo.search.Query)5 Hit (com.yahoo.search.result.Hit)5 VdsHit (com.yahoo.searchlib.aggregation.VdsHit)5 Test (org.junit.Test)5 QueryPacketData (com.yahoo.fs4.QueryPacketData)2 URI (com.yahoo.net.URI)1 Searcher (com.yahoo.search.Searcher)1