public static final class CreateIndexParam.Builder
extends java.lang.Object
CreateIndexParam class.| Modifier and Type | Method and Description |
|---|---|
CreateIndexParam |
build()
Verifies parameters and creates a new
CreateIndexParam instance. |
CreateIndexParam.Builder |
withCollectionName(@NonNull java.lang.String collectionName)
Set the collection name.
|
CreateIndexParam.Builder |
withExtraParam(@NonNull java.lang.String extraParam)
Sets the specific index parameters according to index type.
|
CreateIndexParam.Builder |
withFieldName(@NonNull java.lang.String fieldName)
Sets the target field name.
|
CreateIndexParam.Builder |
withIndexName(@NonNull java.lang.String indexName)
The name of index which will be created.
|
CreateIndexParam.Builder |
withIndexType(@NonNull IndexType indexType)
Sets the index type.
|
CreateIndexParam.Builder |
withMetricType(@NonNull MetricType metricType)
Sets the metric type.
|
CreateIndexParam.Builder |
withSyncMode(@NonNull java.lang.Boolean syncMode)
Enables to sync mode.
|
CreateIndexParam.Builder |
withSyncWaitingInterval(@NonNull java.lang.Long milliseconds)
Sets the waiting interval in sync mode.
|
CreateIndexParam.Builder |
withSyncWaitingTimeout(@NonNull java.lang.Long seconds)
Sets the timeout value for sync mode.
|
public CreateIndexParam.Builder withCollectionName(@NonNull @NonNull java.lang.String collectionName)
collectionName - collection nameBuilderpublic CreateIndexParam.Builder withFieldName(@NonNull @NonNull java.lang.String fieldName)
fieldName - field nameBuilderpublic CreateIndexParam.Builder withIndexType(@NonNull @NonNull IndexType indexType)
indexType - index typeBuilderpublic CreateIndexParam.Builder withIndexName(@NonNull @NonNull java.lang.String indexName)
indexName - index nameBuilderpublic CreateIndexParam.Builder withMetricType(@NonNull @NonNull MetricType metricType)
metricType - metric typeBuilderpublic CreateIndexParam.Builder withExtraParam(@NonNull @NonNull java.lang.String extraParam)
extraParam - extra parameters in .json formatBuilderpublic CreateIndexParam.Builder withSyncMode(@NonNull @NonNull java.lang.Boolean syncMode)
syncMode - Boolean.TRUE is sync mode, Boolean.FALSE is notBuilderpublic CreateIndexParam.Builder withSyncWaitingInterval(@NonNull @NonNull java.lang.Long milliseconds)
milliseconds - intervalBuilderConstantpublic CreateIndexParam.Builder withSyncWaitingTimeout(@NonNull @NonNull java.lang.Long seconds)
seconds - time out value for sync modeBuilderConstantpublic CreateIndexParam build() throws ParamException
CreateIndexParam instance.CreateIndexParamParamException