首页 > 解决方案 > Aerospike:如何对二级索引执行 IN 查询

问题描述

如何在二级索引的 aerospike 中执行(类似 sql 的)IN 查询。我们需要一个UDF吗?

像这样:Select * from ns.set where si_bin in (1,2,3)

java aerospike 客户端有什么可用的吗?

PS:不想要范围查询或那种排序。

标签: predicateaerospike

解决方案


您可以使用谓词过滤。https://www.aerospike.com/docs/guide/predicate.html

用于谓词过滤的Python 客户端文档包含使用aerospike.predexp帮助程序的示例。

Java 客户端在 repo 中有类的示例。PredExp


推荐阅读