grailsgrails-searchable

grails 3.0.5 with searchable plugin


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...

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

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"
}

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

FAILURE: Build failed with an exception.

BUILD FAILED

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)


Solution

  • 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.

    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.