本文介绍了弹性搜索 - 与java Web应用程序集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个java Web应用程序(ERP系统)。我已经完成了基本流程。现在根据客户要求,我们需要实现很少的搜索选项。 (即员工,用户,发票,库存等)

我正在计划实施一个搜索引擎。我觉得弹性搜索是我的搜索的好选择(请建议我,如果有其他好的选择)。请向我推荐一些关于如何将弹性搜索与Java( Spring + Hibernate )集成在一起的良好文档。 Web应用程序。



(指向正确的地方,如果我提出任何重复的问题。)

解决方案

我不认为还没有任何教程。前几天我开始写作。完成后,它将在elasticsearch.org网站上发布。



那就是说,我构建了一个Web应用程序,,其想法可能是如何在Web应用程序中集成弹性搜索的示例。
源代码可从获得,所以您可以从这里找到一些想法。



此外,请注意,此项目也使用了Spring以及我的。它可以帮助你。



关于Hibernate,在上一个项目中,我开始在实体上添加监听器,以自动索引或删除Elasticsearch中的文档。但最后,我删除了所有的东西,因为我认为这不是正确的方法。相反,我每次调用 merge delete DAO时,正在调用Elasticsearch索引并从我的应用程序服务层中删除方法Hibernate方法。



希望这有帮助


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

解决方案

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

这篇关于弹性搜索 - 与java Web应用程序集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 21:14
查看更多