search_relevant_content
¶
search_relevant_content(
application_id: ApplicationId,
query_text: QueryText,
content_source: ContentSource,
*,
config_overrides: Optional[QBusinessClientConfig] = None,
attribute_filter: Optional[AttributeFilter] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[NextToken] = None,
) -> SearchRelevantContentResponse
Searches for relevant content in a Amazon Q Business application based on a query. This operation takes a search query text, the Amazon Q Business application identifier, and optional filters (such as content source and maximum results) as input. It returns a list of relevant content items, where each item includes the content text, the unique document identifier, the document title, the document URI, any relevant document attributes, and score attributes indicating the confidence level of the relevance.
Parameters:
-
application_id(ApplicationId) –The unique identifier of the Amazon Q Business application to search.
-
query_text(QueryText) –The text to search for.
-
content_source(ContentSource) –The source of content to search in.
-
max_results(Optional[MaxResults], default:None) –The maximum number of results to return.
-
next_token(Optional[NextToken], default:None) –The token for the next set of results. (You received this token from a previous call.)
Raises:
-
AccessDeniedException–You don't have access to perform this action. Make sure you have the required permission policies and user accounts and try again.
-
InternalServerException–An issue occurred with the internal server used for your Amazon Q Business service. Wait some minutes and try again, or contact Support for help.
-
LicenseNotFoundException–You don't have permissions to perform the action because your license is inactive. Ask your admin to activate your license and try again after your licence is active.
-
ResourceNotFoundException–The application or plugin resource you want to use doesn’t exist. Make sure you have provided the correct resource and try again.
-
ThrottlingException–The request was denied due to throttling. Reduce the number of requests and try again.
-
ValidationException–The input doesn't meet the constraints set by the Amazon Q Business service. 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_qbusiness/_services/q_business.py
3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 | |