aclfvSearch
Applicable Products
Product |
Supported |
|---|---|
× |
|
× |
|
× |
|
× |
|
√ |
|
× |
Description
Performs 1:N or N:M feature search.
Prototype
aclError aclfvSearch(aclfvSearchType type, aclfvSearchInput *searchInput, aclfvSearchResult *searchRst)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
type |
Input |
Feature search type. For the type definition, see aclfvSearchType. |
searchInput |
Input |
Pointer to the search input data structure. For the type definition, see aclfvSearchInput. The aclfvCreateSearchInput API must be called to create data of the aclfvSearchInput type before this API is called. |
searchRst |
Output |
Pointer to the search output result. For the type definition, see aclfvSearchResult. The aclfvCreateSearchResult API must be called to create data of the aclfvSearchResult type before this API is called. The queryCnt parameter in this data must be the same as that in searchInput. The number of results to return in the search output is configured via the topk parameter of the aclfvCreateSearchInput API, and is also related to the maximum topK value set during initialization via the aclfvInit API. If topk set via aclfvCreateSearchInput is greater than or equal to the maximum topK value set during initialization, the search results are returned according to the maximum topK value set during initialization. If topk set via aclfvCreateSearchInput is less than the maximum topK value set during initialization, the search results are returned according to the actual topk value set via aclfvCreateSearchInput. |
Return Value
0 on success; else, failure. For details, see aclError.
Constraints
- As this module is not thread-safe, multiple threads are not allowed to concurrently perform feature addition, search, or deletion in N:M mode.
- In 1:N or N:M mode, calling aclfvSearch without adding a repository yields zero retrieved results.
- This API call automatically creates an internal stream for synchronous execution of tasks, and this stream resource is automatically released once the execution is complete.
Due to hardware limitations, the total number of streams is limited. For details, see aclrtCreateStream in Runtime API .