【发布时间】:2019-07-16 17:48:08
【问题描述】:
我有两节课。
class A {
String aName;
B b;
public A(String aName, B b) {
this.aName = aName;
this.b = b;
}
public String getaName() {
return aName;
}
public B getB() {
return b;
}
}
class B {
String bName;
public B(String bName) {
this.bName = bName;
}
public String getbName() {
return bName;
}
}
我将 A 作为一组存储在 Aerospike 中,A.aName 是主键。我想要 A.b. 上的辅助键我已经在 A.b 属性上创建了索引并且也能够持久化。但是从索引中搜索没有返回任何内容。据我了解,Aerospike 仅支持三种类型的索引:字符串、数字和地理。有没有自定义对象的选项。
【问题讨论】:
-
交叉发布到 Aerospike 的论坛:discuss.aerospike.com/t/secondary-index-on-custom-java-object/…
标签: aerospike