public class CreateQueryIndexOptions extends CommonOptions<CreateQueryIndexOptions>
Modifier and Type | Class and Description |
---|---|
class |
CreateQueryIndexOptions.Built |
CommonOptions.BuiltCommonOptions
Modifier and Type | Method and Description |
---|---|
CreateQueryIndexOptions.Built |
build() |
CreateQueryIndexOptions |
collectionName(String collectionName)
Deprecated.
`collection.queryIndexes()` should now be used for collection-related query index operations.
|
static CreateQueryIndexOptions |
createQueryIndexOptions()
Creates a new instance with default values.
|
CreateQueryIndexOptions |
deferred(boolean deferred)
If set to true will defer building of this index (false by default).
|
CreateQueryIndexOptions |
ignoreIfExists(boolean ignoreIfExists)
Set to true if no exception should be thrown if the index already exists (false by default).
|
CreateQueryIndexOptions |
numReplicas(int numReplicas)
Configures the number of index replicas.
|
CreateQueryIndexOptions |
scopeName(String scopeName)
Deprecated.
`collection.queryIndexes()` should now be used for collection-related query index operations.
|
CreateQueryIndexOptions |
with(String optionName,
Object optionValue)
Allows passing in custom options into the N1QL WITH clause for index creation.
|
clientContext, parentSpan, retryStrategy, self, timeout
public static CreateQueryIndexOptions createQueryIndexOptions()
public CreateQueryIndexOptions ignoreIfExists(boolean ignoreIfExists)
ignoreIfExists
- true if no exception should be thrown if the index already exists.public CreateQueryIndexOptions numReplicas(int numReplicas)
numReplicas
- the number of replicas used for this index.public CreateQueryIndexOptions deferred(boolean deferred)
If you are creating multiple indexes on the same bucket, you may see improved performance by creating
them in deferred mode and then building them all at once. Please use
QueryIndexManager.buildDeferredIndexes(String)
afterwards to build the deferred indexes.
deferred
- if building this index should be deferred.public CreateQueryIndexOptions with(String optionName, Object optionValue)
This method should only be used if no other option is available - use with caution!
optionName
- the name of the WITH option.optionValue
- the value of the WITH option.@Deprecated public CreateQueryIndexOptions scopeName(String scopeName)
Please note that if the scope name is set, the collectionName(String)
(String)} must also be set.
scopeName
- the name of the scope.@Deprecated public CreateQueryIndexOptions collectionName(String collectionName)
Please note that if the collection name is set, the scopeName(String)
must also be set.
collectionName
- the name of the collection.@Stability.Internal public CreateQueryIndexOptions.Built build()
Copyright © 2024 Couchbase, Inc.. All rights reserved.