Interface ShardResultTransformer<T,R>
-
- All Known Implementing Classes:
SearchGroupsResultTransformer
,TopGroupsResultTransformer
public interface ShardResultTransformer<T,R>
AShardResultTransformer
is responsible for transforming a grouped shard result into group related structures (such asTopGroups
andSearchGroup
) and visa versa.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.solr.common.util.NamedList<org.apache.solr.common.util.NamedList<Object>>
transform(T data)
Transforms data to aNamedList
structure for serialization purposes.R
transformToNative(org.apache.solr.common.util.NamedList<org.apache.solr.common.util.NamedList<?>> shardResponse, org.apache.lucene.search.Sort groupSort, org.apache.lucene.search.Sort withinGroupSort, String shard)
Transforms the specified shard response into native structures.
-
-
-
Method Detail
-
transform
org.apache.solr.common.util.NamedList<org.apache.solr.common.util.NamedList<Object>> transform(T data) throws IOException
Transforms data to aNamedList
structure for serialization purposes.- Parameters:
data
- The data to be transformed- Returns:
NamedList
structure- Throws:
IOException
- If I/O related errors occur during transforming
-
transformToNative
R transformToNative(org.apache.solr.common.util.NamedList<org.apache.solr.common.util.NamedList<?>> shardResponse, org.apache.lucene.search.Sort groupSort, org.apache.lucene.search.Sort withinGroupSort, String shard)
Transforms the specified shard response into native structures.- 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
-
-