@aws-sdk/client-s3vectors 3.1169.0 → 3.1170.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.
@@ -27,17 +27,18 @@ import type { QueryVectorsCommandInput, QueryVectorsCommandOutput } from "./comm
27
27
  import type { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
28
28
  import type { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
29
29
  import type { UpdateIndexModeCommandInput, UpdateIndexModeCommandOutput } from "./commands/UpdateIndexModeCommand";
30
+ import type { UpdateMetadataConfigurationCommandInput, UpdateMetadataConfigurationCommandOutput } from "./commands/UpdateMetadataConfigurationCommand";
30
31
  import { type ClientInputEndpointParameters, type ClientResolvedEndpointParameters, type EndpointParameters } from "./endpoint/EndpointParameters";
31
32
  import { type RuntimeExtension, type RuntimeExtensionsConfig } from "./runtimeExtensions";
32
33
  export { __Client };
33
34
  /**
34
35
  * @public
35
36
  */
36
- export type ServiceInputTypes = CreateIndexCommandInput | CreateVectorBucketCommandInput | DeleteIndexCommandInput | DeleteVectorBucketCommandInput | DeleteVectorBucketPolicyCommandInput | DeleteVectorsCommandInput | GetIndexCommandInput | GetVectorBucketCommandInput | GetVectorBucketPolicyCommandInput | GetVectorsCommandInput | ListIndexesCommandInput | ListTagsForResourceCommandInput | ListVectorBucketsCommandInput | ListVectorsCommandInput | PutVectorBucketDefaultIndexModeCommandInput | PutVectorBucketPolicyCommandInput | PutVectorsCommandInput | QueryVectorsCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateIndexModeCommandInput;
37
+ export type ServiceInputTypes = CreateIndexCommandInput | CreateVectorBucketCommandInput | DeleteIndexCommandInput | DeleteVectorBucketCommandInput | DeleteVectorBucketPolicyCommandInput | DeleteVectorsCommandInput | GetIndexCommandInput | GetVectorBucketCommandInput | GetVectorBucketPolicyCommandInput | GetVectorsCommandInput | ListIndexesCommandInput | ListTagsForResourceCommandInput | ListVectorBucketsCommandInput | ListVectorsCommandInput | PutVectorBucketDefaultIndexModeCommandInput | PutVectorBucketPolicyCommandInput | PutVectorsCommandInput | QueryVectorsCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateIndexModeCommandInput | UpdateMetadataConfigurationCommandInput;
37
38
  /**
38
39
  * @public
39
40
  */
40
- export type ServiceOutputTypes = CreateIndexCommandOutput | CreateVectorBucketCommandOutput | DeleteIndexCommandOutput | DeleteVectorBucketCommandOutput | DeleteVectorBucketPolicyCommandOutput | DeleteVectorsCommandOutput | GetIndexCommandOutput | GetVectorBucketCommandOutput | GetVectorBucketPolicyCommandOutput | GetVectorsCommandOutput | ListIndexesCommandOutput | ListTagsForResourceCommandOutput | ListVectorBucketsCommandOutput | ListVectorsCommandOutput | PutVectorBucketDefaultIndexModeCommandOutput | PutVectorBucketPolicyCommandOutput | PutVectorsCommandOutput | QueryVectorsCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateIndexModeCommandOutput;
41
+ export type ServiceOutputTypes = CreateIndexCommandOutput | CreateVectorBucketCommandOutput | DeleteIndexCommandOutput | DeleteVectorBucketCommandOutput | DeleteVectorBucketPolicyCommandOutput | DeleteVectorsCommandOutput | GetIndexCommandOutput | GetVectorBucketCommandOutput | GetVectorBucketPolicyCommandOutput | GetVectorsCommandOutput | ListIndexesCommandOutput | ListTagsForResourceCommandOutput | ListVectorBucketsCommandOutput | ListVectorsCommandOutput | PutVectorBucketDefaultIndexModeCommandOutput | PutVectorBucketPolicyCommandOutput | PutVectorsCommandOutput | QueryVectorsCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateIndexModeCommandOutput | UpdateMetadataConfigurationCommandOutput;
41
42
  /**
42
43
  * @public
43
44
  */
@@ -41,9 +41,16 @@ declare const CreateIndexCommand_base: {
41
41
  * dimension: Number("int"), // required
42
42
  * distanceMetric: "euclidean" || "cosine", // required
43
43
  * metadataConfiguration: { // MetadataConfiguration
44
- * nonFilterableMetadataKeys: [ // NonFilterableMetadataKeys // required
44
+ * nonFilterableMetadataKeys: [ // NonFilterableMetadataKeys
45
45
  * "STRING_VALUE",
46
46
  * ],
47
+ * textSearchConfigurations: [ // TextSearchConfigurations
48
+ * { // TextSearchConfiguration
49
+ * metadataKey: "STRING_VALUE", // required
50
+ * language: "en" || "fr" || "es" || "pt" || "it" || "de" || "nl" || "zh" || "ja" || "ko",
51
+ * status: "ACTIVE" || "BUILDING",
52
+ * },
53
+ * ],
47
54
  * },
48
55
  * encryptionConfiguration: { // EncryptionConfiguration
49
56
  * sseType: "AES256" || "aws:kms",
@@ -50,9 +50,16 @@ declare const GetIndexCommand_base: {
50
50
  * // dimension: Number("int"), // required
51
51
  * // distanceMetric: "euclidean" || "cosine", // required
52
52
  * // metadataConfiguration: { // MetadataConfiguration
53
- * // nonFilterableMetadataKeys: [ // NonFilterableMetadataKeys // required
53
+ * // nonFilterableMetadataKeys: [ // NonFilterableMetadataKeys
54
54
  * // "STRING_VALUE",
55
55
  * // ],
56
+ * // textSearchConfigurations: [ // TextSearchConfigurations
57
+ * // { // TextSearchConfiguration
58
+ * // metadataKey: "STRING_VALUE", // required
59
+ * // language: "en" || "fr" || "es" || "pt" || "it" || "de" || "nl" || "zh" || "ja" || "ko",
60
+ * // status: "ACTIVE" || "BUILDING",
61
+ * // },
62
+ * // ],
56
63
  * // },
57
64
  * // encryptionConfiguration: { // EncryptionConfiguration
58
65
  * // sseType: "AES256" || "aws:kms",
@@ -24,7 +24,7 @@ declare const QueryVectorsCommand_base: {
24
24
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
25
  };
26
26
  /**
27
- * <p>Performs an approximate nearest neighbor search query in a vector index using a query vector. By default, it returns the keys of approximate nearest neighbors. You can optionally include the computed distance (between the query vector and each vector in the response) and metadata of each vector in the response.</p> <p>To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN). </p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3vectors:QueryVectors</code> permission to use this operation. Additional permissions are required based on the request parameters you specify:</p> <ul> <li> <p>With only <code>s3vectors:QueryVectors</code> permission, you can retrieve vector keys of approximate nearest neighbors and computed distances between these vectors. This permission is sufficient only when you don't set any metadata filters and don't request metadata (by keeping the <code>returnMetadata</code> parameter set to <code>false</code> or not specified).</p> </li> <li> <p>If you specify a metadata filter or set <code>returnMetadata</code> to true, you must have both <code>s3vectors:QueryVectors</code> and <code>s3vectors:GetVectors</code> permissions. The request fails with a <code>403 Forbidden error</code> if you request metadata filtering or metadata without the <code>s3vectors:GetVectors</code> permission.</p> </li> </ul> </dd> </dl>
27
+ * <p>Returns matching vector keys from a vector index ranked by vector similarity, full-text relevance, or both. Specify <code>queryVector</code> to perform a vector search, specify <code>queryTexts</code> to perform a full-text search, or specify both to perform a hybrid search. Full-text search ranks results using BM25. Hybrid search combines the vector and full-text rankings using Reciprocal Rank Fusion (RRF).</p> <p>Amazon S3 Vectors ranks results by distance for a vector-only search, by BM25 score for a full-text-only search, and by RRF score for a hybrid search. You can optionally include computed distances, relevance scores, and vector metadata in the response. Full-text and hybrid searches require a vector index in <code>ENHANCED</code> mode.</p> <p>To specify the vector index, you can either use both the vector bucket name and the vector index name, or use the vector index Amazon Resource Name (ARN). </p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3vectors:QueryVectors</code> permission to use this operation. Additional permissions are required based on the request parameters you specify:</p> <ul> <li> <p>With only <code>s3vectors:QueryVectors</code> permission, you can retrieve vector keys of approximate nearest neighbors and computed distances between these vectors. This permission is sufficient only when you don't set <code>queryTexts</code>, don't set any metadata filters, and don't request metadata (by keeping the <code>returnMetadata</code> parameter set to <code>false</code> or not specified).</p> </li> <li> <p>To use <code>queryTexts</code>, a metadata filter, or <code>returnMetadata</code> set to <code>true</code> with this operation, you must have both the <code>s3vectors:QueryVectors</code> and <code>s3vectors:GetVectors</code> permissions. If you use any of these options without the <code>s3vectors:GetVectors</code> permission, Amazon S3 Vectors returns an <code>AccessDeniedException</code>.</p> </li> </ul> </dd> </dl>
28
28
  * @example
29
29
  * Use a bare-bones client and the command you need to make an API call.
30
30
  * ```javascript
@@ -47,6 +47,13 @@ declare const QueryVectorsCommand_base: {
47
47
  * queryMode: "CLASSIC" || "ENHANCED",
48
48
  * returnMetadata: true || false,
49
49
  * returnDistance: true || false,
50
+ * queryTexts: [ // QueryTextList
51
+ * { // QueryText
52
+ * text: "STRING_VALUE", // required
53
+ * metadataKey: "STRING_VALUE", // required
54
+ * },
55
+ * ],
56
+ * returnScores: true || false,
50
57
  * nextToken: "STRING_VALUE",
51
58
  * };
52
59
  * const command = new QueryVectorsCommand(input);
@@ -55,6 +62,16 @@ declare const QueryVectorsCommand_base: {
55
62
  * // vectors: [ // QueryVectorsOutputList // required
56
63
  * // { // QueryOutputVector
57
64
  * // distance: Number("float"),
65
+ * // scores: { // QueryScores
66
+ * // fused: Number("float"),
67
+ * // bm25Scores: [ // Bm25ScoreList
68
+ * // { // Bm25Score
69
+ * // metadataKey: "STRING_VALUE", // required
70
+ * // score: Number("float"), // required
71
+ * // },
72
+ * // ],
73
+ * // vectorDistance: Number("float"),
74
+ * // },
58
75
  * // key: "STRING_VALUE", // required
59
76
  * // metadata: "DOCUMENT_VALUE",
60
77
  * // },
@@ -0,0 +1,113 @@
1
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
2
+ import type { UpdateMetadataConfigurationInput, UpdateMetadataConfigurationOutput } from "../models/models_0";
3
+ /**
4
+ * @public
5
+ */
6
+ export type { __MetadataBearer };
7
+ /**
8
+ * @public
9
+ *
10
+ * The input for {@link UpdateMetadataConfigurationCommand}.
11
+ */
12
+ export interface UpdateMetadataConfigurationCommandInput extends UpdateMetadataConfigurationInput {
13
+ }
14
+ /**
15
+ * @public
16
+ *
17
+ * The output of {@link UpdateMetadataConfigurationCommand}.
18
+ */
19
+ export interface UpdateMetadataConfigurationCommandOutput extends UpdateMetadataConfigurationOutput, __MetadataBearer {
20
+ }
21
+ declare const UpdateMetadataConfigurationCommand_base: {
22
+ new (input: UpdateMetadataConfigurationCommandInput): import("@smithy/core/client").CommandImpl<UpdateMetadataConfigurationCommandInput, UpdateMetadataConfigurationCommandOutput, import("..").S3VectorsClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (...[input]: [] | [UpdateMetadataConfigurationCommandInput]): import("@smithy/core/client").CommandImpl<UpdateMetadataConfigurationCommandInput, UpdateMetadataConfigurationCommandOutput, import("..").S3VectorsClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
+ };
26
+ /**
27
+ * <p>Adds or deletes text search configurations on a vector index. Specify either <code>add</code> or <code>delete</code>, but not both. The vector index must be in <code>ENHANCED</code> mode.</p> <dl> <dt>Permissions</dt> <dd> <p>You must have the <code>s3vectors:UpdateMetadataConfiguration</code> permission to use this operation.</p> </dd> </dl>
28
+ * @example
29
+ * Use a bare-bones client and the command you need to make an API call.
30
+ * ```javascript
31
+ * import { S3VectorsClient, UpdateMetadataConfigurationCommand } from "@aws-sdk/client-s3vectors"; // ES Modules import
32
+ * // const { S3VectorsClient, UpdateMetadataConfigurationCommand } = require("@aws-sdk/client-s3vectors"); // CommonJS import
33
+ * // import type { S3VectorsClientConfig } from "@aws-sdk/client-s3vectors";
34
+ * const config = {}; // type is S3VectorsClientConfig
35
+ * const client = new S3VectorsClient(config);
36
+ * const input = { // UpdateMetadataConfigurationInput
37
+ * vectorBucketName: "STRING_VALUE",
38
+ * indexName: "STRING_VALUE",
39
+ * indexArn: "STRING_VALUE",
40
+ * add: { // MetadataConfigurationAdd
41
+ * textSearchConfigurations: [ // TextSearchConfigurations
42
+ * { // TextSearchConfiguration
43
+ * metadataKey: "STRING_VALUE", // required
44
+ * language: "en" || "fr" || "es" || "pt" || "it" || "de" || "nl" || "zh" || "ja" || "ko",
45
+ * status: "ACTIVE" || "BUILDING",
46
+ * },
47
+ * ],
48
+ * },
49
+ * delete: { // MetadataConfigurationDelete
50
+ * textSearchConfigurations: [ // TextSearchConfigurationKeys
51
+ * { // TextSearchConfigurationKey
52
+ * metadataKey: "STRING_VALUE", // required
53
+ * },
54
+ * ],
55
+ * },
56
+ * };
57
+ * const command = new UpdateMetadataConfigurationCommand(input);
58
+ * const response = await client.send(command);
59
+ * // { // UpdateMetadataConfigurationOutput
60
+ * // indexArn: "STRING_VALUE", // required
61
+ * // };
62
+ *
63
+ * ```
64
+ *
65
+ * @param UpdateMetadataConfigurationCommandInput - {@link UpdateMetadataConfigurationCommandInput}
66
+ * @returns {@link UpdateMetadataConfigurationCommandOutput}
67
+ * @see {@link UpdateMetadataConfigurationCommandInput} for command's `input` shape.
68
+ * @see {@link UpdateMetadataConfigurationCommandOutput} for command's `response` shape.
69
+ * @see {@link S3VectorsClientResolvedConfig | config} for S3VectorsClient's `config` shape.
70
+ *
71
+ * @throws {@link ConflictException} (client fault)
72
+ * <p>The request failed because a vector bucket name or a vector index name already exists. Vector bucket names must be unique within your Amazon Web Services account for each Amazon Web Services Region. Vector index names must be unique within your vector bucket. Choose a different vector bucket name or vector index name, and try again.</p>
73
+ *
74
+ * @throws {@link NotFoundException} (client fault)
75
+ * <p>The request was rejected because the specified resource can't be found.</p>
76
+ *
77
+ * @throws {@link ServiceUnavailableException} (server fault)
78
+ * <p>The service is unavailable. Wait briefly and retry your request. If it continues to fail, increase your waiting time between retries.</p>
79
+ *
80
+ * @throws {@link AccessDeniedException} (client fault)
81
+ * <p>Access denied.</p>
82
+ *
83
+ * @throws {@link InternalServerException} (server fault)
84
+ * <p>The request failed due to an internal server error.</p>
85
+ *
86
+ * @throws {@link RequestTimeoutException} (client fault)
87
+ * <p>The request timed out. Retry your request.</p>
88
+ *
89
+ * @throws {@link TooManyRequestsException} (client fault)
90
+ * <p>The request was denied due to request throttling.</p>
91
+ *
92
+ * @throws {@link ValidationException} (client fault)
93
+ * <p>The requested action isn't valid.</p>
94
+ *
95
+ * @throws {@link S3VectorsServiceException}
96
+ * <p>Base exception class for all service exceptions from S3Vectors service.</p>
97
+ *
98
+ *
99
+ * @public
100
+ */
101
+ export declare class UpdateMetadataConfigurationCommand extends UpdateMetadataConfigurationCommand_base {
102
+ /** @internal type navigation helper, not in runtime. */
103
+ protected static __types: {
104
+ api: {
105
+ input: UpdateMetadataConfigurationInput;
106
+ output: UpdateMetadataConfigurationOutput;
107
+ };
108
+ sdk: {
109
+ input: UpdateMetadataConfigurationCommandInput;
110
+ output: UpdateMetadataConfigurationCommandOutput;
111
+ };
112
+ };
113
+ }
@@ -19,3 +19,4 @@ export * from "./QueryVectorsCommand";
19
19
  export * from "./TagResourceCommand";
20
20
  export * from "./UntagResourceCommand";
21
21
  export * from "./UpdateIndexModeCommand";
22
+ export * from "./UpdateMetadataConfigurationCommand";
@@ -1,3 +1,21 @@
1
+ /**
2
+ * @public
3
+ * @enum
4
+ */
5
+ export declare const AnalyzerStatus: {
6
+ /**
7
+ * <p>The analyzer is built and serving queries.</p>
8
+ */
9
+ readonly ACTIVE: "ACTIVE";
10
+ /**
11
+ * <p>The analyzer is being backfilled and isn't yet serving queries.</p>
12
+ */
13
+ readonly BUILDING: "BUILDING";
14
+ };
15
+ /**
16
+ * @public
17
+ */
18
+ export type AnalyzerStatus = (typeof AnalyzerStatus)[keyof typeof AnalyzerStatus];
1
19
  /**
2
20
  * @public
3
21
  * @enum
@@ -33,6 +51,26 @@ export declare const SseType: {
33
51
  * @public
34
52
  */
35
53
  export type SseType = (typeof SseType)[keyof typeof SseType];
54
+ /**
55
+ * @public
56
+ * @enum
57
+ */
58
+ export declare const LanguageCode: {
59
+ readonly DE: "de";
60
+ readonly EN: "en";
61
+ readonly ES: "es";
62
+ readonly FR: "fr";
63
+ readonly IT: "it";
64
+ readonly JA: "ja";
65
+ readonly KO: "ko";
66
+ readonly NL: "nl";
67
+ readonly PT: "pt";
68
+ readonly ZH: "zh";
69
+ };
70
+ /**
71
+ * @public
72
+ */
73
+ export type LanguageCode = (typeof LanguageCode)[keyof typeof LanguageCode];
36
74
  /**
37
75
  * @public
38
76
  * @enum
@@ -1,5 +1,21 @@
1
1
  import type { DocumentType as __DocumentType } from "@smithy/types";
2
- import type { DataType, DistanceMetric, IndexMode, SseType } from "./enums";
2
+ import type { AnalyzerStatus, DataType, DistanceMetric, IndexMode, LanguageCode, SseType } from "./enums";
3
+ /**
4
+ * <p>The raw BM25 relevance score for a single searchable metadata key.</p>
5
+ * @public
6
+ */
7
+ export interface Bm25Score {
8
+ /**
9
+ * <p>The searchable metadata key that the score applies to.</p>
10
+ * @public
11
+ */
12
+ metadataKey: string | undefined;
13
+ /**
14
+ * <p>The BM25 relevance score.</p>
15
+ * @public
16
+ */
17
+ score: number | undefined;
18
+ }
3
19
  /**
4
20
  * <p>The encryption configuration for a vector bucket or index. By default, if you don't specify, all new vectors in Amazon S3 vector buckets use server-side encryption with Amazon S3 managed keys (SSE-S3), specifically <code>AES256</code>. You can optionally override bucket level encryption settings, and set a specific encryption configuration for a vector index at the time of index creation.</p>
5
21
  * @public
@@ -16,16 +32,42 @@ export interface EncryptionConfiguration {
16
32
  */
17
33
  kmsKeyArn?: string | undefined;
18
34
  }
35
+ /**
36
+ * <p>A full-text search configuration for a single metadata key.</p>
37
+ * @public
38
+ */
39
+ export interface TextSearchConfiguration {
40
+ /**
41
+ * <p>The metadata key to make full-text searchable.</p>
42
+ * @public
43
+ */
44
+ metadataKey: string | undefined;
45
+ /**
46
+ * <p>The language that the text search analyzer uses. Valid values are <code>en</code> (English), <code>fr</code> (French), <code>es</code> (Spanish), <code>pt</code> (Portuguese), <code>it</code> (Italian), <code>de</code> (German), <code>nl</code> (Dutch), <code>zh</code> (Chinese), <code>ja</code> (Japanese), and <code>ko</code> (Korean). If you don't specify a language, Amazon S3 Vectors uses the default standard analyzer.</p>
47
+ * @public
48
+ */
49
+ language?: LanguageCode | undefined;
50
+ /**
51
+ * <p>The backfill status of the text search configuration. Valid values are <code>ACTIVE</code>, which indicates that the analyzer is built and serving queries, and <code>BUILDING</code>, which indicates that the analyzer is being backfilled and isn't yet serving queries. This field is returned by <code>GetIndex</code>.</p>
52
+ * @public
53
+ */
54
+ status?: AnalyzerStatus | undefined;
55
+ }
19
56
  /**
20
57
  * <p>The metadata configuration for a vector index.</p>
21
58
  * @public
22
59
  */
23
60
  export interface MetadataConfiguration {
24
61
  /**
25
- * <p>Non-filterable metadata keys allow you to enrich vectors with additional context during storage and retrieval. Unlike default metadata keys, these keys can’t be used as query filters. Non-filterable metadata keys can be retrieved but can’t be searched, queried, or filtered. You can access non-filterable metadata keys of your vectors after finding the vectors. For more information about non-filterable metadata keys, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-vectors.html">Vectors</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-limitations.html">Limitations and restrictions</a> in the <i>Amazon S3 User Guide</i>. </p>
62
+ * <p>Non-filterable metadata keys allow you to enrich vectors with additional context during storage and retrieval. You can't use these keys in metadata filters. You can still make a non-filterable key full-text searchable by configuring it separately in <code>textSearchConfigurations</code>. You can retrieve non-filterable metadata keys after finding the vectors. For more information about non-filterable metadata keys, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-vectors.html">Vectors</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-limitations.html">Limitations and restrictions</a> in the <i>Amazon S3 User Guide</i>. </p>
26
63
  * @public
27
64
  */
28
- nonFilterableMetadataKeys: string[] | undefined;
65
+ nonFilterableMetadataKeys?: string[] | undefined;
66
+ /**
67
+ * <p>Full-text search configurations for searchable metadata keys.</p>
68
+ * @public
69
+ */
70
+ textSearchConfigurations?: TextSearchConfiguration[] | undefined;
29
71
  }
30
72
  /**
31
73
  * @public
@@ -595,6 +637,79 @@ export interface UpdateIndexModeInput {
595
637
  */
596
638
  export interface UpdateIndexModeOutput {
597
639
  }
640
+ /**
641
+ * <p>Text search configurations to add to a vector index.</p>
642
+ * @public
643
+ */
644
+ export interface MetadataConfigurationAdd {
645
+ /**
646
+ * <p>Text search configurations to add. Amazon S3 Vectors begins building the corresponding full-text indexes after the update is accepted.</p>
647
+ * @public
648
+ */
649
+ textSearchConfigurations?: TextSearchConfiguration[] | undefined;
650
+ }
651
+ /**
652
+ * <p>A searchable metadata key that identifies a text search configuration.</p>
653
+ * @public
654
+ */
655
+ export interface TextSearchConfigurationKey {
656
+ /**
657
+ * <p>The searchable metadata key whose text search configuration to delete.</p>
658
+ * @public
659
+ */
660
+ metadataKey: string | undefined;
661
+ }
662
+ /**
663
+ * <p>Text search configurations to delete from a vector index.</p>
664
+ * @public
665
+ */
666
+ export interface MetadataConfigurationDelete {
667
+ /**
668
+ * <p>Searchable metadata keys whose text search configurations to delete.</p>
669
+ * @public
670
+ */
671
+ textSearchConfigurations?: TextSearchConfigurationKey[] | undefined;
672
+ }
673
+ /**
674
+ * @public
675
+ */
676
+ export interface UpdateMetadataConfigurationInput {
677
+ /**
678
+ * <p>The name of the vector bucket that contains the vector index.</p>
679
+ * @public
680
+ */
681
+ vectorBucketName?: string | undefined;
682
+ /**
683
+ * <p>The name of the vector index to update.</p>
684
+ * @public
685
+ */
686
+ indexName?: string | undefined;
687
+ /**
688
+ * <p>The Amazon Resource Name (ARN) of the vector index to update.</p>
689
+ * @public
690
+ */
691
+ indexArn?: string | undefined;
692
+ /**
693
+ * <p>Text search configurations to add to the vector index.</p>
694
+ * @public
695
+ */
696
+ add?: MetadataConfigurationAdd | undefined;
697
+ /**
698
+ * <p>Text search configurations to delete from the vector index.</p>
699
+ * @public
700
+ */
701
+ delete?: MetadataConfigurationDelete | undefined;
702
+ }
703
+ /**
704
+ * @public
705
+ */
706
+ export interface UpdateMetadataConfigurationOutput {
707
+ /**
708
+ * <p>The Amazon Resource Name (ARN) of the updated vector index.</p>
709
+ * @public
710
+ */
711
+ indexArn: string | undefined;
712
+ }
598
713
  /**
599
714
  * @public
600
715
  */
@@ -732,6 +847,22 @@ export interface PutVectorsInput {
732
847
  */
733
848
  export interface PutVectorsOutput {
734
849
  }
850
+ /**
851
+ * <p>A full-text search query for a single metadata key.</p>
852
+ * @public
853
+ */
854
+ export interface QueryText {
855
+ /**
856
+ * <p>The full-text query string.</p>
857
+ * @public
858
+ */
859
+ text: string | undefined;
860
+ /**
861
+ * <p>The searchable metadata key to query.</p>
862
+ * @public
863
+ */
864
+ metadataKey: string | undefined;
865
+ }
735
866
  /**
736
867
  * @public
737
868
  */
@@ -757,10 +888,10 @@ export interface QueryVectorsInput {
757
888
  */
758
889
  topK: number | undefined;
759
890
  /**
760
- * <p>The query vector. Ensure that the query vector has the same dimension as the dimension of the vector index that's being queried. For example, if your vector index contains vectors with 384 dimensions, your query vector must also have 384 dimensions. </p>
891
+ * <p>The query vector for vector similarity search. The query vector must have the same dimension as the vector index. For example, if the vector index has 384 dimensions, the query vector must also have 384 dimensions. You can omit this parameter when you supply <code>queryTexts</code> to perform a full-text-only search. A request must include <code>queryVector</code>, <code>queryTexts</code>, or both.</p>
761
892
  * @public
762
893
  */
763
- queryVector: VectorData | undefined;
894
+ queryVector?: VectorData | undefined;
764
895
  /**
765
896
  * <p>Metadata filter to apply during the query. For more information about metadata keys, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-metadata-filtering.html">Metadata filtering</a> in the <i>Amazon S3 User Guide</i>. </p>
766
897
  * @public
@@ -781,6 +912,16 @@ export interface QueryVectorsInput {
781
912
  * @public
782
913
  */
783
914
  returnDistance?: boolean | undefined;
915
+ /**
916
+ * <p>Full-text queries for searchable metadata keys. Omit <code>queryVector</code> to run a full-text-only search, or provide both fields to run a hybrid search. Each entry must target a distinct searchable metadata key.</p>
917
+ * @public
918
+ */
919
+ queryTexts?: QueryText[] | undefined;
920
+ /**
921
+ * <p>Indicates whether to include relevance scores in the response. Full-text-only results can include BM25 scores. Hybrid results can also include a Reciprocal Rank Fusion (RRF) score and vector distance. This setting doesn't add scores to vector-only requests. The default value is <code>false</code>.</p>
922
+ * @public
923
+ */
924
+ returnScores?: boolean | undefined;
784
925
  /**
785
926
  * <p>Pagination token from a previous request. The value of this field is empty for an initial request.</p>
786
927
  * @public
@@ -788,7 +929,28 @@ export interface QueryVectorsInput {
788
929
  nextToken?: string | undefined;
789
930
  }
790
931
  /**
791
- * <p>The attributes of a vector in the approximate nearest neighbor search.</p>
932
+ * <p>Relevance scores for a full-text-only or hybrid search result.</p>
933
+ * @public
934
+ */
935
+ export interface QueryScores {
936
+ /**
937
+ * <p>The Reciprocal Rank Fusion (RRF) score that combines the vector and full-text rankings. This field is returned only for hybrid requests.</p>
938
+ * @public
939
+ */
940
+ fused?: number | undefined;
941
+ /**
942
+ * <p>The BM25 scores for the searchable metadata keys that the result matched.</p>
943
+ * @public
944
+ */
945
+ bm25Scores?: Bm25Score[] | undefined;
946
+ /**
947
+ * <p>The distance from the query vector. This field is returned when a hybrid result matches the vector search.</p>
948
+ * @public
949
+ */
950
+ vectorDistance?: number | undefined;
951
+ }
952
+ /**
953
+ * <p>Contains the key and optional distance, relevance scores, and metadata for a vector returned by the <code>QueryVectors</code> operation.</p>
792
954
  * @public
793
955
  */
794
956
  export interface QueryOutputVector {
@@ -798,7 +960,12 @@ export interface QueryOutputVector {
798
960
  */
799
961
  distance?: number | undefined;
800
962
  /**
801
- * <p>The key of the vector in the approximate nearest neighbor search.</p>
963
+ * <p>The relevance scores for a full-text-only or hybrid result, when requested through <code>returnScores</code>.</p>
964
+ * @public
965
+ */
966
+ scores?: QueryScores | undefined;
967
+ /**
968
+ * <p>The key of the matching vector.</p>
802
969
  * @public
803
970
  */
804
971
  key: string | undefined;
@@ -813,7 +980,7 @@ export interface QueryOutputVector {
813
980
  */
814
981
  export interface QueryVectorsOutput {
815
982
  /**
816
- * <p>The vectors in the approximate nearest neighbor search.</p>
983
+ * <p>The matching vector results in ranked order. Results are ranked by vector distance for a vector-only search, by BM25 relevance for a full-text-only search, and by RRF score for a hybrid search.</p>
817
984
  * @public
818
985
  */
819
986
  vectors: QueryOutputVector[] | undefined;
@@ -20,6 +20,7 @@ export declare var ValidationException$: StaticErrorSchema;
20
20
  *
21
21
  */
22
22
  export declare const errorTypeRegistries: TypeRegistry[];
23
+ export declare var Bm25Score$: StaticStructureSchema;
23
24
  export declare var CreateIndexInput$: StaticStructureSchema;
24
25
  export declare var CreateIndexOutput$: StaticStructureSchema;
25
26
  export declare var CreateVectorBucketInput$: StaticStructureSchema;
@@ -54,6 +55,8 @@ export declare var ListVectorBucketsOutput$: StaticStructureSchema;
54
55
  export declare var ListVectorsInput$: StaticStructureSchema;
55
56
  export declare var ListVectorsOutput$: StaticStructureSchema;
56
57
  export declare var MetadataConfiguration$: StaticStructureSchema;
58
+ export declare var MetadataConfigurationAdd$: StaticStructureSchema;
59
+ export declare var MetadataConfigurationDelete$: StaticStructureSchema;
57
60
  export declare var PutInputVector$: StaticStructureSchema;
58
61
  export declare var PutVectorBucketDefaultIndexModeInput$: StaticStructureSchema;
59
62
  export declare var PutVectorBucketDefaultIndexModeOutput$: StaticStructureSchema;
@@ -62,14 +65,20 @@ export declare var PutVectorBucketPolicyOutput$: StaticStructureSchema;
62
65
  export declare var PutVectorsInput$: StaticStructureSchema;
63
66
  export declare var PutVectorsOutput$: StaticStructureSchema;
64
67
  export declare var QueryOutputVector$: StaticStructureSchema;
68
+ export declare var QueryScores$: StaticStructureSchema;
69
+ export declare var QueryText$: StaticStructureSchema;
65
70
  export declare var QueryVectorsInput$: StaticStructureSchema;
66
71
  export declare var QueryVectorsOutput$: StaticStructureSchema;
67
72
  export declare var TagResourceInput$: StaticStructureSchema;
68
73
  export declare var TagResourceOutput$: StaticStructureSchema;
74
+ export declare var TextSearchConfiguration$: StaticStructureSchema;
75
+ export declare var TextSearchConfigurationKey$: StaticStructureSchema;
69
76
  export declare var UntagResourceInput$: StaticStructureSchema;
70
77
  export declare var UntagResourceOutput$: StaticStructureSchema;
71
78
  export declare var UpdateIndexModeInput$: StaticStructureSchema;
72
79
  export declare var UpdateIndexModeOutput$: StaticStructureSchema;
80
+ export declare var UpdateMetadataConfigurationInput$: StaticStructureSchema;
81
+ export declare var UpdateMetadataConfigurationOutput$: StaticStructureSchema;
73
82
  export declare var ValidationExceptionField$: StaticStructureSchema;
74
83
  export declare var VectorBucket$: StaticStructureSchema;
75
84
  export declare var VectorBucketSummary$: StaticStructureSchema;
@@ -95,3 +104,4 @@ export declare var QueryVectors$: StaticOperationSchema;
95
104
  export declare var TagResource$: StaticOperationSchema;
96
105
  export declare var UntagResource$: StaticOperationSchema;
97
106
  export declare var UpdateIndexMode$: StaticOperationSchema;
107
+ export declare var UpdateMetadataConfiguration$: StaticOperationSchema;
@@ -64,6 +64,10 @@ import {
64
64
  UpdateIndexModeCommandInput,
65
65
  UpdateIndexModeCommandOutput,
66
66
  } from "./commands/UpdateIndexModeCommand";
67
+ import {
68
+ UpdateMetadataConfigurationCommandInput,
69
+ UpdateMetadataConfigurationCommandOutput,
70
+ } from "./commands/UpdateMetadataConfigurationCommand";
67
71
  import { S3VectorsClient } from "./S3VectorsClient";
68
72
  export interface S3VectorsRequestOptions extends __HttpHandlerOptions {
69
73
  metricsRecorder?: __MetricsRecorder<unknown>;
@@ -348,6 +352,20 @@ export interface S3Vectors {
348
352
  options: S3VectorsRequestOptions,
349
353
  cb: (err: any, data?: UpdateIndexModeCommandOutput) => void,
350
354
  ): void;
355
+ updateMetadataConfiguration(): Promise<UpdateMetadataConfigurationCommandOutput>;
356
+ updateMetadataConfiguration(
357
+ args: UpdateMetadataConfigurationCommandInput,
358
+ options?: S3VectorsRequestOptions,
359
+ ): Promise<UpdateMetadataConfigurationCommandOutput>;
360
+ updateMetadataConfiguration(
361
+ args: UpdateMetadataConfigurationCommandInput,
362
+ cb: (err: any, data?: UpdateMetadataConfigurationCommandOutput) => void,
363
+ ): void;
364
+ updateMetadataConfiguration(
365
+ args: UpdateMetadataConfigurationCommandInput,
366
+ options: S3VectorsRequestOptions,
367
+ cb: (err: any, data?: UpdateMetadataConfigurationCommandOutput) => void,
368
+ ): void;
351
369
  paginateListIndexes(
352
370
  args?: ListIndexesCommandInput,
353
371
  paginationConfig?: Pick<
@@ -93,6 +93,10 @@ import {
93
93
  UpdateIndexModeCommandInput,
94
94
  UpdateIndexModeCommandOutput,
95
95
  } from "./commands/UpdateIndexModeCommand";
96
+ import {
97
+ UpdateMetadataConfigurationCommandInput,
98
+ UpdateMetadataConfigurationCommandOutput,
99
+ } from "./commands/UpdateMetadataConfigurationCommand";
96
100
  import {
97
101
  ClientInputEndpointParameters,
98
102
  ClientResolvedEndpointParameters,
@@ -121,7 +125,8 @@ export type ServiceInputTypes =
121
125
  | QueryVectorsCommandInput
122
126
  | TagResourceCommandInput
123
127
  | UntagResourceCommandInput
124
- | UpdateIndexModeCommandInput;
128
+ | UpdateIndexModeCommandInput
129
+ | UpdateMetadataConfigurationCommandInput;
125
130
  export type ServiceOutputTypes =
126
131
  | CreateIndexCommandOutput
127
132
  | CreateVectorBucketCommandOutput
@@ -143,7 +148,8 @@ export type ServiceOutputTypes =
143
148
  | QueryVectorsCommandOutput
144
149
  | TagResourceCommandOutput
145
150
  | UntagResourceCommandOutput
146
- | UpdateIndexModeCommandOutput;
151
+ | UpdateIndexModeCommandOutput
152
+ | UpdateMetadataConfigurationCommandOutput;
147
153
  export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> {
148
154
  requestHandler?: __HttpHandlerUserInput;
149
155
  sha256?: __ChecksumConstructor | __HashConstructor;