# DocumentMetadataConfigurationProperty

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

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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
    }
};
```

Golang:

```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

- `name`: string (required) — The name of the index field.

- `relevance`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnIndex.RelevanceProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kendra.CfnIndex.RelevanceProperty.html) — Provides tuning parameters to determine how the field affects the search results.

- `search`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnIndex.SearchProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kendra.CfnIndex.SearchProperty.html) — Provides information about how the field is used during a search.

- `type`: string (required) — The data type of the index field.
