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 NamedListserializeTopDocs(QueryCommandResult result)protected NamedListserializeTopGroups(org.apache.lucene.search.grouping.TopGroups<org.apache.lucene.util.BytesRef> data, SchemaField groupField)NamedListtransform(List<Command> data)Transforms data to aNamedListstructure 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:ShardResultTransformerTransforms data to aNamedListstructure for serialization purposes.- Specified by:
transformin interfaceShardResultTransformer<List<Command>,Map<String,?>>- Parameters:
data- The data to be transformed- Returns:
NamedListstructure- 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:ShardResultTransformerTransforms the specified shard response into native structures.- Specified by:
transformToNativein interfaceShardResultTransformer<List<Command>,Map<String,?>>- Parameters:
shardResponse- The shard response containing data in aNamedListstructuregroupSort- 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
-
-