使用可搜索插件的Grails 3.0.5 [英] grails 3.0.5 with searchable plugin

查看:64
本文介绍了使用可搜索插件的Grails 3.0.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

i am trying to upgrade my application from grails 2.1.1 to grails 3.0.5

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

i get a problem to install searchable plugin...

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

i see this page.. it says "Grails version: 2.0 > *".. then it must be support for grails 3.0.5

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

i put mavenRepo "http://repo.grails.org/grails/core" in repositories like this..

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

配置> 0/1项目>根项目>解决依赖项':classpath1/1项目>解决依赖关系':agent'>解决依赖关系':agentCopy'>解决依赖关系':versionManagement'>解决依赖关系':ve

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

失败:构建失败,并出现异常.

FAILURE: Build failed with an exception.

  • 其中:构建文件"C:\ Users \ User \ Documents \ ChatV3 \ build.gradle"行:44

  • Where: Build file 'C:\Users\User\Documents\ChatV3\build.gradle' line: 44

出了什么问题:评估根项目"ChatV3"时出现问题.

What went wrong: A problem occurred evaluating root project 'ChatV3'.

找不到用于参数[ http://repo.grails.org/grails/core]在根项目"ChatV3"上.

Could not find method mavenRepo() for arguments [http://repo.grails.org/grails /core] on root project 'ChatV3'.

  • 尝试:使用--stacktrace选项运行以获取堆栈跟踪.使用--info或--debug运行选项以获取更多日志输出.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    建立失败

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

    Total time: 6.642 secs | Error Error initializing classpath: Could not find method mavenRepo() for argu ments [http://repo.grails.org/grails/core] on root project 'ChatV3'. (Use --stac ktrace to see the full trace)

    推荐答案

    您不能假定任何在2.x版中可用的Grails插件也可以在3.x版中使用;反之亦然-假设您没有看到插件已更新,然后假定在3.x中没有插件可用.该插件系统在3.x中进行了重大改进,因此必须转换所有插件.许多插件已经完成了此操作,但是还有许多需要更新的插件.

    You cannot assume that any Grails plugin that works in version 2.x also works in 3.x; the opposite is true - assume no plugin works in 3.x until you've seen that the plugin has been updated. The plugin system was reworked significantly in 3.x, so all plugins have to be converted. This has been done for many plugins, but there are many remaining that need updating.

    尽管如此,您不想在任何版本的Grails中使用可搜索的插件.该插件基于指南针,但是该项目基本上已经失效-最新版本是六年多以前.Compass的最大问题在于,由于它使用基于文件的Lucene索引,因此根本无法很好地扩展到单个服务器之外.Compass的创建者继续创建了基于服务器的 ElasticSearch (现称为"Elastic").在各个方面都比Compass更好.Shay Banon不久前写了关于此的博客文章.

    Independent of that though, you don't want to use the searchable plugin in any version of Grails. The plugin is based on 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 a while back.

    这篇关于使用可搜索插件的Grails 3.0.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆