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

ElasticSearch 1.2.1 Not Found, is documentation wrong? #194

Closed neilabdev closed 7 years ago

neilabdev commented 7 years ago

While experiencing issues with using Elastic Search 1.2.0 in integration test in grails 3.2.6-8, such as not being unable to refresh the database each test inside the spec using deleteIndex() or unindex(), nor being able to index without explicit indexing of the item.

 elasticSearchService.index(item) // required to index an object, item.save() doesn't seem to trigger event in test
 elasticSearchAdminService?.deleteIndex() // deletes index but can't use it on next spec as there is no index recreated
 elasticSearchService?.unindex() // doesn't delete all items in index, unless specific item specified

I thought upgrading to 1.2.1 which is said to be current in the documentation at:

http://noamt.github.io/elasticsearch-grails-plugin/docs/index.html#overriding-spring-boot-elasticsearch-version

which reads:

Current version is 1.2.1 (for Grails 2.x the latest version is 0.1.0)

And there happens to be a 1.2.1 branch in the repository. However, conversely, the documentation version may be 1.2.1, instead of the application which has branch equally designated.

The error displayed is as follow:

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app:paradesmith'.
> Could not resolve all dependencies for configuration ':app:paradesmith:runtime'.
   > Could not find org.grails.plugins:elasticsearch:1.2.1.
     Searched in the following locations:
         file:/Volumes/user/.m2/repository/org/grails/plugins/elasticsearch/1.2.1/elasticsearch-1.2.1.pom
         file:/Volumes/user/.m2/repository/org/grails/plugins/elasticsearch/1.2.1/elasticsearch-1.2.1.jar
         https://repo.grails.org/grails/core/org/grails/plugins/elasticsearch/1.2.1/elasticsearch-1.2.1.pom
         https://repo.grails.org/grails/core/org/grails/plugins/elasticsearch/1.2.1/elasticsearch-1.2.1.jar

In any case, before creating a separate issue regarding the aforementioned problems that I hoped 1.2.1 may resolve, I wan't to ensure that 1.2.0 was in fact the newest version, etc. Thanks so much for the hard work!

puneetbehl commented 7 years ago

@neilabdev Please test once again now, it should be fixed.

neilabdev commented 7 years ago

shablam! 1.2.1. is downloading just fine. Thanks so much for your efforts :)

As a side note should others face the testing issues, after looking at the tests in elasticsearch, I did notice you were manually indexing as I was, which is fine for testing. Just wasn't sure if that was normal not execute the callbacks. Thus 1.2.0 worked for me also.