PropertyMappingProperty Struct
Property mappings for the OpenSearch Serverless index.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_opensearchserverless as opensearchserverless } from 'aws-cdk-lib';
declare const propertyMappingProperty_: opensearchserverless.CfnIndex.PropertyMappingProperty;
const propertyMappingProperty: opensearchserverless.CfnIndex.PropertyMappingProperty = {
type: 'type',
// the properties below are optional
analyzer: 'analyzer',
compressionLevel: 'compressionLevel',
dataType: 'dataType',
dimension: 123,
index: false,
method: {
name: 'name',
// the properties below are optional
engine: 'engine',
parameters: {
efConstruction: 123,
m: 123,
},
spaceType: 'spaceType',
},
properties: {
propertiesKey: propertyMappingProperty_,
},
spaceType: 'spaceType',
value: 'value',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_opensearchserverless as opensearchserverless
# property_mapping_property_: opensearchserverless.CfnIndex.PropertyMappingProperty
property_mapping_property = opensearchserverless.CfnIndex.PropertyMappingProperty(
type="type",
# the properties below are optional
analyzer="analyzer",
compression_level="compressionLevel",
data_type="dataType",
dimension=123,
index=False,
method=opensearchserverless.CfnIndex.MethodProperty(
name="name",
# the properties below are optional
engine="engine",
parameters=opensearchserverless.CfnIndex.ParametersProperty(
ef_construction=123,
m=123
),
space_type="spaceType"
),
properties={
"properties_key": property_mapping_property_
},
space_type="spaceType",
value="value"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.opensearchserverless.*;
PropertyMappingProperty propertyMappingProperty_;
PropertyMappingProperty propertyMappingProperty = PropertyMappingProperty.builder()
.type("type")
// the properties below are optional
.analyzer("analyzer")
.compressionLevel("compressionLevel")
.dataType("dataType")
.dimension(123)
.index(false)
.method(MethodProperty.builder()
.name("name")
// the properties below are optional
.engine("engine")
.parameters(ParametersProperty.builder()
.efConstruction(123)
.m(123)
.build())
.spaceType("spaceType")
.build())
.properties(Map.of(
"propertiesKey", propertyMappingProperty_))
.spaceType("spaceType")
.value("value")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.OpenSearchServerless;
PropertyMappingProperty propertyMappingProperty_;
var propertyMappingProperty = new PropertyMappingProperty {
Type = "type",
// the properties below are optional
Analyzer = "analyzer",
CompressionLevel = "compressionLevel",
DataType = "dataType",
Dimension = 123,
Index = false,
Method = new MethodProperty {
Name = "name",
// the properties below are optional
Engine = "engine",
Parameters = new ParametersProperty {
EfConstruction = 123,
M = 123
},
SpaceType = "spaceType"
},
Properties = new Dictionary<string, object> {
{ "propertiesKey", propertyMappingProperty_ }
},
SpaceType = "spaceType",
Value = "value"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var propertyMappingProperty_ PropertyMappingProperty
propertyMappingProperty := &PropertyMappingProperty{
Type: jsii.String("type"),
// the properties below are optional
Analyzer: jsii.String("analyzer"),
CompressionLevel: jsii.String("compressionLevel"),
DataType: jsii.String("dataType"),
Dimension: jsii.Number(123),
Index: jsii.Boolean(false),
Method: &MethodProperty{
Name: jsii.String("name"),
// the properties below are optional
Engine: jsii.String("engine"),
Parameters: &ParametersProperty{
EfConstruction: jsii.Number(123),
M: jsii.Number(123),
},
SpaceType: jsii.String("spaceType"),
},
Properties: map[string]interface{}{
"propertiesKey": propertyMappingProperty_,
},
SpaceType: jsii.String("spaceType"),
Value: jsii.String("value"),
}
Properties
analyzeroptionalstringanalyzeroptionalstranalyzeroptionalStringAnalyzeroptionalstringAnalyzeroptional*string #The analyzer to use for this field (for text and keyword fields).
compressionLeveloptionalstringcompression_leveloptionalstrcompressionLeveloptionalStringCompressionLeveloptionalstringCompressionLeveloptional*string #The compression level for knn_vector fields.
dataTypeoptionalstringdata_typeoptionalstrdataTypeoptionalStringDataTypeoptionalstringDataTypeoptional*string #The data type for knn_vector fields (e.g. float, byte). Controls how vector values are stored.
dimensionoptionalnumberdimensionoptionalint | floatdimensionoptionalNumberDimensionoptionaldoubleDimensionoptional*float64 #Dimension size for vector fields, defines the number of dimensions in the vector.
indexoptionalboolean | IResolvableindexoptionaltyping.Union[bool, IResolvable]indexoptionalBooleanIndexoptionalboolIndexoptionalinterface{} #Whether a field should be indexed.
methodoptionalIResolvable | CfnIndex.MethodPropertymethodoptionaltyping.Union[IResolvable, MethodProperty]methodoptionalIResolvableMethodoptionalIResolvableMethodoptionalinterface{} #Configuration for k-NN search method.
propertiesoptionalIResolvable | { [key: string]: IResolvable | CfnIndex.PropertyMappingProperty }propertiesoptionaltyping.Union[IResolvable, typing.Mapping[str, typing.Union[IResolvable, PropertyMappingProperty]]]propertiesoptionalIResolvablePropertiesoptionalIResolvablePropertiesoptionalinterface{} #Defines the fields within the mapping, including their types and configurations.
spaceTypeoptionalstringspace_typeoptionalstrspaceTypeoptionalStringSpaceTypeoptionalstringSpaceTypeoptional*string #The distance function used for k-NN search (field-level, outside Method).
The field data type.
Must be a valid OpenSearch field type.
Default value for the field when not specified in a document.