kendra / Client / update_index
update_index#
- kendra.Client.update_index(**kwargs)#
Updates an existing Amazon Kendra index.
See also: AWS API Documentation
Request Syntax
response = client.update_index( Id='string', Name='string', RoleArn='string', Description='string', DocumentMetadataConfigurationUpdates=[ { 'Name': 'string', 'Type': 'STRING_VALUE'|'STRING_LIST_VALUE'|'LONG_VALUE'|'DATE_VALUE', 'Relevance': { 'Freshness': True|False, 'Importance': 123, 'Duration': 'string', 'RankOrder': 'ASCENDING'|'DESCENDING', 'ValueImportanceMap': { 'string': 123 } }, 'Search': { 'Facetable': True|False, 'Searchable': True|False, 'Displayable': True|False, 'Sortable': True|False } }, ], CapacityUnits={ 'StorageCapacityUnits': 123, 'QueryCapacityUnits': 123 }, UserTokenConfigurations=[ { 'JwtTokenTypeConfiguration': { 'KeyLocation': 'URL'|'SECRET_MANAGER', 'URL': 'string', 'SecretManagerArn': 'string', 'UserNameAttributeField': 'string', 'GroupAttributeField': 'string', 'Issuer': 'string', 'ClaimRegex': 'string' }, 'JsonTokenTypeConfiguration': { 'UserNameAttributeField': 'string', 'GroupAttributeField': 'string' } }, ], UserContextPolicy='ATTRIBUTE_FILTER'|'USER_TOKEN', UserGroupResolutionConfiguration={ 'UserGroupResolutionMode': 'AWS_SSO'|'NONE' } )
- Parameters:
Id (string) –
[REQUIRED]
The identifier of the index you want to update.
Name (string) – The name of the index you want to update.
RoleArn (string) – An Identity and Access Management (IAM) role that gives Amazon Kendra permission to access Amazon CloudWatch logs and metrics.
Description (string) – A new description for the index.
DocumentMetadataConfigurationUpdates (list) –
The document metadata configuration you want to update for the index. Document metadata are fields or attributes associated with your documents. For example, the company department name associated with each document.
(dict) –
Specifies the properties, such as relevance tuning and searchability, of an index field.
Name (string) – [REQUIRED]
The name of the index field.
Type (string) – [REQUIRED]
The data type of the index field.
Relevance (dict) –
Provides tuning parameters to determine how the field affects the search results.
Freshness (boolean) –
Indicates that this field determines how “fresh” a document is. For example, if document 1 was created on November 5, and document 2 was created on October 31, document 1 is “fresher” than document 2. You can only set the
Freshness
field on oneDATE
type field. Only applies toDATE
fields.Importance (integer) –
The relative importance of the field in the search. Larger numbers provide more of a boost than smaller numbers.
Duration (string) –
Specifies the time period that the boost applies to. For example, to make the boost apply to documents with the field value within the last month, you would use “2628000s”. Once the field value is beyond the specified range, the effect of the boost drops off. The higher the importance, the faster the effect drops off. If you don’t specify a value, the default is 3 months. The value of the field is a numeric string followed by the character “s”, for example “86400s” for one day, or “604800s” for one week.
Only applies to
DATE
fields.RankOrder (string) –
Determines how values should be interpreted.
When the
RankOrder
field isASCENDING
, higher numbers are better. For example, a document with a rating score of 10 is higher ranking than a document with a rating score of 1.When the
RankOrder
field isDESCENDING
, lower numbers are better. For example, in a task tracking application, a priority 1 task is more important than a priority 5 task.Only applies to
LONG
andDOUBLE
fields.ValueImportanceMap (dict) –
A list of values that should be given a different boost when they appear in the result list. For example, if you are boosting a field called “department,” query terms that match the department field are boosted in the result. However, you can add entries from the department field to boost documents with those values higher.
For example, you can add entries to the map with names of departments. If you add “HR”,5 and “Legal”,3 those departments are given special attention when they appear in the metadata of a document. When those terms appear they are given the specified importance instead of the regular importance for the boost.
(string) –
(integer) –
Search (dict) –
Provides information about how the field is used during a search.
Facetable (boolean) –
Indicates that the field can be used to create search facets, a count of results for each value in the field. The default is
false
.Searchable (boolean) –
Determines whether the field is used in the search. If the
Searchable
field istrue
, you can use relevance tuning to manually tune how Amazon Kendra weights the field in the search. The default istrue
for string fields andfalse
for number and date fields.Displayable (boolean) –
Determines whether the field is returned in the query response. The default is
true
.Sortable (boolean) –
Determines whether the field can be used to sort the results of a query. If you specify sorting on a field that does not have
Sortable
set totrue
, Amazon Kendra returns an exception. The default isfalse
.
CapacityUnits (dict) –
Sets the number of additional document storage and query capacity units that should be used by the index. You can change the capacity of the index up to 5 times per day, or make 5 API calls.
If you are using extra storage units, you can’t reduce the storage capacity below what is required to meet the storage needs for your index.
StorageCapacityUnits (integer) – [REQUIRED]
The amount of extra storage capacity for an index. A single capacity unit provides 30 GB of storage space or 100,000 documents, whichever is reached first. You can add up to 100 extra capacity units.
QueryCapacityUnits (integer) – [REQUIRED]
The amount of extra query capacity for an index and GetQuerySuggestions capacity.
A single extra capacity unit for an index provides 0.1 queries per second or approximately 8,000 queries per day. You can add up to 100 extra capacity units.
GetQuerySuggestions
capacity is five times the provisioned query capacity for an index, or the base capacity of 2.5 calls per second, whichever is higher. For example, the base capacity for an index is 0.1 queries per second, andGetQuerySuggestions
capacity has a base of 2.5 calls per second. If you add another 0.1 queries per second to total 0.2 queries per second for an index, theGetQuerySuggestions
capacity is 2.5 calls per second (higher than five times 0.2 queries per second).
UserTokenConfigurations (list) –
The user token configuration.
(dict) –
Provides the configuration information for a token.
JwtTokenTypeConfiguration (dict) –
Information about the JWT token type configuration.
KeyLocation (string) – [REQUIRED]
The location of the key.
URL (string) –
The signing key URL.
SecretManagerArn (string) –
The Amazon Resource Name (arn) of the secret.
UserNameAttributeField (string) –
The user name attribute field.
GroupAttributeField (string) –
The group attribute field.
Issuer (string) –
The issuer of the token.
ClaimRegex (string) –
The regular expression that identifies the claim.
JsonTokenTypeConfiguration (dict) –
Information about the JSON token type configuration.
UserNameAttributeField (string) – [REQUIRED]
The user name attribute field.
GroupAttributeField (string) – [REQUIRED]
The group attribute field.
UserContextPolicy (string) – The user context policy.
UserGroupResolutionConfiguration (dict) –
Enables fetching access levels of groups and users from an IAM Identity Center (successor to Single Sign-On) identity source. To configure this, see UserGroupResolutionConfiguration.
UserGroupResolutionMode (string) – [REQUIRED]
The identity store provider (mode) you want to use to fetch access levels of groups and users. IAM Identity Center (successor to Single Sign-On) is currently the only available mode. Your users and groups must exist in an IAM Identity Center identity source in order to use this mode.
- Returns:
None
Exceptions
kendra.Client.exceptions.ValidationException
kendra.Client.exceptions.ConflictException
kendra.Client.exceptions.ResourceNotFoundException
kendra.Client.exceptions.ThrottlingException
kendra.Client.exceptions.AccessDeniedException
kendra.Client.exceptions.ServiceQuotaExceededException
kendra.Client.exceptions.InternalServerException