Constructor and Description |
---|
TopGroupsResultTransformer(ResponseBuilder rb) |
Modifier and Type | Method and Description |
---|---|
protected NamedList |
serializeTopDocs(QueryCommandResult result) |
protected NamedList |
serializeTopGroups(TopGroups<BytesRef> data,
SchemaField groupField) |
NamedList |
transform(List<Command> data)
Transforms data to a
NamedList structure for serialization purposes. |
Map<String,?> |
transformToNative(NamedList<NamedList> shardResponse,
Sort groupSort,
Sort withinGroupSort,
String shard)
Transforms the specified shard response into native structures.
|
protected ScoreDoc[] |
transformToNativeShardDoc(List<NamedList<Object>> documents,
Sort groupSort,
String shard,
IndexSchema schema) |
public TopGroupsResultTransformer(ResponseBuilder rb)
public NamedList transform(List<Command> data) throws IOException
NamedList
structure for serialization purposes.transform
in interface ShardResultTransformer<List<Command>,Map<String,?>>
data
- The data to be transformedNamedList
structureIOException
- If I/O related errors occur during transformingpublic Map<String,?> transformToNative(NamedList<NamedList> shardResponse, Sort groupSort, Sort withinGroupSort, String shard)
transformToNative
in interface ShardResultTransformer<List<Command>,Map<String,?>>
shardResponse
- The shard response containing data in a NamedList
structuregroupSort
- The group sortwithinGroupSort
- The sort inside a groupshard
- The shard address where the response originated fromprotected ScoreDoc[] transformToNativeShardDoc(List<NamedList<Object>> documents, Sort groupSort, String shard, IndexSchema schema)
protected NamedList serializeTopGroups(TopGroups<BytesRef> data, SchemaField groupField) throws IOException
IOException
protected NamedList serializeTopDocs(QueryCommandResult result) throws IOException
IOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.