create_featured_results_set
async
¶
create_featured_results_set(
index_id: IndexId,
featured_results_set_name: FeaturedResultsSetName,
*,
config_overrides: Optional[AsynckendraClientConfig] = None,
description: Optional[FeaturedResultsSetDescription] = None,
client_token: Optional[ClientTokenName] = None,
status: Optional[FeaturedResultsSetStatus] = None,
query_texts: Optional[QueryTextList] = None,
featured_documents: Optional[FeaturedDocumentList] = None,
tags: Optional[TagList] = None,
) -> CreateFeaturedResultsSetResponse
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.
Parameters:
-
index_id(IndexId) –The identifier of the index that you want to use for featuring results.
-
featured_results_set_name(FeaturedResultsSetName) –A name for the set of featured results.
-
description(Optional[FeaturedResultsSetDescription], default:None) –A description for the set of featured results.
-
client_token(Optional[ClientTokenName], default:None) –A token that you provide to identify the request to create a set of featured results. Multiple calls to the
CreateFeaturedResultsSetAPI with the same client token will create only one featured results set. -
status(Optional[FeaturedResultsSetStatus], default:None) –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 toACTIVEorINACTIVEusing the UpdateFeaturedResultsSet API. The queries you specify for featured results must be unique per featured results set for each index, whether the status isACTIVEorINACTIVE. -
query_texts(Optional[QueryTextList], default:None) –A list of queries for featuring results. For more information on the list of queries, see FeaturedResultsSet.
-
featured_documents(Optional[FeaturedDocumentList], default:None) –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.
-
tags(Optional[TagList], default:None) –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:_ . : / = + - @.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this action. Please ensure you have the required permission policies and user accounts and try again.
-
ConflictException–A conflict occurred with the request. Please fix any inconsistences with your resources and try again.
-
FeaturedResultsConflictException–An error message with a list of conflicting queries used across different sets of featured results. This occurred with the request for a new featured results set. Check that the queries you specified for featured results are unique per featured results set for each index.
-
InternalServerException–An issue occurred with the internal server used for your Amazon Kendra service. Please wait a few minutes and try again, or contact Support for help.
-
ResourceNotFoundException–The resource you want to use doesn’t exist. Please check you have provided the correct resource and try again.
-
ThrottlingException–The request was denied due to request throttling. Please reduce the number of requests and try again.
-
ValidationException–The input fails to satisfy the constraints set by the Amazon Kendra service. Please provide the correct input and try again.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_kendra/_services/async_kendra.py
1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 | |