elasticsearch-grails-plugin
elasticsearch-grails-plugin copied to clipboard
DB migration and elastic search
Hi,
I am using the elastic search plugin. Everything okay so far. Now, I wanted to initialize the db migration plugin as described here: http://grails-plugins.github.io/grails-database-migration/docs/manual/guide/gettingStarted.html
the docs say that there might be some problems with the searchable plugin (which I ran into). The docs suggest that I need to disable the auto index on startup, run the migration and then manually trigger the index in the bootstrap.
This is my config of the ES:
development {
elasticSearch.datastoreImpl = 'hibernateDatastore'
elasticSearch.bulkIndexOnStartup = false
elasticSearch.disableAutoIndex = true
elasticSearch.client.mode = 'local'
elasticSearch.index.store.type = 'memory' // store local node in memory and not on disk
//elasticSearch.migration.strategy = 'delete'
}
And in the bootstrap I call:
log.debug "Start indexing"
elasticSearchService.index()
log.debug "Flush Index"
elasticSearchAdminService.refresh()
BUT the plugin crashes in the first line (index) with this (not saying anything) error:
2015-07-09 16:49:31,029 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing the application: null
Message: null
Line | Method
->> 305 | doCall in org.grails.datastore.gorm.GormStaticApi$_withCriteria_closure11
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 302 | execute in org.grails.datastore.mapping.core.DatastoreUtils
| 37 | execute . . . . . . . . . . in org.grails.datastore.gorm.AbstractDatastoreApi
| 304 | withCriteria in org.grails.datastore.gorm.GormStaticApi
| 273 | doCall . . . . . . . . . . . in org.grails.plugins.elasticsearch.ElasticSearchService$_doBulkRequest_closure2_closure11
| 267 | doCall in org.grails.plugins.elasticsearch.ElasticSearchService$_doBulkRequest_closure2
| 251 | doBulkRequest . . . . . . . in org.grails.plugins.elasticsearch.ElasticSearchService
| 158 | index in ''
| 167 | index . . . . . . . . . . . in ''
| 163 | doCall in BootStrap$_closure1_closure3_closure5
| 340 | execute . . . . . . . . . . in grails.util.Environment$EnvironmentBlockEvaluator
| 321 | executeForEnvironment in grails.util.Environment
| 296 | executeForCurrentEnvironment in ''
| 262 | run in java.util.concurrent.FutureTask
| 1145 | runWorker . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run . . . . . . . . . . . . in java.lang.Thread
Error |
Forked Grails VM exited with error
I got the command from the docs... Can you give me a hint what to do or try?