Interface ShardResultTransformer<T,​R>

  • All Known Implementing Classes:
    SearchGroupsResultTransformer, TopGroupsResultTransformer

    public interface ShardResultTransformer<T,​R>
    A ShardResultTransformer is responsible for transforming a grouped shard result into group related structures (such as TopGroups and SearchGroup) and visa versa.
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Method Detail

      • transform

        NamedList transform​(T data)
                     throws IOException
        Transforms data to a NamedList structure for serialization purposes.
        data - The data to be transformed
        NamedList structure
        IOException - If I/O related errors occur during transforming
      • transformToNative

        R transformToNative​(NamedList<NamedList> shardResponse,
                            String shard)
        Transforms the specified shard response into native structures.
        shardResponse - The shard response containing data in a NamedList structure
        groupSort - The group sort
        withinGroupSort - The sort inside a group
        shard - The shard address where the response originated from
        native structure of the data