Search
The resources.Search
class provides methods to perform searches.
Methods
Make a search request
Description: This method performs a search across a specific index based on the provided parameters and returns the first page of results.
Function signature and example:
Parameters:
Return value: Returns a models.SearchResult
object containing the search results.
API Reference: For a detailed description of each field in the request and response, see the Any-to-video search page.
Related guides:
- Search.
- Pagination > Search results.
- Sorting > Search results
- Filtering > Search results
- Grouping and ungrouping.
Retrieve a specific page of search results
Description: This method retrieves a specific page of search results. This method provides direct pagination. Choose it mainly when the total number of items is manageable, or you must fetch a single page of results.
Function signature and example:
Parameters:
Return value: Returns a models.SearchResult
object containing the search results.
API Reference: For a description of each field in the request and response, see the Retrieve a specific page of search results page.
Related guides:
- Search.
- Pagination > Search results.
- Sorting > Search results
- Filtering > Search results
- Grouping and ungrouping.
Iterative pagination
If your application must retrieve a large number of items, use iterative pagination. To retrieve the first page of results, invoke the query
method of the search
object. To retrieve subsequent pages of results, use the iterator protocol.