我有以下代码(在 grails 和 Searchable Plugin aka Compass 中):
class Topic {
String name;
static searchable = true;
}
class Question extends BaseEntity {
String question;
static searchable = true;
static hasMany = [
topics: Topic
]
}
如何搜索具有特定主题 ID 的问题?
像 Question.search("topics#id:12") 或 Question.search("topics.id:12") 这样的东西不起作用。