确切地看到我的博客文章:具有关系索引实体的有效关键字搜索和Google数据存储区的Objectify。它讨论了使用关系索引实体和Objectify通过列表属性实现搜索。
总结一下:
Query<documentKeywords> query = ofy.query(documentKeywords.class); for (String keyword : keywords) { query = query.filter("keywords", keyword); } Set<Key<document>> keys = query.<document>fetchParentKeys(); Collection<document> documents = ofy.get(keys).values();其中
documentKeywords包含
document其实体的所有关键字的列表属性(集合),而
document实体是的父级
documentKeywords。



