简体   繁体   English

使用可搜索插件的Grails 3.0.5

[英]grails 3.0.5 with searchable plugin

i am trying to upgrade my application from grails 2.1.1 to grails 3.0.5 我正在尝试将我的应用程序从grails 2.1.1升级到grails 3.0.5

i get a problem to install searchable plugin... 我在安装可搜索插件时遇到问题...

i see this page.. it says "Grails version: 2.0 > *".. then it must be support for grails 3.0.5 我看到页面..它说“ Grails版本:2.0> *” ..那么它必须支持grails 3.0.5

i put mavenRepo "http://repo.grails.org/grails/core" in repositories like this.. 我把mavenRepo "http://repo.grails.org/grails/core"放在这样的存储库中。

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

and

compile ":searchable:0.6.9" in dependencies

but i get this error 但是我得到这个错误

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 配置> 0/1项目>根项目>解决依赖关系':classpath 1/1项目>解决依赖关系':agent'>解决依赖关系':agentC opy'>解决依赖关系':versionManagement'>解决依赖关系':ve

FAILURE: Build failed with an exception. 失败:构建失败,发生异常。

  • Where: Build file 'C:\\Users\\User\\Documents\\ChatV3\\build.gradle' line: 44 其中:构建文件“ C:\\ Users \\ User \\ Documents \\ ChatV3 \\ build.gradle”行:44

  • What went wrong: A problem occurred evaluating root project 'ChatV3'. 出了什么问题:评估根项目'ChatV3'时出现问题。

    Could not find method mavenRepo() for arguments [ http://repo.grails.org/grails /core] on root project 'ChatV3'. 在根项目'ChatV3'上找不到参数[ http://repo.grails.org/grails / core]的方法mavenRepo()。

  • Try: Run with --stacktrace option to get the stack trace. 尝试:使用--stacktrace选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output. 使用--info或--debug选项运行以获取更多日志输出。

BUILD FAILED 建立失败

Total time: 6.642 secs | 总时间:6.642秒| Error Error initializing classpath: Could not find method mavenRepo() for argu ments [ http://repo.grails.org/grails/core] on root project 'ChatV3'. 错误错误初始化类路径:在根项目'ChatV3'上找不到参数[ http://repo.grails.org/grails/core]的方法mavenRepo()。 (Use --stac ktrace to see the full trace) (使用--stac ktrace查看完整跟踪)

You cannot assume that any Grails plugin that works in version 2.x also works in 3.x; 您不能假设任何在2.x版本中可用的Grails插件在3.x中也可以使用; the opposite is true - assume no plugin works in 3.x until you've seen that the plugin has been updated. 相反,如果您没有看到插件已更新,则假定3.x中没有插件可以使用。 The plugin system was reworked significantly in 3.x, so all plugins have to be converted. 该插件系统在3.x中进行了重大改进,因此必须转换所有插件。 This has been done for many plugins, but there are many remaining that need updating. 许多插件已经完成了此操作,但是还有许多需要更新的地方。

Independent of that though, you don't want to use the searchable plugin in any version of Grails. 但是,与此无关,您不想在任何版本的Grails中使用可搜索的插件。 The plugin is based on Compass , but that project is basically dead - the last release was over six years ago . 该插件基于Compass ,但该项目基本上已失效-最新版本已超过6年 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. Compass的最大问题在于,由于使用基于文件的Lucene索引,因此无法完全扩展到单个服务器之外。 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. Compass的创建者继续创建了基于服务器的ElasticSearch (现在简称为“ Elastic”),并且在各个方面都明显优于Compass。 Shay Banon wrote a blog post about this a while back. 前不久,Shay Banon写了一篇有关此博客文章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM