Search a knowledge store
The KnowledgeStoresClient class provides the search method to search across the items in a knowledge store using natural language.
Methods
Search a knowledge store
Description: This method searches a knowledge store using natural language and returns matching video clips and images ranked by relevance.
Provide your natural-language query in the query.text field. Use the filter parameter to choose which items to search: by type of item (the asset_type field) or by specific items (the item_id field). Use the optional search_options parameter to control how videos are matched (by visual content, audio, or both). If you omit it, videos are matched on their visual content. Images are always matched on their visual content.
By default, each result is an individual match: a video clip or an image. Set the group_by parameter to item to group clips under their parent item.
Note
This method is rate-limited. For details, see the Rate limits page.
Function signature and example:
Parameters
The KnowledgeStoreSearchQuery class contains the following property:
The SearchKnowledgeStoreFilter class narrows results to specific items in the knowledge store. Filter by type of item or by specific identifiers. When you specify both fields, the platform applies all conditions together. It contains the following properties:
The SearchKnowledgeStoreOptions class contains the following property:
The VideoSearchOptions class contains the following properties:
Return value
Returns a SearchKnowledgeStoreResponse object. The SearchKnowledgeStoreResponse class contains the following properties:
Each entry in the data array is a SearchKnowledgeStoreHit. The fields present depend on the asset_type field:
The VideoMatch class contains the following properties: