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 withinGroupSort,
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 withinGroupSort, String shard)
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 fromCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.