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

conflict with hibernate-search-orm with other Dependencies

there is an Issue while adding org.hibernate dependency in pom.xml file
2
votes
2 answers

hibernate.search.lucene_version was not specified: using LUCENE_CURRENT

I'm using Hibernate Search with Spring Boot. I do not have any special configuration for Hibernate Search. It just shows that warning on application startup. How can I specify hibernate.search.lucene_version? My SearchService class (the only place…
Mahozad
  • 18,032
  • 13
  • 118
  • 133
2
votes
1 answer

Hibernate search multiple entities

Is it possible to search multiple entities for the same keyword, filtering each type with a specific filter and getting them in a single list? For example having the entities, breeder and animal and searching their data for the terms "Boston…
TM00
  • 1,330
  • 1
  • 14
  • 26
2
votes
2 answers

Hibernate search Elasticsearch

We had previously used hibernate search, Lucene for indexing. To provide better scalability, we are planning to use Elasticsearch 5(instead of Lucene). I have following questions: Is there any explicit hibernatesearch java api to feed the data…
2
votes
3 answers

Can a Double be formatted without scientific notation?

I am aware of the various posts floating out there with regards to the same issue. Mine its a little bit different and it might be a little obvious, but I will need your comments. I am currently using Hibernate Search and Lucene to Index entity…
camiloqp
  • 1,140
  • 5
  • 18
  • 34
2
votes
1 answer

Hibernate Search Fails with Double Type Greater than 5 Digits

I have the following fields on an entity: @Field(index = Index.TOKENIZED, store = Store.YES) @Column(name = "total_credit_amount", nullable = false) @FieldBridge(impl = RoundedDoubleBridge.class) private Double totalCreditAmount; @Field(index =…
camiloqp
  • 1,140
  • 5
  • 18
  • 34
2
votes
1 answer

Lucene DistanceQueryBuilder

I am having a few problems understanding Lucene Spatial (partially due to a lack of documentation and good examples and partially due to stupidity I am sure!) I am trying to run a query :- DistanceQueryBuilder builder = new DistanceQueryBuilder(new…
Rob
  • 703
  • 1
  • 7
  • 18
2
votes
1 answer

Spring Boot Integration Test failes due to lucene lock when using Hibernate Search

In my Spring Boot 1.5.10.Final project I use Hibernate Search ORM 5.6.4.Final. It works fine except of the integration tests. There is one test class with several test methods to test the search logic. If I run just this test class every things…
2
votes
1 answer

Hibernate Search Error

Can someone help, i'm trying a simple example with hibernate search but getting the following error: Exception in thread "main" org.hibernate.HibernateException: could not init listeners at…
Noor
  • 19,638
  • 38
  • 136
  • 254
2
votes
2 answers

Why are aggregate functions like group_by not supported in hibernate search?

Why are aggregate functions like group_by not supported in hibernate search? I have a use case where i need to fetch results after applying group by in the query.
2
votes
1 answer

Using Hibernate Search over 2 subclasess with a shared property

I have the following data model: @Entity @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) public abstract class AbstractRecord implements Serializable { ... @Id @GeneratedValue(strategy = GenerationType.TABLE) …
camiloqp
  • 1,140
  • 5
  • 18
  • 34
2
votes
1 answer

modifying hibernate file to match my need

I need to increase the sleep time in the java class FSMasterDirectoryProvider.java which is in hibernate-search-engine-4.5.3.Final.jar. I tried getting the sources jar for the same version and recompile and package it by modifying the sleep time. I…
2
votes
1 answer

How can I write aggs query in hibernate search

How can I write aggregation query on a particular term in hibernate search using elastic search.Is there any way to do this?
2
votes
1 answer

ElasticSearch - define custom letter order for sorting

I'm using ElasticSearch 2.4.2 (via HibernateSearch 5.7.1.Final from Java). I have a problem with string sorting. The language of my application has diacritics, which have a specific alphabetic ordering. For example Ł goes directly after L, Ó goes…
2
votes
2 answers

java.lang.IllegalStateException: Not allowed to create transaction on shared EntityManager - use Spring transactions or EJB CMT instead

guys. I wanted to create Fulltext search in my Spring Boot application with the help of Hibernate Search. And I faced with such an exception: java.lang.IllegalStateException: Not allowed to create transaction on shared EntityManager - use Spring…
Andrey-2310
  • 531
  • 1
  • 6
  • 13