Skip to content
v2.278.0

DocumentMetadataConfigurationProperty Struct ​

Specifies the properties, such as relevance tuning and searchability, of an index field.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_kendra as kendra } from 'aws-cdk-lib';
const documentMetadataConfigurationProperty: kendra.CfnIndex.DocumentMetadataConfigurationProperty = {
  name: 'name',
  type: 'type',

  // the properties below are optional
  relevance: {
    duration: 'duration',
    freshness: false,
    importance: 123,
    rankOrder: 'rankOrder',
    valueImportanceItems: [{
      key: 'key',
      value: 123,
    }],
  },
  search: {
    displayable: false,
    facetable: false,
    searchable: false,
    sortable: false,
  },
};
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_kendra as kendra

document_metadata_configuration_property = kendra.CfnIndex.DocumentMetadataConfigurationProperty(
    name="name",
    type="type",

    # the properties below are optional
    relevance=kendra.CfnIndex.RelevanceProperty(
        duration="duration",
        freshness=False,
        importance=123,
        rank_order="rankOrder",
        value_importance_items=[kendra.CfnIndex.ValueImportanceItemProperty(
            key="key",
            value=123
        )]
    ),
    search=kendra.CfnIndex.SearchProperty(
        displayable=False,
        facetable=False,
        searchable=False,
        sortable=False
    )
)
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.kendra.*;

DocumentMetadataConfigurationProperty documentMetadataConfigurationProperty = DocumentMetadataConfigurationProperty.builder()
        .name("name")
        .type("type")

        // the properties below are optional
        .relevance(RelevanceProperty.builder()
                .duration("duration")
                .freshness(false)
                .importance(123)
                .rankOrder("rankOrder")
                .valueImportanceItems(List.of(ValueImportanceItemProperty.builder()
                        .key("key")
                        .value(123)
                        .build()))
                .build())
        .search(SearchProperty.builder()
                .displayable(false)
                .facetable(false)
                .searchable(false)
                .sortable(false)
                .build())
        .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.Kendra;

var documentMetadataConfigurationProperty = new DocumentMetadataConfigurationProperty {
    Name = "name",
    Type = "type",

    // the properties below are optional
    Relevance = new RelevanceProperty {
        Duration = "duration",
        Freshness = false,
        Importance = 123,
        RankOrder = "rankOrder",
        ValueImportanceItems = new [] { new ValueImportanceItemProperty {
            Key = "key",
            Value = 123
        } }
    },
    Search = new SearchProperty {
        Displayable = false,
        Facetable = false,
        Searchable = false,
        Sortable = false
    }
};
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"

documentMetadataConfigurationProperty := &DocumentMetadataConfigurationProperty{
	Name: jsii.String("name"),
	Type: jsii.String("type"),

	// the properties below are optional
	Relevance: &RelevanceProperty{
		Duration: jsii.String("duration"),
		Freshness: jsii.Boolean(false),
		Importance: jsii.Number(123),
		RankOrder: jsii.String("rankOrder"),
		ValueImportanceItems: []interface{}{
			&ValueImportanceItemProperty{
				Key: jsii.String("key"),
				Value: jsii.Number(123),
			},
		},
	},
	Search: &SearchProperty{
		Displayable: jsii.Boolean(false),
		Facetable: jsii.Boolean(false),
		Searchable: jsii.Boolean(false),
		Sortable: jsii.Boolean(false),
	},
}

Properties ​

namestringnamestrnameStringNamestringName*string required #
The name of the index field.
relevanceoptionalIResolvable | CfnIndex.RelevancePropertyrelevanceoptionaltyping.Union[IResolvable, RelevanceProperty]relevanceoptionalIResolvableRelevanceoptionalIResolvableRelevanceoptionalinterface{} #
Provides tuning parameters to determine how the field affects the search results.
typestringtypestrtypeStringTypestringType*string required #
The data type of the index field.