Closed berinle closed 12 years ago
It seems there is an issue in Grails 2.0 with the bulk indexing on startup. Add
elasticSearch.bulkIndexOnStartup = false
in your Config.groovy for a workaround for now. I'll look into this issue asap.
Cool. Thanks Stephane. That works. Awesome plugin by the way. Keep up the good work!
Lol it was Manuarii !! :D
should be fixed with commit 19a29743a4bad84ad618d9b8dca26223d40f832b
Apologies for double posting...
So I start a vanilla grails application, create an entity, a service with one method to save some instances of my entity and then in BootStrap.groovy, I call the service method.
I then added elasticsearch plugin.
Now when I invoke run-app, I get an error
Caused by CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.SessionException: Session is closed!
which makes no sense, since services has a transaction wired in by default.
My domain: class Foo {
}
My service: class SimpleService {
}
Bootstrap: class BootStrap {
}
If I remove
static searchable = true
on the domain, the error goes away and things work as expected.
Can someone please shed some light on this?
Thanks.
PS: You can find the sample project @ https://github.com/berinle/grails-search-app, if you want something to test with or see the error in action.
Also: I posted on the grails user forum @ http://grails.1312388.n4.nabble.com/elastic-search-plugin-mysteries-td4366648.html