Search in sources :

Example 21 with BufferSerializer

use of com.yahoo.vespa.objects.BufferSerializer in project vespa by vespa-engine.

the class VdsVisitorTestCase method createDS.

private DocumentSummary createDS(String docId) {
    BufferSerializer serializer = new BufferSerializer();
    // old seq id
    serializer.putInt(null, 0);
    // summary count
    serializer.putInt(null, 1);
    serializer.put(null, docId);
    // summary size
    serializer.putInt(null, 1);
    // summary buffer
    serializer.putInt(null, 0);
    serializer.getBuf().flip();
    return new DocumentSummary(serializer);
}
Also used : BufferSerializer(com.yahoo.vespa.objects.BufferSerializer) DocumentSummary(com.yahoo.vdslib.DocumentSummary)

Aggregations

BufferSerializer (com.yahoo.vespa.objects.BufferSerializer)21 GrowableByteBuffer (com.yahoo.io.GrowableByteBuffer)9 Test (org.junit.Test)7 Grouping (com.yahoo.searchlib.aggregation.Grouping)4 Identifiable (com.yahoo.vespa.objects.Identifiable)2 IOException (java.io.IOException)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 AbstractTypesTest (com.yahoo.document.annotation.AbstractTypesTest)1 Raw (com.yahoo.document.datatypes.Raw)1 LoadType (com.yahoo.documentapi.messagebus.loadtypes.LoadType)1 Coverage (com.yahoo.search.result.Coverage)1 Utf8Array (com.yahoo.text.Utf8Array)1 Utf8String (com.yahoo.text.Utf8String)1 DocumentSummary (com.yahoo.vdslib.DocumentSummary)1 SearchResult (com.yahoo.vdslib.SearchResult)1 FileOutputStream (java.io.FileOutputStream)1 ByteBuffer (java.nio.ByteBuffer)1 ArrayList (java.util.ArrayList)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1