noamt / elasticsearch-grails-plugin

The revived ElasticSearch grails plugin
Based on Graeme Rocher initial stub. Note that it is still in early stage.
Other
63 stars 83 forks source link

1.0.0.2 ClassNotFound error with FilterBuilder #188

Closed mtgleeson closed 6 years ago

mtgleeson commented 7 years ago

I'm in the process of upgrading my Grails app from 2.4.4 to 3.2. I've upgraded the elasticsearch plugin to 1.0.0.2 (my elastic search ver is 1.x). I'm getting a ClassNotFound exception on org.elasticsearch.index.query.FilterBuilder. It's referenced in the ElasticSearchService class for 1.0.0.2. I checked the elasticsearch jar, version 2.4.1 is being pulled in which doesn't have the FilterBuilder.There seems to be a dependency conflict with version 1.6.0. Elasticsearch 1.6.0 does have FilterBuilder so I've forced Gradle to use vers 1.6.0. I haven't run the application yet so I'm not sure if ver 1.6.0 is safe to use. Is this a known issue?

gradle dependencyInsight --dependency org.elasticsearch :dependencyInsight org.elasticsearch:elasticsearch:2.4.1 (selected by rule)

org.elasticsearch:elasticsearch:1.6.0 -> 2.4.1 --- org.elasticsearch:elasticsearch-mapper-attachments:2.6.0 --- org.grails.plugins:elasticsearch:1.0.0.2 --- compile

org.elasticsearch:elasticsearch-mapper-attachments:2.6.0 --- org.grails.plugins:elasticsearch:1.0.0.2 --- compile

org.elasticsearch:securesm:1.0 --- org.elasticsearch:elasticsearch:2.4.1 --- org.elasticsearch:elasticsearch-mapper-attachments:2.6.0 --- org.grails.plugins:elasticsearch:1.0.0.2 --- compile

puneetbehl commented 7 years ago

Hi @mtgleeson, the latest version is 1.2.0. Please use the same when updating to Grails 3. http://grails.org/plugins.html#plugin/elasticsearch

mtgleeson commented 7 years ago

Hi @puneetbehl, according to the docs, for Elastic Search version 1.6.x and Grails 3.x I should be using version 1.0.0.x of the plugin https://github.com/noamt/elasticsearch-grails-plugin. Maybe the docs need to be updated? After struggling to get plugin working I've since upgraded to ES 2.3.x and ver 1.2.0 of the plugin and that works fine. Cheers for the reply.

puneetbehl commented 7 years ago

@mtgleeson I will update the documentation but pull requests are most welcome :-)