Assume that I have such entities like the following:
@Document(collection = "doc_a")
public class A {
@Field("id")
private Integer id;
@Field("b")
private Collection<B> b;
...
}
public class B {
@Field("id")
private Integer id;
...
}
is it possible to use a compoundIndex with respect to A.id AND B.id together?
I mean maybe like:
@CompoundIndex(name = "aid_bid_idx", def = "{'id', 'b.id'}")
Thanks in advance.
See Question&Answers more detail:os