Search a knowledge store
The KnowledgeStores 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 assetType field) or by specific items (the itemId field). Use the optional searchOptions 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 groupBy 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 object contains the following property:
The SearchKnowledgeStoreFilter object 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 object contains the following property:
The VideoSearchOptions object contains the following properties:
Return value
Returns a SearchKnowledgeStoreResponse object. The SearchKnowledgeStoreResponse object contains the following properties:
Each entry in the data array is a SearchKnowledgeStoreHit. The fields present depend on the assetType field:
The VideoMatch object contains the following properties: