5

Is there a way to integrate full text search with spring data jpa? I am used to use hibernate search in my project.

Hibernate search(Hibernate Search brings the power of full text search engines to the persistence domain model by combining Hibernate Core with the capabilities of the Apache Lucene™ search engine.) can work with traditional jpa properly.

Now I am going to move to spring data jpa.What's the best practice to implement full text search?

DataNucleus
  • 15,497
  • 3
  • 32
  • 37
Tom
  • 2,857
  • 9
  • 46
  • 59

3 Answers3

3

Using Spring Data JPA shouldn't make any difference regarding the usage of your domain model for indexing. It's a thin layer on top of JPA to ease query execution to the most part.

Oliver Drotbohm
  • 80,157
  • 18
  • 225
  • 211
1

You might want to consider solr as described here

MahdeTo
  • 11,034
  • 2
  • 27
  • 28
  • I have read that article, it's good, and can be one option. But I want to use solr or lucence indirectly and transparently. Hibernate search is not good enough, but at least I won't need to write code for index every time one bean created. – Tom May 21 '12 at 06:14
  • You are right. Goodluck in this case and I hope when you find a way you'd share it with us. – MahdeTo May 22 '12 at 10:50
1

This project here is built upon solrj and spring but does not have a spring-data integration yet. So you'll still have to take care of indexing yourself. But nevertheless you may want to have a look.

Christoph Strobl
  • 6,491
  • 25
  • 33
  • Thanks,I will take a look at this project. And I am going to use jpa data for "direct search",and use solr itself directly for full text search. – Tom Jun 21 '12 at 03:23