feliperazeek / playframework-elasticsearch

Integrate Elastic Search in a Play! Framework Application. This module uses JPA events to notify Elastic Search of events of their own. It embeds a running Elastic Search instance for Rapid Development.
http://geeks.aretotally.in/play-framework-module-elastic-search-distributed-searching-with-json-http-rest-or-java
84 stars 43 forks source link

Can't use ES with non-JPA datasource #14

Open ccidral opened 13 years ago

ccidral commented 13 years ago

I tried to use the elasticsearch module together with the morphia (mongodb) module but it did not work. Then while reading the docs I found out that it only works with JPA actually. It would be awesome if this module did work with non-JPA datasources as well since mongodb (and other NoSQL dbs) has been gaining some serious ground recently.

By the way, thanks for sharing this awesome module. Keep up the great work!

ccidral commented 13 years ago

Seems like this issue was resolved at b7c7060c017fb17501e5 right?

bgooren commented 13 years ago

A quick look at the sourcecode of the morphia module shows that it does not post events; Those are required for this module to know when to update the index.

While adding events for adding and updating objects is rather trivial, this is not the case for update- and delete-queries. The affected objects also need to be updated or removed from the elastic search index.