SearchGroupsResultTransformer (Solr 3.6.2 API)
Keywords: org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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,Pair<Integer,Collection<SearchGroup<String>>>>>

    public class SearchGroupsResultTransformer

extends Object
implements ShardResultTransformer<List<Command>,Map<String,Pair<Integer,Collection<SearchGroup<String>>>>>

Implementation for transforming `SearchGroup` into a `NamedList` structure and visa versa.

Constructor Summary
`SearchGroupsResultTransformer(SolrIndexSearcher searcher)`

Method Summary
`NamedList` | `transform(List<Command> data)` Transforms data to a `NamedList` structure for serialization purposes.
`Map<String,Pair<Integer,Collection<SearchGroup<String>>>>` | `transformToNative(NamedList<NamedList> shardResponse, Sort groupSort, Sort sortWithinGroup, String shard)` Transforms the specified shard response into native structures.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SearchGroupsResultTransformer

    public SearchGroupsResultTransformer(SolrIndexSearcher searcher)

Method Detail

### 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,Pair<Integer,Collection<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,Pair<Integer,Collection<SearchGroup<String>>>> transformToNative(NamedList<NamedList> shardResponse,
                                                                                       Sort groupSort,
                                                                                       Sort sortWithinGroup,
                                                                                       String shard)
                                                                                throws IOException

  Transforms the specified shard response into native structures.

  Specified by:
    `transformToNative` in interface `ShardResultTransformer<List<Command>,Map<String,Pair<Integer,Collection<SearchGroup<String>>>>>`
  Parameters:
    `shardResponse` - The shard response containing data in a `NamedList` structure
    `groupSort` - The group sort
    `sortWithinGroup` - The sort inside a group
    `shard` - The shard address where the response originated from
  Returns:
    native structure of the data
  Throws:
    `IOException` - If I/O related errors occur during transforming

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD