Hi Kaspar,
As far as formal integration goes, I was doing a search of the MongoDB
docs and discussion a few weeks ago for what to do about full-text
search, and ES was discussed a candidate, but nothing is officially
recommended or integrated yet.
I've just started building a Rails app that uses MongoDB via Mongoid
and ES via tire. It's working well so far. Updating Mongoid models
will automatically send updates to ES.
I haven't gotten to attachments yet, but I believe you encode the data
in Base64 and put in a JSON request to ES for indexing. I plan to
start with that over the coming weeks.
I guess you're looking for more direct integration, but what
specifically? Something like the CouchDB river might indeed be good.
There are no triggers in Mongo (here is the discussion of including
them in the future: https://jira.mongodb.org/browse/SERVER-124).
However, there is the "oplog", which is a fixed size, rotating log of
operations, and which is used for replication. You can use a tailable
cursor to follow all changes and respond to them, but you should
probably be careful to deal gracefully with the case of your cursor
dying if entries are expired from the log before you've dealt with
them (http://www.mongodb.org/display/DOCS/Tailable+Cursors).
Some people are doing DIY triggers by tailing the oplog:
http://www.snailinaturtleneck.com/blog/2010/10/27/bending-the-oplog-to-your-will/
http://groups.google.com/group/mongodb-user/browse_thread/thread/5c18b630399d996e
For now I'm happy to handle it at the app framework/app level.
Hope that helps!
Chris
On Sun, Jun 26, 2011 at 4:56 PM, hbf kf@iaeth.ch wrote:
Dear everybody,
I have seen several messages on this forum [1,2] that ask for or
describe approaches to integrate Elastic Search into MongoDB. Has
there been any recent development on this? How hard is it to get it
done?
I am looking for a document store that can save attachments in form of
Office-, PDF-, etc. documents and provides full-text search.
Many thanks for any updates or pointers,
Kaspar
[1] http://elasticsearch-users.115913.n3.nabble.com/ES-with-Mongodb-tp1980927p1980927.html
[2] http://elasticsearch-users.115913.n3.nabble.com/ES-and-MongoDB-integration-td1209794.html