带有可搜索插件的 grails 3.0.5

grails 3.0.5 with searchable plugin

我正在尝试将我的应用程序从 grails 2.1.1 升级到 grails 3.0.5

我在安装可搜索插件时遇到问题...

我看到 this 页..它说 "Grails version: 2.0 > *".. 那么它必须支持 grails 3.0.5

我把 mavenRepo "http://repo.grails.org/grails/core" 放在这样的存储库中..

repositories {
    mavenLocal()
    maven { url "https://repo.grails.org/grails/core" }
    mavenRepo "http://repo.grails.org/grails/core"
}

compile ":searchable:0.6.9" in dependencies

但我得到这个错误

C:\Users\User\Documents\ChatV3>grails run-app

Configuring > 0/1 projects > root project > Resolving dependencies ':classpath 1/1 projects > Resolving dependencies ':agent' > Resolving dependencies ':agentC opy' > Resolving dependencies ':versionManagement' > Resolving dependencies ':ve

失败:构建失败,出现异常。

构建失败

总时间:6.642 秒 |错误初始化类路径时出错:找不到 argu 的方法 mavenRepo() 在根项目 'ChatV3' 上评论 [http://repo.grails.org/grails/core]。 (使用--stac ktrace 查看完整跟踪)

您不能假设任何适用于版本 2.x 的 Grails 插件也适用于 3.x;反之亦然 - 假设没有插件在 3.x 中工作,直到您看到插件已更新。插件系统在 3.x 中进行了重大修改,因此必须转换所有插件。许多插件已完成此操作,但仍有许多插件需要更新。

尽管如此,您不想在任何版本的 Grails 中使用可搜索插件。该插件基于前一段时间的 Compass, but that project is basically dead - the last release was over six years ago. The big problem with Compass is that it doesn't scale well at all beyond a single server because it uses a file-based Lucene index. The creator of Compass went on to create ElasticSearch (now called just "Elastic") which is server-based and significantly better than Compass in every way. Shay Banon wrote a blog post about this