@aws-sdk/client-kendra 3.321.1 → 3.325.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -559,6 +559,141 @@ export interface DocumentAttribute {
559
559
  */
560
560
  Value: DocumentAttributeValue | undefined;
561
561
  }
562
+ /**
563
+ * @public
564
+ * @enum
565
+ */
566
+ export declare const AttributeSuggestionsMode: {
567
+ readonly ACTIVE: "ACTIVE";
568
+ readonly INACTIVE: "INACTIVE";
569
+ };
570
+ /**
571
+ * @public
572
+ */
573
+ export type AttributeSuggestionsMode = (typeof AttributeSuggestionsMode)[keyof typeof AttributeSuggestionsMode];
574
+ /**
575
+ * @public
576
+ * <p>Provides the configuration information for a document field/attribute that you want to base query
577
+ * suggestions on.</p>
578
+ */
579
+ export interface SuggestableConfig {
580
+ /**
581
+ * <p>The name of the document field/attribute.</p>
582
+ */
583
+ AttributeName?: string;
584
+ /**
585
+ * <p>
586
+ * <code>TRUE</code> means the document field/attribute is suggestible, so the contents within the
587
+ * field can be used for query suggestions.</p>
588
+ */
589
+ Suggestable?: boolean;
590
+ }
591
+ /**
592
+ * @public
593
+ * <p>Gets information on the configuration of document fields/attributes that you want to base
594
+ * query suggestions on. To change your configuration, use <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_AttributeSuggestionsUpdateConfig.html">AttributeSuggestionsUpdateConfig</a> and then call <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateQuerySuggestionsConfig.html">UpdateQuerySuggestionsConfig</a>.</p>
595
+ */
596
+ export interface AttributeSuggestionsDescribeConfig {
597
+ /**
598
+ * <p>The list of fields/attributes that you want to set as suggestible for query suggestions.</p>
599
+ */
600
+ SuggestableConfigList?: SuggestableConfig[];
601
+ /**
602
+ * <p>The mode is set to either <code>ACTIVE</code> or <code>INACTIVE</code>. If the <code>Mode</code>
603
+ * for query history is set to <code>ENABLED</code> when calling <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateQuerySuggestionsConfig.html">UpdateQuerySuggestionsConfig</a>
604
+ * and <code>AttributeSuggestionsMode</code> to use fields/attributes is set to <code>ACTIVE</code>,
605
+ * and you haven't set your <code>SuggestionTypes</code> preference to <code>DOCUMENT_ATTRIBUTES</code>,
606
+ * then Amazon Kendra uses the query history.</p>
607
+ */
608
+ AttributeSuggestionsMode?: AttributeSuggestionsMode | string;
609
+ }
610
+ /**
611
+ * @public
612
+ * <p>Data source information for user context filtering.</p>
613
+ */
614
+ export interface DataSourceGroup {
615
+ /**
616
+ * <p>The identifier of the group you want to add to your list of groups. This is for
617
+ * filtering search results based on the groups' access to documents.</p>
618
+ */
619
+ GroupId: string | undefined;
620
+ /**
621
+ * <p>The identifier of the data source group you want to add to your list of data source
622
+ * groups. This is for filtering search results based on the groups' access to documents in
623
+ * that data source.</p>
624
+ */
625
+ DataSourceId: string | undefined;
626
+ }
627
+ /**
628
+ * @public
629
+ * <p>Provides information about the user context for an Amazon Kendra index.</p>
630
+ * <p>User context filtering is a kind of personalized search with the benefit of controlling
631
+ * access to documents. For example, not all teams that search the company portal for
632
+ * information should access top-secret company documents, nor are these documents relevant to
633
+ * all users. Only specific users or groups of teams given access to top-secret documents
634
+ * should see these documents in their search results.</p>
635
+ * <p>You provide one of the following:</p>
636
+ * <ul>
637
+ * <li>
638
+ * <p>User token</p>
639
+ * </li>
640
+ * <li>
641
+ * <p>User ID, the groups the user belongs to, and any data sources the groups can
642
+ * access.</p>
643
+ * </li>
644
+ * </ul>
645
+ * <p>If you provide both, an exception is thrown.</p>
646
+ */
647
+ export interface UserContext {
648
+ /**
649
+ * <p>The user context token for filtering search results for a user. It must be a JWT or a
650
+ * JSON token.</p>
651
+ */
652
+ Token?: string;
653
+ /**
654
+ * <p>The identifier of the user you want to filter search results based on their access to
655
+ * documents.</p>
656
+ */
657
+ UserId?: string;
658
+ /**
659
+ * <p>The list of groups you want to filter search results based on the groups' access to
660
+ * documents.</p>
661
+ */
662
+ Groups?: string[];
663
+ /**
664
+ * <p>The list of data source groups you want to filter search results based on groups' access
665
+ * to documents in that data source.</p>
666
+ */
667
+ DataSourceGroups?: DataSourceGroup[];
668
+ }
669
+ /**
670
+ * @public
671
+ * <p>Updates the configuration information for the document fields/attributes that you want
672
+ * to base query suggestions on.</p>
673
+ * <p>To deactivate using documents fields for query suggestions, set the mode to
674
+ * <code>INACTIVE</code>. You must also set <code>SuggestionTypes</code> as either
675
+ * <code>QUERY</code> or <code>DOCUMENT_ATTRIBUTES</code> and then call <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_GetQuerySuggestions.html">GetQuerySuggestions</a>. If you set to <code>QUERY</code>, then
676
+ * Amazon Kendra uses the query history to base suggestions on. If you set to
677
+ * <code>DOCUMENT_ATTRIBUTES</code>, then Amazon Kendra uses the contents of document
678
+ * fields to base suggestions on.</p>
679
+ */
680
+ export interface AttributeSuggestionsUpdateConfig {
681
+ /**
682
+ * <p>The list of fields/attributes that you want to set as suggestible for query
683
+ * suggestions.</p>
684
+ */
685
+ SuggestableConfigList?: SuggestableConfig[];
686
+ /**
687
+ * <p>You can set the mode to <code>ACTIVE</code> or <code>INACTIVE</code>. You must also set
688
+ * <code>SuggestionTypes</code> as either <code>QUERY</code> or <code>DOCUMENT_ATTRIBUTES</code>
689
+ * and then call <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_GetQuerySuggestions.html">GetQuerySuggestions</a>. If <code>Mode</code> to use query history is set to
690
+ * <code>ENABLED</code> when calling <a href="https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateQuerySuggestionsConfig.html">UpdateQuerySuggestionsConfig</a> and <code>AttributeSuggestionsMode</code> to use
691
+ * fields/attributes is set to <code>ACTIVE</code>, and you haven't set your
692
+ * <code>SuggestionTypes</code> preference to <code>DOCUMENT_ATTRIBUTES</code>, then
693
+ * Amazon Kendra uses the query history.</p>
694
+ */
695
+ AttributeSuggestionsMode?: AttributeSuggestionsMode | string;
696
+ }
562
697
  /**
563
698
  * @public
564
699
  * <p>Provides the configuration information to connect to websites that require basic user
@@ -5907,6 +6042,8 @@ export interface DescribeQuerySuggestionsConfigResponse {
5907
6042
  MinimumQueryCount?: number;
5908
6043
  /**
5909
6044
  * <p>The Unix timestamp when query suggestions for an index was last updated.</p>
6045
+ * <p>Amazon Kendra automatically updates suggestions every 24 hours, after you
6046
+ * change a setting or after you apply a <a href="https://docs.aws.amazon.com/kendra/latest/dg/query-suggestions.html#query-suggestions-blocklist">block list</a>.</p>
5910
6047
  */
5911
6048
  LastSuggestionsBuildTime?: Date;
5912
6049
  /**
@@ -5922,8 +6059,16 @@ export interface DescribeQuerySuggestionsConfigResponse {
5922
6059
  * <p>This count can change when you update your query suggestions settings,
5923
6060
  * if you filter out certain queries from suggestions using a block list,
5924
6061
  * and as the query log accumulates more queries for Amazon Kendra to learn from.</p>
6062
+ * <p>If the count is much lower than you expected, it could be because Amazon Kendra
6063
+ * needs more queries in the query history to learn from or your current query suggestions
6064
+ * settings are too strict.</p>
5925
6065
  */
5926
6066
  TotalSuggestionsCount?: number;
6067
+ /**
6068
+ * <p>Configuration information for the document fields/attributes that you want to base query
6069
+ * suggestions on.</p>
6070
+ */
6071
+ AttributeSuggestionsConfig?: AttributeSuggestionsDescribeConfig;
5927
6072
  }
5928
6073
  /**
5929
6074
  * @public
@@ -6083,27 +6228,36 @@ export interface DisassociatePersonasFromEntitiesResponse {
6083
6228
  }
6084
6229
  /**
6085
6230
  * @public
6231
+ * @enum
6086
6232
  */
6087
- export interface GetQuerySuggestionsRequest {
6233
+ export declare const SuggestionType: {
6234
+ readonly DOCUMENT_ATTRIBUTES: "DOCUMENT_ATTRIBUTES";
6235
+ readonly QUERY: "QUERY";
6236
+ };
6237
+ /**
6238
+ * @public
6239
+ */
6240
+ export type SuggestionType = (typeof SuggestionType)[keyof typeof SuggestionType];
6241
+ /**
6242
+ * @public
6243
+ * <p>The document ID and its fields/attributes that are used for a query suggestion, if
6244
+ * document fields set to use for query suggestions.</p>
6245
+ */
6246
+ export interface SourceDocument {
6088
6247
  /**
6089
- * <p>The identifier of the index you want to get query suggestions from.</p>
6248
+ * <p>The identifier of the document used for a query suggestion.</p>
6090
6249
  */
6091
- IndexId: string | undefined;
6250
+ DocumentId?: string;
6092
6251
  /**
6093
- * <p>The text of a user's query to generate query suggestions.</p>
6094
- * <p>A query is suggested if the query prefix matches
6095
- * what a user starts to type as their query.</p>
6096
- * <p>Amazon Kendra does not show any suggestions if a user
6097
- * types fewer than two characters or more than 60 characters.
6098
- * A query must also have at least one search result and contain
6099
- * at least one word of more than four characters.</p>
6252
+ * <p>The document fields/attributes used for a query suggestion.</p>
6100
6253
  */
6101
- QueryText: string | undefined;
6254
+ SuggestionAttributes?: string[];
6102
6255
  /**
6103
- * <p>The maximum number of query suggestions you want to show
6104
- * to your users.</p>
6256
+ * <p>The additional fields/attributes to include in the response. You can use additional
6257
+ * fields to provide extra information in the response. Additional fields are not used
6258
+ * to based suggestions on.</p>
6105
6259
  */
6106
- MaxSuggestionsCount?: number;
6260
+ AdditionalAttributes?: DocumentAttribute[];
6107
6261
  }
6108
6262
  /**
6109
6263
  * @public
@@ -6160,6 +6314,11 @@ export interface Suggestion {
6160
6314
  * <p>The value is the text string of a suggestion.</p>
6161
6315
  */
6162
6316
  Value?: SuggestionValue;
6317
+ /**
6318
+ * <p>The list of document IDs and their fields/attributes that are used for a
6319
+ * single query suggestion, if document fields set to use for query suggestions.</p>
6320
+ */
6321
+ SourceDocuments?: SourceDocument[];
6163
6322
  }
6164
6323
  /**
6165
6324
  * @public
@@ -7439,65 +7598,6 @@ export interface SpellCorrectionConfiguration {
7439
7598
  */
7440
7599
  IncludeQuerySpellCheckSuggestions: boolean | undefined;
7441
7600
  }
7442
- /**
7443
- * @public
7444
- * <p>Data source information for user context filtering.</p>
7445
- */
7446
- export interface DataSourceGroup {
7447
- /**
7448
- * <p>The identifier of the group you want to add to your list of groups. This is for
7449
- * filtering search results based on the groups' access to documents.</p>
7450
- */
7451
- GroupId: string | undefined;
7452
- /**
7453
- * <p>The identifier of the data source group you want to add to your list of data source
7454
- * groups. This is for filtering search results based on the groups' access to documents in
7455
- * that data source.</p>
7456
- */
7457
- DataSourceId: string | undefined;
7458
- }
7459
- /**
7460
- * @public
7461
- * <p>Provides information about the user context for an Amazon Kendra index.</p>
7462
- * <p>User context filtering is a kind of personalized search with the benefit of controlling
7463
- * access to documents. For example, not all teams that search the company portal for
7464
- * information should access top-secret company documents, nor are these documents relevant to
7465
- * all users. Only specific users or groups of teams given access to top-secret documents
7466
- * should see these documents in their search results.</p>
7467
- * <p>You provide one of the following:</p>
7468
- * <ul>
7469
- * <li>
7470
- * <p>User token</p>
7471
- * </li>
7472
- * <li>
7473
- * <p>User ID, the groups the user belongs to, and any data sources the groups can
7474
- * access.</p>
7475
- * </li>
7476
- * </ul>
7477
- * <p>If you provide both, an exception is thrown.</p>
7478
- */
7479
- export interface UserContext {
7480
- /**
7481
- * <p>The user context token for filtering search results for a user. It must be a JWT or a
7482
- * JSON token.</p>
7483
- */
7484
- Token?: string;
7485
- /**
7486
- * <p>The identifier of the user you want to filter search results based on their access to
7487
- * documents.</p>
7488
- */
7489
- UserId?: string;
7490
- /**
7491
- * <p>The list of groups you want to filter search results based on the groups' access to
7492
- * documents.</p>
7493
- */
7494
- Groups?: string[];
7495
- /**
7496
- * <p>The list of data source groups you want to filter search results based on groups' access
7497
- * to documents in that data source.</p>
7498
- */
7499
- DataSourceGroups?: DataSourceGroup[];
7500
- }
7501
7601
  /**
7502
7602
  * @public
7503
7603
  * <p>A single featured result item. A featured result is displayed at the top of
@@ -7643,143 +7743,6 @@ export interface TableExcerpt {
7643
7743
  */
7644
7744
  TotalNumberOfRows?: number;
7645
7745
  }
7646
- /**
7647
- * @public
7648
- * <p>A single query result.</p>
7649
- * <p>A query result contains information about a document returned by the query. This
7650
- * includes the original location of the document, a list of attributes assigned to the
7651
- * document, and relevant text from the document that satisfies the query.</p>
7652
- */
7653
- export interface QueryResultItem {
7654
- /**
7655
- * <p>The identifier for the query result.</p>
7656
- */
7657
- Id?: string;
7658
- /**
7659
- * <p>The type of document within the response. For example, a response could include a
7660
- * question-answer that's relevant to the query.</p>
7661
- */
7662
- Type?: QueryResultType | string;
7663
- /**
7664
- * <p>If the <code>Type</code> of document within the response is <code>ANSWER</code>, then it
7665
- * is either a <code>TABLE</code> answer or <code>TEXT</code> answer. If it's a table answer,
7666
- * a table excerpt is returned in <code>TableExcerpt</code>. If it's a text answer, a text
7667
- * excerpt is returned in <code>DocumentExcerpt</code>.</p>
7668
- */
7669
- Format?: QueryResultFormat | string;
7670
- /**
7671
- * <p>One or more additional attributes associated with the query result.</p>
7672
- */
7673
- AdditionalAttributes?: AdditionalResultAttribute[];
7674
- /**
7675
- * <p>The identifier for the document.</p>
7676
- */
7677
- DocumentId?: string;
7678
- /**
7679
- * <p>The title of the document. Contains the text of the title and information for
7680
- * highlighting the relevant terms in the title.</p>
7681
- */
7682
- DocumentTitle?: TextWithHighlights;
7683
- /**
7684
- * <p>An extract of the text in the document. Contains information about highlighting the
7685
- * relevant terms in the excerpt.</p>
7686
- */
7687
- DocumentExcerpt?: TextWithHighlights;
7688
- /**
7689
- * <p>The URI of the original location of the document.</p>
7690
- */
7691
- DocumentURI?: string;
7692
- /**
7693
- * <p>An array of document attributes assigned to a document in the search results. For
7694
- * example, the document author (<code>_author</code>) or the source URI
7695
- * (<code>_source_uri</code>) of the document.</p>
7696
- */
7697
- DocumentAttributes?: DocumentAttribute[];
7698
- /**
7699
- * <p>Indicates the confidence that Amazon Kendra has that a result matches the query
7700
- * that you provided. Each result is placed into a bin that indicates the confidence,
7701
- * <code>VERY_HIGH</code>, <code>HIGH</code>, <code>MEDIUM</code> and <code>LOW</code>. You
7702
- * can use the score to determine if a response meets the confidence needed for your
7703
- * application.</p>
7704
- * <p>The field is only set to <code>LOW</code> when the <code>Type</code> field is set to
7705
- * <code>DOCUMENT</code> and Amazon Kendra is not confident that the result matches
7706
- * the query.</p>
7707
- */
7708
- ScoreAttributes?: ScoreAttributes;
7709
- /**
7710
- * <p>A token that identifies a particular result from a particular query. Use this token to
7711
- * provide click-through feedback for the result. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/submitting-feedback.html">Submitting feedback
7712
- * </a>.</p>
7713
- */
7714
- FeedbackToken?: string;
7715
- /**
7716
- * <p>An excerpt from a table within a document.</p>
7717
- */
7718
- TableExcerpt?: TableExcerpt;
7719
- }
7720
- /**
7721
- * @public
7722
- * <p>A corrected misspelled word in a query.</p>
7723
- */
7724
- export interface Correction {
7725
- /**
7726
- * <p>The zero-based location in the response string or text where
7727
- * the corrected word starts.</p>
7728
- */
7729
- BeginOffset?: number;
7730
- /**
7731
- * <p>The zero-based location in the response string or text where
7732
- * the corrected word ends.</p>
7733
- */
7734
- EndOffset?: number;
7735
- /**
7736
- * <p>The string or text of a misspelled word in a query.</p>
7737
- */
7738
- Term?: string;
7739
- /**
7740
- * <p>The string or text of a corrected misspelled word in a query.</p>
7741
- */
7742
- CorrectedTerm?: string;
7743
- }
7744
- /**
7745
- * @public
7746
- * <p>A query with suggested spell corrections. </p>
7747
- */
7748
- export interface SpellCorrectedQuery {
7749
- /**
7750
- * <p>The query with the suggested spell corrections.</p>
7751
- */
7752
- SuggestedQueryText?: string;
7753
- /**
7754
- * <p>The corrected misspelled word or words in a query.</p>
7755
- */
7756
- Corrections?: Correction[];
7757
- }
7758
- /**
7759
- * @public
7760
- * @enum
7761
- */
7762
- export declare const WarningCode: {
7763
- readonly QUERY_LANGUAGE_INVALID_SYNTAX: "QUERY_LANGUAGE_INVALID_SYNTAX";
7764
- };
7765
- /**
7766
- * @public
7767
- */
7768
- export type WarningCode = (typeof WarningCode)[keyof typeof WarningCode];
7769
- /**
7770
- * @public
7771
- * <p>The warning code and message that explains a problem with a query.</p>
7772
- */
7773
- export interface Warning {
7774
- /**
7775
- * <p>The message that explains the problem with the query.</p>
7776
- */
7777
- Message?: string;
7778
- /**
7779
- * <p>The code used to show the type of warning for the query.</p>
7780
- */
7781
- Code?: WarningCode | string;
7782
- }
7783
7746
  /**
7784
7747
  * @internal
7785
7748
  */
@@ -1,6 +1,143 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
2
  import { KendraServiceException as __BaseException } from "./KendraServiceException";
3
- import { CapacityUnitsConfiguration, CustomDocumentEnrichmentConfiguration, DataSourceConfiguration, DataSourceVpcConfiguration, DocumentAttribute, DocumentAttributeValue, DocumentAttributeValueType, DocumentMetadataConfiguration, DocumentRelevanceConfiguration, ExperienceConfiguration, FeaturedDocument, FeaturedResultsItem, FeaturedResultsSet, FeaturedResultsSetStatus, HierarchicalPrincipal, Mode, Principal, QueryResultItem, QueryResultType, S3Path, SortingConfiguration, SpellCorrectedQuery, SpellCorrectionConfiguration, Tag, UserContext, UserContextPolicy, UserGroupResolutionConfiguration, UserTokenConfiguration, Warning } from "./models_0";
3
+ import { AdditionalResultAttribute, AttributeSuggestionsUpdateConfig, CapacityUnitsConfiguration, CustomDocumentEnrichmentConfiguration, DataSourceConfiguration, DataSourceVpcConfiguration, DocumentAttribute, DocumentAttributeValue, DocumentAttributeValueType, DocumentMetadataConfiguration, DocumentRelevanceConfiguration, ExperienceConfiguration, FeaturedDocument, FeaturedResultsItem, FeaturedResultsSet, FeaturedResultsSetStatus, HierarchicalPrincipal, Mode, Principal, QueryResultFormat, QueryResultType, S3Path, ScoreAttributes, SortingConfiguration, SpellCorrectionConfiguration, SuggestionType, TableExcerpt, Tag, TextWithHighlights, UserContext, UserContextPolicy, UserGroupResolutionConfiguration, UserTokenConfiguration } from "./models_0";
4
+ /**
5
+ * @public
6
+ * <p>A single query result.</p>
7
+ * <p>A query result contains information about a document returned by the query. This
8
+ * includes the original location of the document, a list of attributes assigned to the
9
+ * document, and relevant text from the document that satisfies the query.</p>
10
+ */
11
+ export interface QueryResultItem {
12
+ /**
13
+ * <p>The identifier for the query result.</p>
14
+ */
15
+ Id?: string;
16
+ /**
17
+ * <p>The type of document within the response. For example, a response could include a
18
+ * question-answer that's relevant to the query.</p>
19
+ */
20
+ Type?: QueryResultType | string;
21
+ /**
22
+ * <p>If the <code>Type</code> of document within the response is <code>ANSWER</code>, then it
23
+ * is either a <code>TABLE</code> answer or <code>TEXT</code> answer. If it's a table answer,
24
+ * a table excerpt is returned in <code>TableExcerpt</code>. If it's a text answer, a text
25
+ * excerpt is returned in <code>DocumentExcerpt</code>.</p>
26
+ */
27
+ Format?: QueryResultFormat | string;
28
+ /**
29
+ * <p>One or more additional attributes associated with the query result.</p>
30
+ */
31
+ AdditionalAttributes?: AdditionalResultAttribute[];
32
+ /**
33
+ * <p>The identifier for the document.</p>
34
+ */
35
+ DocumentId?: string;
36
+ /**
37
+ * <p>The title of the document. Contains the text of the title and information for
38
+ * highlighting the relevant terms in the title.</p>
39
+ */
40
+ DocumentTitle?: TextWithHighlights;
41
+ /**
42
+ * <p>An extract of the text in the document. Contains information about highlighting the
43
+ * relevant terms in the excerpt.</p>
44
+ */
45
+ DocumentExcerpt?: TextWithHighlights;
46
+ /**
47
+ * <p>The URI of the original location of the document.</p>
48
+ */
49
+ DocumentURI?: string;
50
+ /**
51
+ * <p>An array of document attributes assigned to a document in the search results. For
52
+ * example, the document author (<code>_author</code>) or the source URI
53
+ * (<code>_source_uri</code>) of the document.</p>
54
+ */
55
+ DocumentAttributes?: DocumentAttribute[];
56
+ /**
57
+ * <p>Indicates the confidence that Amazon Kendra has that a result matches the query
58
+ * that you provided. Each result is placed into a bin that indicates the confidence,
59
+ * <code>VERY_HIGH</code>, <code>HIGH</code>, <code>MEDIUM</code> and <code>LOW</code>. You
60
+ * can use the score to determine if a response meets the confidence needed for your
61
+ * application.</p>
62
+ * <p>The field is only set to <code>LOW</code> when the <code>Type</code> field is set to
63
+ * <code>DOCUMENT</code> and Amazon Kendra is not confident that the result matches
64
+ * the query.</p>
65
+ */
66
+ ScoreAttributes?: ScoreAttributes;
67
+ /**
68
+ * <p>A token that identifies a particular result from a particular query. Use this token to
69
+ * provide click-through feedback for the result. For more information, see <a href="https://docs.aws.amazon.com/kendra/latest/dg/submitting-feedback.html">Submitting feedback
70
+ * </a>.</p>
71
+ */
72
+ FeedbackToken?: string;
73
+ /**
74
+ * <p>An excerpt from a table within a document.</p>
75
+ */
76
+ TableExcerpt?: TableExcerpt;
77
+ }
78
+ /**
79
+ * @public
80
+ * <p>A corrected misspelled word in a query.</p>
81
+ */
82
+ export interface Correction {
83
+ /**
84
+ * <p>The zero-based location in the response string or text where
85
+ * the corrected word starts.</p>
86
+ */
87
+ BeginOffset?: number;
88
+ /**
89
+ * <p>The zero-based location in the response string or text where
90
+ * the corrected word ends.</p>
91
+ */
92
+ EndOffset?: number;
93
+ /**
94
+ * <p>The string or text of a misspelled word in a query.</p>
95
+ */
96
+ Term?: string;
97
+ /**
98
+ * <p>The string or text of a corrected misspelled word in a query.</p>
99
+ */
100
+ CorrectedTerm?: string;
101
+ }
102
+ /**
103
+ * @public
104
+ * <p>A query with suggested spell corrections. </p>
105
+ */
106
+ export interface SpellCorrectedQuery {
107
+ /**
108
+ * <p>The query with the suggested spell corrections.</p>
109
+ */
110
+ SuggestedQueryText?: string;
111
+ /**
112
+ * <p>The corrected misspelled word or words in a query.</p>
113
+ */
114
+ Corrections?: Correction[];
115
+ }
116
+ /**
117
+ * @public
118
+ * @enum
119
+ */
120
+ export declare const WarningCode: {
121
+ readonly QUERY_LANGUAGE_INVALID_SYNTAX: "QUERY_LANGUAGE_INVALID_SYNTAX";
122
+ };
123
+ /**
124
+ * @public
125
+ */
126
+ export type WarningCode = (typeof WarningCode)[keyof typeof WarningCode];
127
+ /**
128
+ * @public
129
+ * <p>The warning code and message that explains a problem with a query.</p>
130
+ */
131
+ export interface Warning {
132
+ /**
133
+ * <p>The message that explains the problem with the query.</p>
134
+ */
135
+ Message?: string;
136
+ /**
137
+ * <p>The code used to show the type of warning for the query.</p>
138
+ */
139
+ Code?: WarningCode | string;
140
+ }
4
141
  /**
5
142
  * @public
6
143
  * <p>The resource you want to use is currently in use. Please check you have provided the
@@ -292,7 +429,7 @@ export interface UpdateFeaturedResultsSetRequest {
292
429
  */
293
430
  IndexId: string | undefined;
294
431
  /**
295
- * <p>The identifier of the index used for featuring results.</p>
432
+ * <p>The identifier of the set of featured results that you want to update.</p>
296
433
  */
297
434
  FeaturedResultsSetId: string | undefined;
298
435
  /**
@@ -478,6 +615,11 @@ export interface UpdateQuerySuggestionsConfigRequest {
478
615
  * <p>How you tune this setting depends on your specific needs.</p>
479
616
  */
480
617
  MinimumQueryCount?: number;
618
+ /**
619
+ * <p>Configuration information for the document fields/attributes that you want to base
620
+ * query suggestions on.</p>
621
+ */
622
+ AttributeSuggestionsConfig?: AttributeSuggestionsUpdateConfig;
481
623
  }
482
624
  /**
483
625
  * @public
@@ -715,6 +857,75 @@ export interface QueryResult {
715
857
  */
716
858
  FeaturedResultsItems?: FeaturedResultsItem[];
717
859
  }
860
+ /**
861
+ * @public
862
+ * <p>Provides the configuration information for the document fields/attributes that you want
863
+ * to base query suggestions on.</p>
864
+ */
865
+ export interface AttributeSuggestionsGetConfig {
866
+ /**
867
+ * <p>The list of document field/attribute keys or field names to use for query suggestions.
868
+ * If the content within any of the fields match what your user starts typing as their query,
869
+ * then the field content is returned as a query suggestion.</p>
870
+ */
871
+ SuggestionAttributes?: string[];
872
+ /**
873
+ * <p>The list of additional document field/attribute keys or field names to include in the
874
+ * response. You can use additional fields to provide extra information in the response.
875
+ * Additional fields are not used to based suggestions on.</p>
876
+ */
877
+ AdditionalResponseAttributes?: string[];
878
+ /**
879
+ * <p>Filters the search results based on document fields/attributes.</p>
880
+ */
881
+ AttributeFilter?: AttributeFilter;
882
+ /**
883
+ * <p>Applies user context filtering so that only users who are given access to certain
884
+ * documents see these document in their search results.</p>
885
+ */
886
+ UserContext?: UserContext;
887
+ }
888
+ /**
889
+ * @public
890
+ */
891
+ export interface GetQuerySuggestionsRequest {
892
+ /**
893
+ * <p>The identifier of the index you want to get query suggestions from.</p>
894
+ */
895
+ IndexId: string | undefined;
896
+ /**
897
+ * <p>The text of a user's query to generate query suggestions.</p>
898
+ * <p>A query is suggested if the query prefix matches
899
+ * what a user starts to type as their query.</p>
900
+ * <p>Amazon Kendra does not show any suggestions if a user
901
+ * types fewer than two characters or more than 60 characters.
902
+ * A query must also have at least one search result and contain
903
+ * at least one word of more than four characters.</p>
904
+ */
905
+ QueryText: string | undefined;
906
+ /**
907
+ * <p>The maximum number of query suggestions you want to show
908
+ * to your users.</p>
909
+ */
910
+ MaxSuggestionsCount?: number;
911
+ /**
912
+ * <p>The suggestions type to base query suggestions on. The suggestion
913
+ * types are query history or document fields/attributes. You can set
914
+ * one type or the other.</p>
915
+ * <p>If you set query history as your suggestions type, Amazon Kendra
916
+ * suggests queries relevant to your users based on popular queries in
917
+ * the query history.</p>
918
+ * <p>If you set document fields/attributes as your suggestions type,
919
+ * Amazon Kendra suggests queries relevant to your users based on the
920
+ * contents of document fields.</p>
921
+ */
922
+ SuggestionTypes?: (SuggestionType | string)[];
923
+ /**
924
+ * <p>Configuration information for the document fields/attributes that you
925
+ * want to base query suggestions on.</p>
926
+ */
927
+ AttributeSuggestionsConfig?: AttributeSuggestionsGetConfig;
928
+ }
718
929
  /**
719
930
  * @public
720
931
  */