java - 通过java客户端查询主键 - Aerospike

标签 java aerospike

我正在尝试通过 aeropsike 的 java 客户端模拟查询 Select * from namespace.set where pk="something" 。我知道我们可以通过“Filter”查询二级索引,并为其他谓词创建“PredExp”,但我无法弄清楚如何查询主键。 任何帮助,将不胜感激。预先非常感谢。

编辑:我的集合中有多个垃圾箱,如果这有什么区别的话。

最佳答案

我明白了。您只需在通过 java aerospike 客户端查询时创建一个“新 key ”即可。

记录 record = aerospikeClient.get(null, new Key(namespace, cacheName, key), binNames)

引用讨论:https://discuss.aerospike.com/t/primary-key-search/558/6

关于java - 通过java客户端查询主键 - Aerospike,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66882456/

相关文章:

node.js - 使用 Aerospike Nodejs 客户端进行分页

aerospike - 检查 Aerospike 中的碎片

performance - 用于快速读取和快速写入的高性能数据库。没有更新或删除

java - 警报对话框未出现

c# - 相当于 C# Action.BeginInvoke 的 Java

java - Spring MVC 请求中断 Hook

node.js - Aerospike NodeJS UDF 聚合错误

in-memory-database - Nosql数据库哪个Key值能保证掉电不丢失数据?

java - Cobertura Eclipse 插件本地站点 - 下载为 Zip

java - Spring 和作用域属性