Class SearchGroupsResultTransformer
- java.lang.Object
-
- org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer
-
- All Implemented Interfaces:
ShardResultTransformer<List<Command<?>>,Map<String,SearchGroupsFieldCommandResult>>
public class SearchGroupsResultTransformer extends Object implements ShardResultTransformer<List<Command<?>>,Map<String,SearchGroupsFieldCommandResult>>
Implementation for transformingSearchGroupinto aNamedListstructure and visa versa.
-
-
Constructor Summary
Constructors Constructor Description SearchGroupsResultTransformer(SolrIndexSearcher searcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.solr.common.util.NamedList<org.apache.solr.common.util.NamedList<Object>>transform(List<Command<?>> data)Transforms data to aNamedListstructure for serialization purposes.Map<String,SearchGroupsFieldCommandResult>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.
-
-
-
Constructor Detail
-
SearchGroupsResultTransformer
public SearchGroupsResultTransformer(SolrIndexSearcher searcher)
-
-
Method Detail
-
transform
public org.apache.solr.common.util.NamedList<org.apache.solr.common.util.NamedList<Object>> 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,SearchGroupsFieldCommandResult>>- Parameters:
data- The data to be transformed- Returns:
NamedListstructure- Throws:
IOException- If I/O related errors occur during transforming
-
transformToNative
public Map<String,SearchGroupsFieldCommandResult> 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)
Description copied from interface:ShardResultTransformerTransforms the specified shard response into native structures.- Specified by:
transformToNativein interfaceShardResultTransformer<List<Command<?>>,Map<String,SearchGroupsFieldCommandResult>>- 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
-
-