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

A fresh install needs elasticSearch.datastoreImpl configured but it's easy to miss in the documentation #196

Closed goeh closed 6 years ago

goeh commented 7 years ago

Installing the plugin in a Grails application and running it gives me:

java.lang.Exception: No datastore implementation specified
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:1075)
        at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
        at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
        at ElasticsearchGrailsPlugin$_doWithSpring_closure1.doCall(ElasticsearchGrailsPlugin.groovy:131)

This is documented in the github repo README at https://github.com/noamt/elasticsearch-grails-plugin but if you just read the official user guide http://noamt.github.io/elasticsearch-grails-plugin/docs/index.html it's not stated early in the documentation that you need to configure this. It's documented under the section "Other properties". This gives a bad first-time experience for people (like me) that just installs the plugin and try to start the application.

  1. Please improve the documentation by adding a note about this configuration option
  2. (optional) Make the plugin figure out the default datastore implementation to use. The documentation mentions only two alternative values "hibernateDatastore" and "mongodbDatastore"