search_relevant_content¶
Operation¶
search_relevant_content
async
¶
search_relevant_content(input: SearchRelevantContentInput, plugins: list[Plugin] | None = None) -> SearchRelevantContentOutput
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:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
SearchRelevantContentInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
SearchRelevantContentOutput
|
An instance of |
Input¶
SearchRelevantContentInput
dataclass
¶
Dataclass for SearchRelevantContentInput structure.
Attributes¶
application_id
class-attribute
instance-attribute
¶
application_id: str | None = None
The unique identifier of the Amazon Q Business application to search.
attribute_filter
class-attribute
instance-attribute
¶
attribute_filter: AttributeFilter | None = None
Enables filtering of responses based on document attributes or metadata fields.
content_source
class-attribute
instance-attribute
¶
content_source: ContentSource | None = None
The source of content to search in.
max_results
class-attribute
instance-attribute
¶
max_results: int = 10
The maximum number of results to return.
next_token
class-attribute
instance-attribute
¶
next_token: str | None = None
The token for the next set of results. (You received this token from a previous call.)
query_text
class-attribute
instance-attribute
¶
query_text: str | None = None
The text to search for.
Output¶
SearchRelevantContentOutput
dataclass
¶
Dataclass for SearchRelevantContentOutput structure.
Attributes¶
next_token
class-attribute
instance-attribute
¶
next_token: str | None = None
The token to use to retrieve the next set of results, if there are any.
relevant_content
class-attribute
instance-attribute
¶
relevant_content: list[RelevantContent] | None = None
The list of relevant content items found.