public interface ShardResultTransformer<T,R>
ShardResultTransformer
is responsible for transforming a grouped shard result into group related
structures (such as TopGroups
and SearchGroup
)
and visa versa.Modifier and Type | Method and Description |
---|---|
NamedList |
transform(T data)
Transforms data to a
NamedList structure for serialization purposes. |
R |
transformToNative(NamedList<NamedList> shardResponse,
Sort groupSort,
Sort sortWithinGroup,
String shard)
Transforms the specified shard response into native structures.
|
NamedList transform(T data) throws IOException
NamedList
structure for serialization purposes.data
- The data to be transformedNamedList
structureIOException
- If I/O related errors occur during transformingR transformToNative(NamedList<NamedList> shardResponse, Sort groupSort, Sort sortWithinGroup, String shard)
shardResponse
- The shard response containing data in a NamedList
structuregroupSort
- The group sortsortWithinGroup
- The sort inside a groupshard
- The shard address where the response originated fromCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.