Class GetIndexesRequest.Builder (2.0.0)

public static final class GetIndexesRequest.Builder

The builder of GetIndexesRequests.

Inheritance

java.lang.Object > GetIndexesRequest.Builder

Methods

build()

public GetIndexesRequest build()
Returns
TypeDescription
GetIndexesRequest

builds and returns a brand new instance of a GetIndexesRequest using values set on this builder

setAllNamespaces(boolean allNamespaces)

public GetIndexesRequest.Builder setAllNamespaces(boolean allNamespaces)

Sets whether or not to fetch indexes from all namespaces.

Parameter
NameDescription
allNamespacesboolean

whether or not to fetch indexes from all namespaces

Returns
TypeDescription
GetIndexesRequest.Builder

this builder

setIncludeStartIndex(boolean includeStartIndex)

public GetIndexesRequest.Builder setIncludeStartIndex(boolean includeStartIndex)

Sets whether or not to include the index whose name is specified via the #setStartIndexName(String) method.

Parameter
NameDescription
includeStartIndexboolean

whether or not to return the start index

Returns
TypeDescription
GetIndexesRequest.Builder

this builder

setIndexNamePrefix(String indexNamePrefix)

public GetIndexesRequest.Builder setIndexNamePrefix(String indexNamePrefix)

Sets the prefix to be matched against the names of returned indexes. If the prefix is set to, say "a", only indexes with names starting with 'a' will be returned.

Parameter
NameDescription
indexNamePrefixString

the prefix used to select returned indexes

Returns
TypeDescription
GetIndexesRequest.Builder

this builder

setLimit(Integer limit)

public GetIndexesRequest.Builder setLimit(Integer limit)

Sets the maximum number of indexes to return.

Parameter
NameDescription
limitInteger

the number of indexes to return

Returns
TypeDescription
GetIndexesRequest.Builder

this builder

setNamespace(String namespace)

public GetIndexesRequest.Builder setNamespace(String namespace)

Sets the namespace to use for this request. Only indexes defined within this namespace will be fetched.

Parameter
NameDescription
namespaceString

The namespace for this request.

Returns
TypeDescription
GetIndexesRequest.Builder

this builder

setOffset(Integer offset)

public GetIndexesRequest.Builder setOffset(Integer offset)

Sets the offset of the first index to return. This method comes with a performance penalty and if you just want to page through all indexes you should consider #setStartIndexName(String) method.

Parameter
NameDescription
offsetInteger

the offset of the first returned index

Returns
TypeDescription
GetIndexesRequest.Builder

this builder

setSchemaFetched(boolean schemaFetched)

public GetIndexesRequest.Builder setSchemaFetched(boolean schemaFetched)

Sets whether or not the schema is returned with indexes. An index schema is a map from field names to field types.

Parameter
NameDescription
schemaFetchedboolean

whether or not schemas are present in returned indexes

Returns
TypeDescription
GetIndexesRequest.Builder

this builder

setStartIndexName(String startIndexName)

public GetIndexesRequest.Builder setStartIndexName(String startIndexName)

Sets the name of the first index to return. You may exclude this index by using the #setIncludeStartIndex(boolean) method.

Parameter
NameDescription
startIndexNameString

the name of the first index to be returned

Returns
TypeDescription
GetIndexesRequest.Builder

this builder