Class TopGroupsResultTransformer
- java.lang.Object
-
- org.apache.solr.search.grouping.distributed.shardresultserializer.TopGroupsResultTransformer
-
-
Constructor Summary
Constructors Constructor Description TopGroupsResultTransformer(ResponseBuilder rb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected NamedList
serializeTopDocs(QueryCommandResult result)
protected NamedList
serializeTopGroups(org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef> data, SchemaField groupField)
NamedList
transform(List<Command> data)
Transforms data to aNamedList
structure for serialization purposes.Map<String,?>
transformToNative(NamedList<NamedList> shardResponse, org.apache.lucene.search.Sort groupSort, org.apache.lucene.search.Sort withinGroupSort, String shard)
Transforms the specified shard response into native structures.protected org.apache.lucene.search.ScoreDoc[]
transformToNativeShardDoc(List<NamedList<Object>> documents, org.apache.lucene.search.Sort groupSort, String shard, IndexSchema schema)
-
-
-
Constructor Detail
-
TopGroupsResultTransformer
public TopGroupsResultTransformer(ResponseBuilder rb)
-
-
Method Detail
-
transform
public NamedList transform(List<Command> data) throws IOException
Description copied from interface:ShardResultTransformer
Transforms data to aNamedList
structure for serialization purposes.- Specified by:
transform
in interfaceShardResultTransformer<List<Command>,Map<String,?>>
- Parameters:
data
- The data to be transformed- Returns:
NamedList
structure- Throws:
IOException
- If I/O related errors occur during transforming
-
transformToNative
public Map<String,?> transformToNative(NamedList<NamedList> shardResponse, org.apache.lucene.search.Sort groupSort, org.apache.lucene.search.Sort withinGroupSort, String shard)
Description copied from interface:ShardResultTransformer
Transforms the specified shard response into native structures.- Specified by:
transformToNative
in interfaceShardResultTransformer<List<Command>,Map<String,?>>
- Parameters:
shardResponse
- The shard response containing data in aNamedList
structuregroupSort
- The group sortwithinGroupSort
- The sort inside a groupshard
- The shard address where the response originated from- Returns:
- native structure of the data
-
transformToNativeShardDoc
protected org.apache.lucene.search.ScoreDoc[] transformToNativeShardDoc(List<NamedList<Object>> documents, org.apache.lucene.search.Sort groupSort, String shard, IndexSchema schema)
-
serializeTopGroups
protected NamedList serializeTopGroups(org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef> data, SchemaField groupField) throws IOException
- Throws:
IOException
-
serializeTopDocs
protected NamedList serializeTopDocs(QueryCommandResult result) throws IOException
- Throws:
IOException
-
-