# OpensearchConfigurationProperty

Contains details about the configuration of the Amazon OpenSearch Service database used for the `AMAZON.QnAIntent` .

- Source: Generated at build time
- Type last changed: v2.187.0 · 31 Mar 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lex as lex } from 'aws-cdk-lib';
const opensearchConfigurationProperty: lex.CfnBot.OpensearchConfigurationProperty = {
  domainEndpoint: 'domainEndpoint',
  exactResponse: false,
  exactResponseFields: {
    answerField: 'answerField',
    questionField: 'questionField',
  },
  includeFields: ['includeFields'],
  indexName: 'indexName',
};
```

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_lex as lex

opensearch_configuration_property = lex.CfnBot.OpensearchConfigurationProperty(
    domain_endpoint="domainEndpoint",
    exact_response=False,
    exact_response_fields=lex.CfnBot.ExactResponseFieldsProperty(
        answer_field="answerField",
        question_field="questionField"
    ),
    include_fields=["includeFields"],
    index_name="indexName"
)
```

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.lex.*;

OpensearchConfigurationProperty opensearchConfigurationProperty = OpensearchConfigurationProperty.builder()
        .domainEndpoint("domainEndpoint")
        .exactResponse(false)
        .exactResponseFields(ExactResponseFieldsProperty.builder()
                .answerField("answerField")
                .questionField("questionField")
                .build())
        .includeFields(List.of("includeFields"))
        .indexName("indexName")
        .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.Lex;

var opensearchConfigurationProperty = new OpensearchConfigurationProperty {
    DomainEndpoint = "domainEndpoint",
    ExactResponse = false,
    ExactResponseFields = new ExactResponseFieldsProperty {
        AnswerField = "answerField",
        QuestionField = "questionField"
    },
    IncludeFields = new [] { "includeFields" },
    IndexName = "indexName"
};
```

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"

opensearchConfigurationProperty := &OpensearchConfigurationProperty{
	DomainEndpoint: jsii.String("domainEndpoint"),
	ExactResponse: jsii.Boolean(false),
	ExactResponseFields: &ExactResponseFieldsProperty{
		AnswerField: jsii.String("answerField"),
		QuestionField: jsii.String("questionField"),
	},
	IncludeFields: []*string{
		jsii.String("includeFields"),
	},
	IndexName: jsii.String("indexName"),
}
```

## Properties

- `domainEndpoint`: string — The endpoint of the Amazon OpenSearch Service domain.

- `exactResponse`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether to return an exact response or to return an answer generated by the model using the fields you specify from the database.

- `exactResponseFields`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBot.ExactResponseFieldsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lex.CfnBot.ExactResponseFieldsProperty.html) — Contains the names of the fields used for an exact response to the user.

- `includeFields`: string[] — Contains a list of fields from the Amazon OpenSearch Service that the model can use to generate the answer to the query.

- `indexName`: string — The name of the Amazon OpenSearch Service index.
