org.apache.solr.search.grouping.distributed.shardresultserializer
Class SearchGroupsResultTransformer
java.lang.Object
org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer
- All Implemented Interfaces:
- ShardResultTransformer<List<Command>,Map<String,Collection<org.apache.lucene.search.grouping.SearchGroup<String>>>>
public class SearchGroupsResultTransformer
- extends Object
- implements ShardResultTransformer<List<Command>,Map<String,Collection<org.apache.lucene.search.grouping.SearchGroup<String>>>>
Implementation for transforming SearchGroup into a NamedList structure and visa versa.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SearchGroupsResultTransformer
public SearchGroupsResultTransformer(SolrIndexSearcher searcher)
transform
public NamedList transform(List<Command> data)
throws IOException
- Transforms data to a
NamedList structure for serialization purposes.
- Specified by:
transform in interface ShardResultTransformer<List<Command>,Map<String,Collection<org.apache.lucene.search.grouping.SearchGroup<String>>>>
- Parameters:
data - The data to be transformed
- Returns:
NamedList structure
- Throws:
IOException - If I/O related errors occur during transforming
transformToNative
public Map<String,Collection<org.apache.lucene.search.grouping.SearchGroup<String>>> transformToNative(NamedList<NamedList> shardResponse,
org.apache.lucene.search.Sort groupSort,
org.apache.lucene.search.Sort sortWithinGroup,
String shard)
throws IOException
- Transforms the specified shard response into native structures.
- Specified by:
transformToNative in interface ShardResultTransformer<List<Command>,Map<String,Collection<org.apache.lucene.search.grouping.SearchGroup<String>>>>
- Parameters:
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 from
- Returns:
- native structure of the data
- Throws:
IOException - If I/O related errors occur during transforming
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.