Elastic search - integrate with java web application

匆匆过客 提交于 2019-12-03 14:20:26

I don't think there is yet really any tutorial. I started writing one some days ago. When finished it will be published on elasticsearch.org website.

That said, I built a web application, ScrutMyDocs, with the idea that it could be an example of "how to integrate Elasticsearch in a Web App". Source code is available on Github so you can find some ideas from here.

Also, note that this project uses Spring as well and my Spring factories for Elasticsearch project. It could help you also.

About Hibernate, on a previous project, I started to add listeners on entities to automatically index or remove documents in Elasticsearch. But at the end, I removed all that stuff because I think it's not the right way to do that. Instead, I was calling Elasticsearch index and remove methods from my application Service Layer each time I was calling merge or delete DAO Hibernate methods.

Hope this helps

You can find a possible approach to integrate it into your application here: http://blog.pixxis.be/post/78314594445/how-to-integrate-elasticsearch-into-your-application

Grtz, Gert

To build a Java web app which is using Hibernate ORM, the best solution to integrate Elasticsearch is to use Hibernate Search as it's designed specifically for this purpose.

The previously accepted answer was fine, but is now outdated (I'm writing this 4 years later).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!