Reputation: 2011
I have a requirement to create a search engine for relational database like Oracle. I have to create a search engine with the help of Elastic Search. After a week of analysis still am not sure; what kind of architecture should i follow for this requirement.
Spring boot-spring data-elasticsearch
Spring data-elasticsearch
Spring boot-hibernatesearch
After this I have gone throught this site to make some idea about hibernate search.
http://hibernate.org/search/releases/5.9/
Still am not very clear which one i have to follow to implement the search engine for relational database. Any suggestions.?
Search Engine that am referring like a search component as attached.
Upvotes: 0
Views: 1266
Reputation: 9977
If your question is about whether to use Spring-Data or Hibernate Search, then you might want to have a look at my answer to this other question.
Quoting:
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
Upvotes: 1