Elastic search - integrate with java web application

女生的网名这么多〃 提交于 2020-01-01 05:19:36

问题


I am developing a java web application (ERP system). I have completed basic flows. Now as per my client requirement, we need to implement few search options. (i.e. Employees, Users, Invoices, Inventory, etc.)
I am planning to implement a search engine for this. I feel Elastic search is good option for my search (Please suggest me, if any other good options).

Please suggest me some good documentation, on how to integrate Elastic search with a java(Spring+Hibernate) web application.

(Point me to right place, if I am asking any repeated question.)


回答1:


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




回答2:


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




回答3:


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).



来源:https://stackoverflow.com/questions/16331494/elastic-search-integrate-with-java-web-application

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