Search in sources :

Example 1 with VdsHit

use of com.yahoo.searchlib.aggregation.VdsHit in project vespa by vespa-engine.

the class HitConverterTestCase method requireThatVdsHitCanBeConverted.

@Test
public void requireThatVdsHitCanBeConverted() {
    HitConverter converter = new HitConverter(new MySearcher(), new Query());
    GroupingListHit context = new GroupingListHit(null, new DocsumDefinitionSet(sixtynine()));
    VdsHit lowHit = new VdsHit("doc:scheme:", new byte[] { 0x55, 0x55, 0x55, 0x55 }, 1);
    lowHit.setContext(context);
    Hit hit = converter.toSearchHit("69", lowHit);
    assertNotNull(hit);
    assertTrue(hit instanceof FastHit);
    assertEquals(new Relevance(1), hit.getRelevance());
    assertTrue(hit.isFilled("69"));
}
Also used : Relevance(com.yahoo.search.result.Relevance) 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) FastHit(com.yahoo.prelude.fastsearch.FastHit) Query(com.yahoo.search.Query) DocsumDefinitionSet(com.yahoo.prelude.fastsearch.DocsumDefinitionSet) VdsHit(com.yahoo.searchlib.aggregation.VdsHit) GroupingListHit(com.yahoo.prelude.fastsearch.GroupingListHit) Test(org.junit.Test)

Aggregations

DocsumDefinitionSet (com.yahoo.prelude.fastsearch.DocsumDefinitionSet)1 FastHit (com.yahoo.prelude.fastsearch.FastHit)1 GroupingListHit (com.yahoo.prelude.fastsearch.GroupingListHit)1 Query (com.yahoo.search.Query)1 Hit (com.yahoo.search.result.Hit)1 Relevance (com.yahoo.search.result.Relevance)1 FS4Hit (com.yahoo.searchlib.aggregation.FS4Hit)1 VdsHit (com.yahoo.searchlib.aggregation.VdsHit)1 Test (org.junit.Test)1