我在grails上使用迁移插件(版本1.3.8 )和可搜索插件(版本0.6.5 )(版本2.3.0 )但我无法管理在迁移插件之后运行可搜索的插件。
我搜索并发现这是一个解决方案:
将此添加到 config.groovy
bulkIndexOnStartup = false
mirrorChanges = false
并将其添加到 bootstrap.groovy
searchableService.reindex()
searchableService.startMirroring()
但这没有帮助。
这是我得到的错误:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.address' in 'field list'
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
.
.
.
Error executing script DbmGormDiff: org.compass.gps.CompassGpsException: Failed to index, execution exception; nested exception is java.util.concurrent.ExecutionException: org.compass.gps.device.hibernate.HibernateGpsDeviceException: {hibernate}: Failed to index the database; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query using scroll (Use --stacktrace to see the full trace)
感谢,
答案 0 :(得分:0)
直到我得到永久解决方案,我才这样做。
<强> 1。在buildConfig.groovy中注释掉可搜索的插件 (当你运行下一个grails命令时会自动卸载它)
<强> 2。做你想做的任何迁移插件
<强> 3。取消注释buildConfig.groovy中的可搜索插件 (当您运行下一个grails命令时将自动安装)
但仍然很好奇为什么要这样做:
bulkIndexOnStartup = false
mirrorChanges = false
没有禁用插件直到bootstrap