use of com.yahoo.vdslib.SearchResult in project vespa by vespa-engine.
the class VdsVisitorTestCase method createSR.
private SearchResult createSR(String docId, double rank) {
BufferSerializer serializer = new BufferSerializer();
// total hits
serializer.putInt(null, 2);
// hit count
serializer.putInt(null, 1);
serializer.put(null, docId);
serializer.putDouble(null, rank);
// sort blob count
serializer.putInt(null, 0);
// aggregator count
serializer.putInt(null, 0);
// grouping count
serializer.putInt(null, 0);
serializer.getBuf().flip();
return new SearchResult(serializer);
}
Aggregations