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
3
votes
1 answer

Hibernate search exact match for strings with dashes

I'd like to do an exact search for entity field that has "xx-xx-xx" format. The entity looks as follows: @Entity @Indexed class Resource { @Field private String address; // has "xx-xx-xx" format } The query creation process is as follows: …
Ilya Zinkovich
  • 4,082
  • 4
  • 25
  • 43
3
votes
1 answer

How to get the statistics of Hibernate Lucene Index creation in GUI?

I developed an admin panel for showing the Hibernate Lucene Index Statistics while creating the MassIndexer when my application in maintenance mode.I found in documentation that we can get the statistics by using SearchFactory.getStatistics() but I…
3
votes
2 answers

(HibernateSearch) MultiFieldQueryParser different analyzer per field

Some of my indexed fields use a Greek analyzer and I want to use an English analyzer for some other fields. My problem is: When searching for results (with a MultiFieldQueryParser currently), how can I use a different analyzer per field, so that a…
Panayiotis Karabassis
  • 2,278
  • 3
  • 25
  • 40
3
votes
3 answers

Hibernate search beginner question

I am just beginning with Hibernate Search. The code I am using to do the search is taken from the reference guide: FullTextEntityManager fullTextEntityManager = Search.getFullTextEntityManager(em); EntityTransaction transaction =…
Panayiotis Karabassis
  • 2,278
  • 3
  • 25
  • 40
3
votes
2 answers

AWS Elastisearch Access Policy for CodeBuild Integration Tests with Hibernate Search using a ElasticSearch for indexes storage

I want to launch a CodeBuild project to run my integration tests. My application use AWS ElasticSearch Service as Hibernate Search index storage. I have added a policy to my ES Domain which allows private ec2 instances to access ES through a NAT…
3
votes
1 answer

nHibernate.Search with nHibernate v2

I having trouble getting nHibernate.Search to create an Index. If I use 1.2.1.4 of nHibernate.dll & nHibernate.Search.dll then the index is created correctly and I can inspect it with Luke (a Lucene utility). A segments file is created as well as a…
ChrisCa
  • 10,876
  • 22
  • 81
  • 118
3
votes
1 answer

@SortableField not working in nested entity

My code has the class Credenciada that inherits from class Cadastro that has the atributte(nested class) "cep" of CEP type. The CEP class has the atributte "uf" of String type. The uf atributte was annoted with @SortableField, so the index is save…
Ady Junior
  • 1,040
  • 2
  • 10
  • 18
3
votes
1 answer

Java Linkage Error while implementing Hibernate Search

I put all the required jars in class-path but still m getting the following error: Failed to define class org.hibernate.search.impl.FullTextSessionImpl in Module "com.cirq:main" from local module loader @7a08c0a3 (roots: /home/jboss/modules):…
utsav anand
  • 385
  • 1
  • 4
  • 16
3
votes
1 answer

Hibernate Search Turkish Character

I am trying to search a field filled with Turkish characters. For example: Müdürlük. But when I try to query this field not able to get results. I am new to hibernate search. What should I do?
Mesut Dogan
  • 572
  • 7
  • 16
3
votes
5 answers

java.lang.NoSuchFieldError: session

I am working on a SpringMVC+CRUD+Hibernate Search example : When I search for a particular text, it gives me this error : **Error** : HTTP Status 500 - Handler dispatch failed; nested exception is java.lang.NoSuchFieldError: session I tried all the…
user6554564
3
votes
1 answer

Fetch entity with association using one query in hibernate search

I'm pretty new to Hibernate Search project,so any advices will be appriciated. Assume I have an entity Foo and entity Bar connected with one-to-many relationship. Mapping may look as follows: @Entity @Table(name="foos") @Indexed public class Foo { …
3
votes
1 answer

Hibernate Search - MySQL error too many joins with Joined Inheritance model

I've just encountered the following MySQL error in my web app Too many tables; MySQL can only use 61 tables in a join This is occurring when performing a Hibernate Search (version 5.5.2) query and I'm not entirely sure why that many joins are…
mharray
  • 79
  • 8
3
votes
0 answers

Performance issues upon transaction completion with Hibernate Search

We recently updated from Hibernate Search 3.4 to 5.5.2. In the new version, we are experiencing a serious performance hit when adding a new indexed entity which is connected by a foreign key to many other entities, something that did not happen in…
Jewels
  • 966
  • 11
  • 28
3
votes
3 answers

Hibernate search on prefixes

Right now, I have successfully configured a basic Hibernate Search index to be able to search for full words on various fields of my JPA entity: @Entity @Indexed class Talk { @Field String title @Field String summary } And my query looks…
Sebastien
  • 3,583
  • 4
  • 43
  • 82