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 class
CreatePrimaryQueryIndexOptions.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.Built
build()
static CreatePrimaryQueryIndexOptions
createPrimaryQueryIndexOptions()
CreatePrimaryQueryIndexOptions
deferred(boolean deferred)
Set totrue
to defer building of the index untilQueryIndexManager.buildDeferredIndexes(java.lang.String)
is called.CreatePrimaryQueryIndexOptions
ignoreIfExists(boolean ignore)
If a primary index already exists, an exception will be thrown unless this is set to true.CreatePrimaryQueryIndexOptions
indexName(String indexName)
Specifies the name of the primary index to create.CreatePrimaryQueryIndexOptions
numReplicas(int numReplicas)
Specifies the number of replicas of the index to create.CreatePrimaryQueryIndexOptions
with(String optionName, Object optionValue)
Escape hatch for specifying extra options in theWITH
clause.-
Methods inherited from class com.couchbase.client.java.CommonOptions
clientContext, 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 totrue
to 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 theWITH
clause. Intended for options that are supported by Couchbase Server but not by this version of the SDK.
-
build
@Internal public CreatePrimaryQueryIndexOptions.Built build()
-
-