2015-09-04 20 views
0

對於Orient-DB中的單個鍵索引,我可以這樣做。使用OIndex.get()的orient-db查詢複合索引

OIndex<?> inx = database.getMetadata().getIndexManager().getIndex("Profile.name"); 
OIdentifiable luke = inx.get("Luke"); 

現在,我該如何查詢相同的索引,如果有一個以上的關鍵?我是否需要傳遞數組,還是需要傳遞數組列表? Orient DB手冊中沒有關於組合鍵的信息。

回答

1

嘗試

index.get(new OCompositeKey(Arrays.asList(key1, key2))); 
+0

可以請你回答這個http://stackoverflow.com/q/32471152/5267016 –