Class CreatePrimaryQueryIndexOptions
- java.lang.Object
-
- com.couchbase.client.java.CommonOptions<CreatePrimaryQueryIndexOptions>
-
- com.couchbase.client.java.manager.query.CreatePrimaryQueryIndexOptions
-
public class CreatePrimaryQueryIndexOptions extends CommonOptions<CreatePrimaryQueryIndexOptions>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCreatePrimaryQueryIndexOptions.Built-
Nested classes/interfaces inherited from class com.couchbase.client.java.CommonOptions
CommonOptions.BuiltCommonOptions
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CreatePrimaryQueryIndexOptions.Builtbuild()static CreatePrimaryQueryIndexOptionscreatePrimaryQueryIndexOptions()CreatePrimaryQueryIndexOptionsdeferred(boolean deferred)Set totrueto defer building of the index untilQueryIndexManager.buildDeferredIndexes(java.lang.String)is called.CreatePrimaryQueryIndexOptionsignoreIfExists(boolean ignore)If a primary index already exists, an exception will be thrown unless this is set to true.CreatePrimaryQueryIndexOptionsindexName(String indexName)Specifies the name of the primary index to create.CreatePrimaryQueryIndexOptionsnumReplicas(int numReplicas)Specifies the number of replicas of the index to create.CreatePrimaryQueryIndexOptionswith(String optionName, Object optionValue)Escape hatch for specifying extra options in theWITHclause.-
Methods inherited from class com.couchbase.client.java.CommonOptions
clientContext, parentSpan, retryStrategy, self, timeout
-
-
-
-
Method Detail
-
createPrimaryQueryIndexOptions
public static CreatePrimaryQueryIndexOptions createPrimaryQueryIndexOptions()
-
indexName
public CreatePrimaryQueryIndexOptions indexName(String indexName)
Specifies the name of the primary index to create. If not set, the server assigns a default name of"#primary".
-
ignoreIfExists
public CreatePrimaryQueryIndexOptions ignoreIfExists(boolean ignore)
If a primary index already exists, an exception will be thrown unless this is set to true.
-
numReplicas
public CreatePrimaryQueryIndexOptions numReplicas(int numReplicas)
Specifies the number of replicas of the index to create.
-
deferred
public CreatePrimaryQueryIndexOptions deferred(boolean deferred)
Set totrueto defer building of the index untilQueryIndexManager.buildDeferredIndexes(java.lang.String)is called.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.
-
with
public CreatePrimaryQueryIndexOptions with(String optionName, Object optionValue)
Escape hatch for specifying extra options in theWITHclause. Intended for options that are supported by Couchbase Server but not by this version of the SDK.
-
build
@Internal public CreatePrimaryQueryIndexOptions.Built build()
-
-