Class CfnIndex.PropertyMappingProperty.Builder
java.lang.Object
software.amazon.awscdk.services.opensearchserverless.CfnIndex.PropertyMappingProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnIndex.PropertyMappingProperty>
- Enclosing interface:
CfnIndex.PropertyMappingProperty
@Stability(Stable)
public static final class CfnIndex.PropertyMappingProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnIndex.PropertyMappingProperty>
A builder for
CfnIndex.PropertyMappingProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnIndex.PropertyMappingProperty.getAnalyzer()build()Builds the configured instance.compressionLevel(String compressionLevel) Sets the value ofCfnIndex.PropertyMappingProperty.getCompressionLevel()Sets the value ofCfnIndex.PropertyMappingProperty.getDimension()Sets the value ofCfnIndex.PropertyMappingProperty.getIndex()index(IResolvable index) Sets the value ofCfnIndex.PropertyMappingProperty.getIndex()method(IResolvable method) Sets the value ofCfnIndex.PropertyMappingProperty.getMethod()method(CfnIndex.MethodProperty method) Sets the value ofCfnIndex.PropertyMappingProperty.getMethod()properties(Map<String, ? extends Object> properties) Sets the value ofCfnIndex.PropertyMappingProperty.getProperties()properties(IResolvable properties) Sets the value ofCfnIndex.PropertyMappingProperty.getProperties()Sets the value ofCfnIndex.PropertyMappingProperty.getSpaceType()Sets the value ofCfnIndex.PropertyMappingProperty.getType()Sets the value ofCfnIndex.PropertyMappingProperty.getValue()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
type
Sets the value ofCfnIndex.PropertyMappingProperty.getType()- Parameters:
type- The field data type. This parameter is required. Must be a valid OpenSearch field type.- Returns:
this
-
analyzer
Sets the value ofCfnIndex.PropertyMappingProperty.getAnalyzer()- Parameters:
analyzer- The analyzer to use for this field (for text and keyword fields).- Returns:
this
-
compressionLevel
@Stability(Stable) public CfnIndex.PropertyMappingProperty.Builder compressionLevel(String compressionLevel) Sets the value ofCfnIndex.PropertyMappingProperty.getCompressionLevel()- Parameters:
compressionLevel- The compression level for knn_vector fields.- Returns:
this
-
dimension
Sets the value ofCfnIndex.PropertyMappingProperty.getDimension()- Parameters:
dimension- Dimension size for vector fields, defines the number of dimensions in the vector.- Returns:
this
-
index
Sets the value ofCfnIndex.PropertyMappingProperty.getIndex()- Parameters:
index- Whether a field should be indexed.- Returns:
this
-
index
Sets the value ofCfnIndex.PropertyMappingProperty.getIndex()- Parameters:
index- Whether a field should be indexed.- Returns:
this
-
method
Sets the value ofCfnIndex.PropertyMappingProperty.getMethod()- Parameters:
method- Configuration for k-NN search method.- Returns:
this
-
method
@Stability(Stable) public CfnIndex.PropertyMappingProperty.Builder method(CfnIndex.MethodProperty method) Sets the value ofCfnIndex.PropertyMappingProperty.getMethod()- Parameters:
method- Configuration for k-NN search method.- Returns:
this
-
properties
@Stability(Stable) public CfnIndex.PropertyMappingProperty.Builder properties(IResolvable properties) Sets the value ofCfnIndex.PropertyMappingProperty.getProperties()- Parameters:
properties- Defines the fields within the mapping, including their types and configurations.- Returns:
this
-
properties
@Stability(Stable) public CfnIndex.PropertyMappingProperty.Builder properties(Map<String, ? extends Object> properties) Sets the value ofCfnIndex.PropertyMappingProperty.getProperties()- Parameters:
properties- Defines the fields within the mapping, including their types and configurations.- Returns:
this
-
spaceType
Sets the value ofCfnIndex.PropertyMappingProperty.getSpaceType()- Parameters:
spaceType- The distance function used for k-NN search (field-level, outside Method).- Returns:
this
-
value
Sets the value ofCfnIndex.PropertyMappingProperty.getValue()- Parameters:
value- Default value for the field when not specified in a document.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnIndex.PropertyMappingProperty>- Returns:
- a new instance of
CfnIndex.PropertyMappingProperty - Throws:
NullPointerException- if any required attribute was not provided
-