Questions tagged [hibernate-search]

Hibernate Search automatically extracts data from Hibernate ORM entities to push it to local Apache Lucene indexes or remote Elasticsearch indexes.

Hibernate Search provides synchronization between entities managed by Hibernate ORM and full-text indexing services like Apache Lucene and Elasticsearch.

It will automatically apply changes to indexes, which is tedious and error prone coding work, while leaving you full control on the query aspects. The development community constantly researches and refines the index writing techniques to improve performance.

Mapping your objects to the indexes is declarative, using a combination of Hibernate Search specific annotations and the knowledge it can gather from your existing Hibernate/JPA mapping.

Queries can be defined by any combination of:

  • "native" Apache Lucene queries
  • writing "native" Elasticsearch queries in JSON format (if using Elasticsearch, which is optional)
  • using a DSL which abstracts the previous two generating optimal backend specific queries

Query results can include projections to be loaded directly from the index, or can materialize fully managed Hibernate entities loaded from the database within the current transactional scope.

Hibernate Search is using Apache Lucene under the cover; this can be used directly (running embedded in the same JVM) or remotely provided by an Elasticsearch server over its REST API.

Hibernate Search is open source and contributions are welcome both as patches or comments and suggestions.

For latest news follow the Hibernate team blog.

1466 questions
4
votes
3 answers

Hibernate Search on EC2, "Unable to create index directory"

I'm trying to implement Hibernate Search on my aws application. As usual, everything works great on localhost, but when upload to aws, I receive the following error: org.hibernate.search.SearchException: Unable to create index directory:…
raonirenosto
  • 1,507
  • 5
  • 19
  • 30
4
votes
1 answer

How to integrate Hibernate and Solr together?

For people working with Hibernate to manage their objects persistence, Hibernate search is a real savior. After trying to develop similar functionality (collecting all objects changes and sending them to a full text search engine upon transaction…
Avner Levy
  • 6,601
  • 9
  • 53
  • 92
4
votes
1 answer

How to search between dates (Hibernate Search)?

I am wondering how I can search between by dates in Hibernate Search using Range-Query or is there any filter I have to implement.Following is my field in Record Entity /** * When the analysis started. */ …
Dangling Piyush
  • 3,658
  • 8
  • 37
  • 52
4
votes
1 answer

Hibernate Search on JBoss 7.1.1 Final, Weld and Seam 3

I'm running an application that uses hibernate search for looking up people in the system. I run it on JBoss AS 7.1.1 and the application is based on Seam 3, Weld and JSF 2.1. It's working smoothly but after some higher load it turns out that pages…
lukas
  • 545
  • 2
  • 7
  • 18
4
votes
2 answers

Hibernate Search: Inheritance Models

Im planning to use Hibernate Search for fulltext search on my models and im concerened whether I can continue to use InheritanceType.SINGLE_TABLE for my model hierachy or whether I have to manually create one big flat model. Basically I have two…
Sebastian Hoffmann
  • 11,127
  • 7
  • 49
  • 77
4
votes
2 answers

Multiple-index searching in Lucene (hibernate search)

Official Lucene Feautures site states that lucene supports "multiple-index searching with merged results". Is it possible to do this with hibernate search somehow? My usecase: Aricle with Comments. I want to have two separate indices: one for…
rdk
  • 2,833
  • 4
  • 20
  • 12
4
votes
2 answers

Hibernate Search (Store and Index)

What is the intension of index = Index.YES and store = Store.YES on @Field. At the end (when a search is executed) would this data be loaded from the database (search over the index and load results from database)? Why should I store the data in…
Francisco Spaeth
  • 23,493
  • 7
  • 67
  • 106
4
votes
2 answers

Combine Hibernate Criteria API with Lucene via Hibernate Search?

How can can I combine hibernate criteria API with Lucene hibernate search? org.hibernate.Criteria criteria = session.createCriteria(class); criteria.add(Restrictions.ne(property, value)); FullTextQuery fullTextQuery =…
3
votes
1 answer

What is the Best method to access hiberante search (lucene) files on amazon s3

I am using amazon s3 to host my website (so far - very impressed), however, I want to host my hibernate search index files and subdirectories in a manner that will scale. Could I use the Amazon s3 buckets for this? I already host user uploaded…
jaseFace
  • 1,415
  • 5
  • 22
  • 34
3
votes
1 answer

How to handle Hibernate-Search index recovery?

When an application server exits unexpectedly, Hibernate Search can not do a graceful shutdown of Lucene. Leaving write.lock files behind in each index directory. That is of course quite normal. But - the lock files also remain after restarting the…
Jan Goyvaerts
  • 2,913
  • 4
  • 35
  • 48
3
votes
3 answers

Case-insensitive indexing with Hibernate-Search?

Is there a simple way to make Hibernate Search to index all its values in lower case ? Instead of the default mixed-case. I'm using the annotation @Field. But I can't seem to be able to configure some application-level set
Jan Goyvaerts
  • 2,913
  • 4
  • 35
  • 48
3
votes
3 answers

Lucene BooleanQuery

How to use booleanQuery with StandardAnalyzer in Lucene Search?
Shashi
  • 12,487
  • 17
  • 65
  • 111
3
votes
3 answers

Asynchronous Search

I am currently working on building a proof of concept search solution for my company using Lucene and Hibernate Search. I have built individual components which work fine. I am now looking at creating a single API that would allow a user to get…
Amin Mohammed-Coleman
3
votes
1 answer

Will NHibernate Search ever become aware of changes to the underlying data?

I've seen several statements online to the effect that NHibernate (or Hibernate) Search "takes care of the database/index synchronization". When I read these statements, I cannot help but wonder if there is an implied "...as long as you use…
Aaronaught
  • 120,909
  • 25
  • 266
  • 342
3
votes
2 answers

Teracotta and Hibernate Search

Does anyone have experience with using Terracotta with Hibernate Search to satisfy application Queries? If so: What magnitude of "object updates" can it handle? (How's the performance) What kind of performance do the Queries have? Is it possible…
mainstringargs
  • 13,563
  • 35
  • 109
  • 174