Function: repo_add
Description
Adds a repository, or adds features to an existing repository. In this section, 1:N indicates the number of search requests divided by the number of base libraries. N:M is used to compare the similarity between two libraries.
The
Prototype
- C Prototype
1aclError aclfvRepoAdd(aclfvSearchType type, aclfvFeatureInfo *featureInfo)
- Python Function
1ret = acl.fv.repo_add(type, feature_info)
Parameters
|
Parameter |
Description |
|---|---|
|
type |
Search type. The value is of the int type. For details, see aclfvSearchType. |
|
feature_info |
|
Return Value
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code.
|
Restrictions
- In 1:N mode, ensure that the offsets in the aclfvFeatureInfo dictionary are consecutive for each repository. In N:M mode, if the offset is not 0, an error is reported.
- In N:M mode, multithreaded adding, search, or deletion is not allowed.
- This API call automatically creates a stream for synchronous task execution within the API. When the tasks are complete, the stream is automatically destroyed.
Due to hardware restrictions, the total number of streams is limited. For details, see the description of Function: create_stream.
Parent topic: API for feature vector search (Python)