我有一个带有自定义 ID 映射的域类
...
...
String ensemblGeneId
String ensemblTranscriptId
String ensemblProteinId
String proteinSequence
String topologySequence
String topologyRatio
String description
String geneName
..
..
..
static mapping = {
proteinSequence type:'text'
topologySequence type:'text'
description type:'text'
id name:'ensemblProteinId', generator:'assigned'
}
我在使用可搜索插件时遇到问题
我将以下内容添加到课程中
static searchable = {
id name:'ensemblProteinId'
except = ['topologySequence','proteinSequence']
}
数据插入完成后收到以下错误
2010-07-06 13:35:08,091 [http-8080-1] ERROR errors.GrailsExceptionResolver - Id with path [$/Protein/id] for alias [Protein] not found
org.compass.core.engine.SearchEngineException: Id with path [$/Protein/id] for alias [Protein] not found
似乎它仍在尝试查找名为 id 的列,而不是名为 ensemblProteinId 的列。
可搜索插件是否应该与自定义 id 列一起使用,如果是,我做错了什么?