Class ShardSearchRequest

    • Constructor Detail

      • ShardSearchRequest

        public ShardSearchRequest​(OriginalIndices originalIndices,
                                  SearchRequest searchRequest,
                                  ShardId shardId,
                                  int numberOfShards,
                                  AliasFilter aliasFilter,
                                  float indexBoost,
                                  long nowInMillis,
                                  @Nullable
                                  java.lang.String clusterAlias,
                                  java.lang.String[] indexRoutings)
      • ShardSearchRequest

        public ShardSearchRequest​(ShardId shardId,
                                  java.lang.String[] types,
                                  long nowInMillis,
                                  AliasFilter aliasFilter)
      • ShardSearchRequest

        public ShardSearchRequest​(StreamInput in)
                           throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • innerWriteTo

        protected final void innerWriteTo​(StreamOutput out,
                                          boolean asKey)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • indices

        public java.lang.String[] indices()
        Description copied from interface: IndicesRequest
        Returns the array of indices that the action relates to
        Specified by:
        indices in interface IndicesRequest
      • indicesOptions

        public IndicesOptions indicesOptions()
        Description copied from interface: IndicesRequest
        Returns the indices options used to resolve indices. They tell for instance whether a single index is accepted, whether an empty array will be converted to _all, and how wildcards will be expanded if needed.
        Specified by:
        indicesOptions in interface IndicesRequest
      • shardId

        public ShardId shardId()
      • types

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

        public void setAliasFilter​(AliasFilter aliasFilter)
      • numberOfShards

        public int numberOfShards()
      • indexBoost

        public float indexBoost()
      • nowInMillis

        public long nowInMillis()
      • requestCache

        public java.lang.Boolean requestCache()
      • allowPartialSearchResults

        public boolean allowPartialSearchResults()
      • scroll

        public Scroll scroll()
      • indexRoutings

        public java.lang.String[] indexRoutings()
      • preference

        public java.lang.String preference()
      • cacheKey

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

        public java.lang.String getClusterAlias()
      • createTask

        public Task createTask​(long id,
                               java.lang.String type,
                               java.lang.String action,
                               TaskId parentTaskId,
                               java.util.Map<java.lang.String,​java.lang.String> headers)
        Description copied from interface: TaskAwareRequest
        Returns the task object that should be used to keep track of the processing of the request.
        Specified by:
        createTask in interface TaskAwareRequest
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: TaskAwareRequest
        Returns optional description of the request to be displayed by the task manager
        Specified by:
        getDescription in interface TaskAwareRequest
      • parseAliasFilter

        public 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.