Function Description
This chapter describes APIs of a spatiotemporal database. When adding features, you can configure FeatureAttr for each feature. When performing retrieval, you can configure AttrFilter for each batch of query vectors. The filter first filters out all base vectors and compares them with vectors that meet the conditions.
The following algorithms are supported:
- Binarized feature retrieval (Hamming distance): Before using this algorithm, you need to manually generate the BinaryFlat and Mask operators and move them to the corresponding modelpath directory.
- Int8Flat (cosine distance), FP16Flat (IP distance), and Int8Flat (L2 distance): Manually generate the Mask operator and move it to the corresponding modelpath directory before using them.
- Multi-thread concurrent calling is supported. You need to set the environment variable MX_INDEX_MULTITHREAD to 1, that is, export MX_INDEX_MULTITHREAD=1. If this variable is set to another value or is not set, the multi-thread function is disabled. Currently, FeatureRetrieval uses the OMP for performance acceleration. The OMP cannot be used together with other multi-thread mechanisms. If new threads are repeatedly created to use the OMP, the memory usage keeps increasing. Therefore, you are advised to use fixed threads to run retrieval tasks.
Parent topic: AscendIndexTS