Interface ShardSearchRequest

  • All Known Implementing Classes:
    ShardSearchLocalRequest, ShardSearchTransportRequest

    public interface ShardSearchRequest
    Shard level request that represents a search. It provides all the methods that the SearchContext needs. Provides a cache key based on its content that can be used to cache shard level response.
    • Method Detail

      • types

        java.lang.String[] types()
      • setAliasFilter

        void setAliasFilter​(AliasFilter filter)
      • numberOfShards

        int numberOfShards()
      • indexBoost

        float indexBoost()
      • nowInMillis

        long nowInMillis()
      • requestCache

        java.lang.Boolean requestCache()
      • requestCache

        void requestCache​(java.lang.Boolean requestCache)
      • allowPartialSearchResults

        java.lang.Boolean allowPartialSearchResults()
      • indexRoutings

        java.lang.String[] indexRoutings()
        Returns the routing values resolved by the coordinating node for the index pointed by shardId().
      • setProfile

        void setProfile​(boolean profile)
        Sets if this shard search needs to be profiled or not
        Parameters:
        profile - True if the shard should be profiled
      • isProfile

        boolean isProfile()
        Returns true if this shard search is being profiled or not
      • cacheKey

        BytesReference cacheKey()
                         throws java.io.IOException
        Returns the cache key for this shard search request, based on its content
        Throws:
        java.io.IOException
      • parseAliasFilter

        static QueryBuilder parseAliasFilter​(CheckedFunction<byte[],​QueryBuilder,​java.io.IOException> filterParser,
                                             IndexMetaData metaData,
                                             java.lang.String... aliasNames)
        Returns the filter associated with listed filtering aliases.

        The list of filtering aliases should be obtained by calling MetaData.filteringAliases. Returns null if no filtering is required.

      • getClusterAlias

        @Nullable
        java.lang.String getClusterAlias()
        Returns the cluster alias in case the request is part of a cross-cluster search request, null otherwise.