kendra / Client / create_featured_results_set
create_featured_results_set#
- kendra.Client.create_featured_results_set(**kwargs)#
Creates a set of featured results to display at the top of the search results page. Featured results are placed above all other results for certain queries. You map specific queries to specific documents for featuring in the results. If a query contains an exact match, then one or more specific documents are featured in the search results.
You can create up to 50 sets of featured results per index. You can request to increase this limit by contacting Support.
See also: AWS API Documentation
Request Syntax
response = client.create_featured_results_set( IndexId='string', FeaturedResultsSetName='string', Description='string', ClientToken='string', Status='ACTIVE'|'INACTIVE', QueryTexts=[ 'string', ], FeaturedDocuments=[ { 'Id': 'string' }, ], Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
- Parameters:
IndexId (string) –
[REQUIRED]
The identifier of the index that you want to use for featuring results.
FeaturedResultsSetName (string) –
[REQUIRED]
A name for the set of featured results.
Description (string) – A description for the set of featured results.
ClientToken (string) – A token that you provide to identify the request to create a set of featured results. Multiple calls to the
CreateFeaturedResultsSet
API with the same client token will create only one featured results set.Status (string) – The current status of the set of featured results. When the value is
ACTIVE
, featured results are ready for use. You can still configure your settings before setting the status toACTIVE
. You can set the status toACTIVE
orINACTIVE
using the UpdateFeaturedResultsSet API. The queries you specify for featured results must be unique per featured results set for each index, whether the status isACTIVE
orINACTIVE
.QueryTexts (list) –
A list of queries for featuring results. For more information on the list of queries, see FeaturedResultsSet.
(string) –
FeaturedDocuments (list) –
A list of document IDs for the documents you want to feature at the top of the search results page. For more information on the list of documents, see FeaturedResultsSet.
(dict) –
A featured document. This document is displayed at the top of the search results page, placed above all other results for certain queries. If there’s an exact match of a query, then the document is featured in the search results.
Id (string) –
The identifier of the document to feature in the search results. You can use the Query API to search for specific documents with their document IDs included in the result items, or you can use the console.
Tags (list) –
A list of key-value pairs that identify or categorize the featured results set. You can also use tags to help control access to the featured results set. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols:_ . : / = + - @.
(dict) –
A key-value pair that identifies or categorizes an index, FAQ, data source, or other resource. TA tag key and value can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.
Key (string) – [REQUIRED]
The key for the tag. Keys are not case sensitive and must be unique for the index, FAQ, data source, or other resource.
Value (string) – [REQUIRED]
The value associated with the tag. The value may be an empty string but it can’t be null.
- Return type:
dict
- Returns:
Response Syntax
{ 'FeaturedResultsSet': { 'FeaturedResultsSetId': 'string', 'FeaturedResultsSetName': 'string', 'Description': 'string', 'Status': 'ACTIVE'|'INACTIVE', 'QueryTexts': [ 'string', ], 'FeaturedDocuments': [ { 'Id': 'string' }, ], 'LastUpdatedTimestamp': 123, 'CreationTimestamp': 123 } }
Response Structure
(dict) –
FeaturedResultsSet (dict) –
Information on the set of featured results. This includes the identifier of the featured results set, whether the featured results set is active or inactive, when the featured results set was created, and more.
FeaturedResultsSetId (string) –
The identifier of the set of featured results.
FeaturedResultsSetName (string) –
The name for the set of featured results.
Description (string) –
The description for the set of featured results.
Status (string) –
The current status of the set of featured results. When the value is
ACTIVE
, featured results are ready for use. You can still configure your settings before setting the status toACTIVE
. You can set the status toACTIVE
orINACTIVE
using the UpdateFeaturedResultsSet API. The queries you specify for featured results must be unique per featured results set for each index, whether the status isACTIVE
orINACTIVE
.QueryTexts (list) –
The list of queries for featuring results.
Specific queries are mapped to specific documents for featuring in the results. If a query contains an exact match, then one or more specific documents are featured in the results. The exact match applies to the full query. For example, if you only specify ‘Kendra’, queries such as ‘How does kendra semantically rank results?’ will not render the featured results. Featured results are designed for specific queries, rather than queries that are too broad in scope.
(string) –
FeaturedDocuments (list) –
The list of document IDs for the documents you want to feature at the top of the search results page. You can use the Query API to search for specific documents with their document IDs included in the result items, or you can use the console.
You can add up to four featured documents. You can request to increase this limit by contacting Support.
Specific queries are mapped to specific documents for featuring in the results. If a query contains an exact match, then one or more specific documents are featured in the results. The exact match applies to the full query. For example, if you only specify ‘Kendra’, queries such as ‘How does kendra semantically rank results?’ will not render the featured results. Featured results are designed for specific queries, rather than queries that are too broad in scope.
(dict) –
A featured document. This document is displayed at the top of the search results page, placed above all other results for certain queries. If there’s an exact match of a query, then the document is featured in the search results.
Id (string) –
The identifier of the document to feature in the search results. You can use the Query API to search for specific documents with their document IDs included in the result items, or you can use the console.
LastUpdatedTimestamp (integer) –
The Unix timestamp when the set of featured results was last updated.
CreationTimestamp (integer) –
The Unix timestamp when the set of featured results was created.
Exceptions
kendra.Client.exceptions.ResourceNotFoundException
kendra.Client.exceptions.AccessDeniedException
kendra.Client.exceptions.FeaturedResultsConflictException
kendra.Client.exceptions.ValidationException
kendra.Client.exceptions.ThrottlingException
kendra.Client.exceptions.ConflictException
kendra.Client.exceptions.InternalServerException