Function Description

Feature attribute filter, which needs to be used together with the AscendIndexTS instance as an input parameter during feature retrieval.

All query vectors that call the retrieval API share the same filter. The filter matches the attributes corresponding to each feature. The information that can be compared includes the time and token ID.

The successfully matched features will participate in the subsequent retrieval process, that is, vector distance comparison and TopK sorting.

Multi-thread concurrent calling is not supported. Therefore, you need to add locks in multi-thread scenarios. Otherwise, the retrieval API may be abnormal. In addition, one device cannot be shared by different threads. 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.