mstein / elasticsearch-grails-plugin

ElasticSearch grails plugin
Based on Graeme Rocher initial stub. Note that it is still in early stage.
Other
62 stars 164 forks source link

NPE when elasticSearch.unmarshallComponents config is missing #62

Closed micke-a closed 11 years ago

micke-a commented 11 years ago

HI

Problem: Just started using latest 0.20.6.1-SNAPSHOT and got NPEs whenever there was a search hit. Turned out it was due to new elasticSearch.unmarshallComponents config element.

Fix: Add as 'true' to default parameters?

Cheers, micke

mstein commented 11 years ago

Actually the unmarshallComponents property is set to true in the DefaultElasticSearch.groovy file in the grails-app/conf/ folder of the installed plugin. Could you check if that is the case in your installation of the plugin?

micke-a commented 11 years ago

Hi

I've got this in my app

elasticSearch{
    cluster.name = "app-"+grails.util.Environment.current
    client.mode = 'local'
    index.store.type = 'simplefs'
    path.data = "/tmp/es-data"
    defaultExcludedProperties = ['password','email','passwd']
    unmarshallComponents = true
}

I've got an admin screen where I display al the configration properties by creating a flatten:ed version of it, and in there I can only see my confg values when searching for elasticSearch....

Not quite sure what is going on, any ideas? Not causing me any issues at the moment though. Recently looked at the code for the async mail plugin which does similar config stuff and that may have a better way of merging different configs.

Cheers

mstein commented 11 years ago

You're right, the default config was not properly merged, thanks!