gpt4 book ai didi

java - Oracle DB 等关系数据库的搜索引擎实现

转载 作者:行者123 更新时间:2023-12-02 11:18:52 25 4
gpt4 key购买 nike

我需要为 Oracle 等关系数据库创建一个搜索引擎。我必须在 Elastic Search 的帮助下创建一个搜索引擎。经过一周的分析仍然不确定;我应该遵循什么样的架构来满足这个需求。

Spring boot-spring data-elasticsearch
Spring data-elasticsearch
Spring boot-hibernatesearch

在此之后,我浏览了这个网站,对 hibernate 搜索有了一些了解。

http://hibernate.org/search/releases/5.9/

仍然不太清楚我必须遵循哪一个来实现关系数据库的搜索引擎。有什么建议吗?

像附加的搜索组件一样引用的搜索引擎。

enter image description here

最佳答案

如果您的问题是使用 Spring-Data 还是 Hibernate Search,那么您可能需要查看 my answer to this other question .

引用:

I'm obviously biased since I am a Hibernate developer, but I can at least provide some elements focused on Hibernate Search. As to which is "better", that's for you to judge.

The main difference is that Hibernate Search provides integration between JPA and your index of choice (Lucene or Elasticsearch):

  • Hibernate Search will automatically add/update/delete documents in your full-text index according to changes in your JPA entities (as soon as you commit a transaction).
  • Hibernate Search will allow your to build a full-text query (full-text world), and retrieve the results as managed entities (JPA world).

As far as I understand, Spring-Data-Elasticsearch is focused on accessing Elasticsearch and has no JPA integration whatsoever. That is to say, you can use Spring-Data-JPA, and you can use Spring-Data-Elasticsearch, but they won't communicate with each other. You will have two separate models, which you will update and query separately.

Some other elements:

  • If you don't need a distributed index, Hibernate Search can run in embedded Lucene mode, without all the Elasticsearch stack. It will probably be more lightweight.
  • Hibernate Search is currently not very flexible when it comes to customizing your Elasticsearch mapping or using advanced Elasticsearch features, because of the abstraction layer. That will change in the future, though (Hibernate Search 6).
  • A Spring-Data-HibernateSearch module is in the works, allowing to benefit from the best of both worlds. It hasn't been released yet and is not really well documented yet, though: https://github.com/snowdrop/spring-boot-hibernate-search-booster

关于java - Oracle DB 等关系数据库的搜索引擎实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50076344/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com