Search in sources :

Example 21 with GroupingRequest

use of com.yahoo.search.grouping.GroupingRequest in project vespa by vespa-engine.

the class VespaSerializerTestCase method newGroupingRequest.

private static void newGroupingRequest(Query query, GroupingOperation grouping, Continuation... continuations) {
    GroupingRequest request = GroupingRequest.newInstance(query);
    request.setRootOperation(grouping);
    request.continuations().addAll(Arrays.asList(continuations));
}
Also used : GroupingRequest(com.yahoo.search.grouping.GroupingRequest)

Example 22 with GroupingRequest

use of com.yahoo.search.grouping.GroupingRequest in project vespa by vespa-engine.

the class VespaSerializer method serialize.

public static String serialize(Query query) {
    StringBuilder out = new StringBuilder();
    serialize(query.getModel().getQueryTree().getRoot(), out);
    for (GroupingRequest request : GroupingRequest.getRequests(query)) {
        out.append(" | ");
        serialize(request, out);
    }
    return out.toString();
}
Also used : GroupingRequest(com.yahoo.search.grouping.GroupingRequest)

Aggregations

GroupingRequest (com.yahoo.search.grouping.GroupingRequest)22 Query (com.yahoo.search.Query)18 Test (org.junit.Test)17 Grouping (com.yahoo.searchlib.aggregation.Grouping)12 Execution (com.yahoo.search.searchchain.Execution)10 GroupingListHit (com.yahoo.prelude.fastsearch.GroupingListHit)9 Group (com.yahoo.search.grouping.result.Group)9 StringResultNode (com.yahoo.searchlib.expression.StringResultNode)9 HitsAggregationResult (com.yahoo.searchlib.aggregation.HitsAggregationResult)8 MaxAggregationResult (com.yahoo.searchlib.aggregation.MaxAggregationResult)8 Result (com.yahoo.search.Result)7 MinAggregationResult (com.yahoo.searchlib.aggregation.MinAggregationResult)7 CountAggregationResult (com.yahoo.searchlib.aggregation.CountAggregationResult)6 FastHit (com.yahoo.prelude.fastsearch.FastHit)4 GroupList (com.yahoo.search.grouping.result.GroupList)4 Hit (com.yahoo.search.result.Hit)4 DocumentId (com.yahoo.document.DocumentId)2 GlobalId (com.yahoo.document.GlobalId)2 MockBackend (com.yahoo.prelude.fastsearch.test.fs4mock.MockBackend)2 AllOperation (com.yahoo.search.grouping.request.AllOperation)2