- Use direct retrieval methods when you know how the data should be searched, filtered, or grouped.
- Use intelligent search when you want VideoDB to interpret a natural-language request and choose the retrieval strategy.
Try the search notebook
Explore a runnable guide to searching and retrieving indexed video.
Direct retrieval methods
Let VideoDB choose the retrieval strategy
You do not always need to select a direct method yourself. Intelligent search interprets the request and uses the relevant retrieval capabilities internally.search()plans retrieval for a natural-language request.search(mode="deepsearch")performs deeper, multi-step retrieval and supports follow-up sessions.ask()retrieves evidence and synthesizes a grounded answer.
One request, multiple video signals
Consider this request:Find moments where someone discusses Nike while holding a phone outside a store.A useful answer may depend on several indexed signals:
With intelligent search, the application sends the goal rather than manually coordinating each retrieval step:
return_fields.
Intelligent Search
Learn when to use Search, DeepSearch, and Ask.
Index selection at a glance
With direct retrieval, you choose the indexes. With intelligent search, VideoDB selects them based on your request and the available index schemas.
Plural selectors (
index_names, index_ids) support multi-index retrieval. Singular selectors (index_name, index_id) identify one index.
How index and field targeting works
An index name searches all applicable fields inside that index. Add a field path when you want to target one specific field.transcript and ocr indexes contain a text field.
An unqualified field checks text in every index in scope where that field is present:
ocr index:
For semantic refs, an exact index-name match wins first. Otherwise, VideoDB treats the first segment as the index name and the remainder as its field path.
For
query() and aggregate(), the singular index_name or index_id already limits the operation to one index.
Direct retrieval in detail
Use the direct methods when your application should control the retrieval operation and index selection.Find similar moments with semantic_search()
Use semantic search when you know the meaning you want to match and which semantic indexes should be searched.
Filters must use fields supported by the indexes available to the search. Inspect an index’s
field_schema before relying on a field or operator in production.Apply exact conditions with query()
Use query when you know the index and the exact conditions to apply. Query does not interpret natural language or calculate semantic similarity.
index_name or index_id.
Count and group with aggregate()
Use aggregation when you need analytics rather than matching moments. group_by is required and must reference an aggregatable field.
Shot objects. Read the aggregate rows from response["results"] and optional migration warnings with response.get("warnings", []).
Which direct method should I use?
Video and collection scope
The same methods are available at both scopes:Next steps
Intelligent Search
Let VideoDB plan retrieval or synthesize an answer.
Results and Evidence
Work with shots, timestamps, returned fields, and streams.
Collection Search
Apply retrieval methods across a video library.