I would like to use this solution for my site on Heroku so I can index using the MongoDB does anyone know of a good tutorial or book that gives an in depth example of how to do this? Googling didn’t really turn up anything for me.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I spent a long time on this because I was so new to Mongo DB and hadn’t planned on using it until it seemed like a good solution for a search implementation on Heroku. I thought I would add this answer to help anyone else who wanted to do the same thing.
I used code from the lucene mongo db project located here:
https://github.com/mongoutils/mongo-lucene
Then created my own hibernate search directory provider class that interfaces with the lucene mongo db project. I used the org.hibernate.search.store.impl.RAMDirectoryProvider class as an outline to follow.
All thats left to do is to have your hibernate configuration point to your new class:
Here is my MongoLuceneDirectoryProvider class: