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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
73 views

does lucene update stop working in hibernate 5

During the startup of the server the indexing works fine(the indexes are created and search works fine). But when we try to update some indexes we got the lock exception and indexes not work and ...
mon's user avatar
  • 1
0 votes
1 answer
20 views

hibernate search check predicate per hit

I do something like this in hibernate search 6.2 with lucene backend: final var searchSession = Search.session(em); final var orgas = searchSession .search(Organization.class) .where(...) .hits()...
Stuck's user avatar
  • 11.4k
0 votes
1 answer
20 views

how to test two conditions on each child of a OneToMany in hibernate search?

Given two entities Organization and Job and their indexing with Hibernate Search (I am forced to still use HS 5.12). @Entity @Indexed(index = "idx_organization") public class Organization { ...
Stuck's user avatar
  • 11.4k
-1 votes
1 answer
13 views

Is any posability to make mustache query (or use existed script) in hibernate?

I have saved script in opensearch cluste. Is it possible to call it somehow via hibernate-search or make something like "native query" with mustache script?
RiseOfDeath's user avatar
0 votes
1 answer
17 views

How can I index optional relations in hibernate search

I'm trying to update my hibernate search implementation to add relations between entities and it works fine, but only for entities that in fact have a relation to another entity. If it is null, it's ...
Roque Sosa's user avatar
0 votes
1 answer
30 views

Zero-downtime indexing with Hibernate-Search

Trying to implement the logic for Zero-downtime reindexing as advised on: https://docs.jboss.org/hibernate/search/6.2/reference/en-US/html_single/#backend-elasticsearch-indexlayout-strategy-simple. ...
Rambabu's user avatar
  • 40
0 votes
1 answer
27 views

(Hibernate-Search-lucene) How to index a field in another object(B) whose primary key is present as foreign key in object A

I have two classes : Class A : (to be searched) @Entity @Indexed Class A { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(updatable = false, nullable = false) ...
Kundan Kumar's user avatar
1 vote
1 answer
113 views

hibernate.transaction.auto_close_session throws "Session/EntityManager is closed" when set to true

When we set hibernate.transaction.auto_close_session to true, it is throwing java.lang.IllegalStateException: Session/EntityManager is closed . We are using hibernate 5.3.18.Final and spring 5.3.28 ...
Anuja's user avatar
  • 11
0 votes
1 answer
194 views

Hibernate search 6 with Hibernate 6.2.5

I'm trying to migrate my application from spring boot 2.7.6 to 3.1.0 which uses jakarta api and hibernate 6.2.5. The version of the hibernate search that I use is 6.1.5 which depends on hibernate-core ...
Hristo Angelov's user avatar
0 votes
2 answers
62 views

Spring-boot application failed to start after adding Hibernate Search latest dependency, **CR1**

Error Log from console - Here **Dependency Versions:** springBootVersion=2.7.3 hibernateVersion=5.6.10.Final hibernate_search=**6.2.0.CR1** annotationProcessor "org.hibernate:hibernate-...
Garhwal Uttarakhand's user avatar
0 votes
1 answer
178 views

Hibernate Search AWS OpenSearch Serverless connection problem

I am using Hibernate Search v. 6.1.8.Final within my Spring Boot application. My implementation works for OpenSearch v. 2.5 which runs locally and in Kubernetes. Besides the basis libraries I include ...
Rokko_11's user avatar
  • 837
-1 votes
1 answer
66 views

issue in upgrading hibernate-search v3.4.1.Final to hibernate-search-orm v5.9.3.Final

Earlier I was using hibernate-search v3.4.1.Final and now I'm upgrading my application so i have to use hibernate-search-orm v5.9.3.Final and accordingly I'm using hibernate-entitymanager v5.2.17....
rob's user avatar
  • 11
0 votes
1 answer
31 views

How to associate multiple entities in a many-to-many relationship for Hibernate Search

Suppose I'm building a grocery store app. I have several types, some of which are related and some which are not, e.g., Produce, Fruit, Apple, Vegetable, Asparagus, Meat, Chicken, etc. All of these ...
Tomás Gray's user avatar
0 votes
2 answers
48 views

Is it possible to entirely replace Lucenes MultiFieldQueryParser with Hibernate Search 6

I am about to migrate from Hibernate 5 to hibernate search 6 and are looking for some advice. As I understand a main intention of the version 6 is to decouple the API more from the underlying ...
Matt's user avatar
  • 105
0 votes
1 answer
40 views

Customize EdgeNGramFilter minGramSize and maxGramSize in Hibernate Search 6.1.8 Final with Lucene backend

I am trying to implement autocomplete inspired by the Search analyzer section in this Hibernate Search 6.0.0.Beta2 release This is the example from the above link that I am trying to follow. @Entity @...
Lyn's user avatar
  • 637
0 votes
1 answer
310 views

Hibernate Search is required javax.persistence.EntityManager

I'm trying make test application using Hibernate Search. I have note repository which extend SimpleJpaRepository with required parameter jakarta.persistence.EntityManager. But when i try to create ...
anna's user avatar
  • 13
0 votes
2 answers
56 views

Nested predicate usage for longer hierarchy of nesting

We have been using the hibernate-search for a while with springboot. Have a Question on nested predicate use for longer hierarchy of nesting... Till 6.1.5 we are using the below syntax to query a ...
Garhwal Uttarakhand's user avatar
0 votes
1 answer
37 views

Hibernate Search: predicate with multiple IDs from the IndexedEmbedded (similar to .id())

I am trying to find a way so that I can make the following use case work: Author is embedded in the Book (that is indexed), and I save the IDs of the Author in the book (author.id). I have a list of ...
User Wien's user avatar
0 votes
1 answer
143 views

Hibernate Search 6: Trying to sort dynamic fields with field templates leads to error 'unknown field'

I'm trying to switch from Hibernate 5 to Hibernate 6 with Elasticsearch backend. In our project there is an entity with dynamic number of fields. As I understand it the best way to handle this would ...
Stefan's user avatar
  • 1
0 votes
1 answer
51 views

Hibernate Search And AWS Lambda

Is it possible to implement Hibernate Search in AWS Lambda (Java 8) ? I am running into difficulties since Hibernate Search creates a directory for indexing which I believe isn't possible in AWS ...
tksT's user avatar
  • 1
0 votes
2 answers
208 views

Hibernate search does not create index after some methods

I have application with two objects, TableDoc and TableRow. @Entity @Indexed public class TableDoc{ @OneToMany(mappedBy = "tableDoc", fetch = FetchType.LAZY) @IndexedEmbedded @...
Martin Kršek's user avatar
0 votes
3 answers
243 views

Hibernate Search 6.2.0.Alpha2 Index Problem

Upgraded from Hibernate Search 6.2.0.Alpha1 to 6.2.0.Alpha2 No other changes and we are now getting the following runtime error when the application attempts to create the initial indexes. Caused by: ...
Ashley Callaghan's user avatar
1 vote
1 answer
505 views

Hibernate Search upgrade for JDK-17 and Jakarta Persistence APIs

We are experimenting with JDK-17 migration. One of the steps was to migrate from javax.persistence to jakarta.persistence libraries. Looks like Hibernate search is yet to upgrade to Jakarta ...
Rambabu's user avatar
  • 40
0 votes
1 answer
61 views

Hibernate search 6 : updating EmbededIndex from another Microservice

Good morning, I have a rather special scenario and I would like to have your opinion on the best way to handle this situation. We have an application divided into several functional microservices, but ...
Linda BO's user avatar
0 votes
1 answer
198 views

Hibernate search: org.hibernate.search.util.common.SearchException HSEARCH000610?

I´m using hibernate search to create a metasearch engine, when I compile the project it does not give me any error but when I execute the request it gives me the following error: org.hibernate.search....
MariaRambo's user avatar
3 votes
1 answer
931 views

Hibernate Search 6 with Hibernate 6

I'm trying to setup Spring Boot 3.0.1 project from scratch using latest versions. So far I managed to get working mvc and repositories, but while adding Hibernate Search, things won't work anymore. ...
horvoje's user avatar
  • 643
3 votes
1 answer
175 views

Creating and using LuceneAnalysisDefinitionProvider with Hibernate Search

When you search Stackoverflow or the Internet for LuceneAnalysisDefinitionProvider, you'll find hundreds of pages, each of them having the same code copied from another page without any decent ...
horvoje's user avatar
  • 643
0 votes
0 answers
34 views

Search for "this" or "not" with Hibernate Search / Lucene

Is it possible to search for words "this" and "not" with Hibernate Search using Lucene as a search engine? Today I added in my web catalog of products a product called Shhh This Is ...
horvoje's user avatar
  • 643
1 vote
1 answer
114 views

Find parent entity using date range filter on child entities with Hibernate Search in Spring Boot

It's a Spring Boot with Hibernate Search. Underlying database is MySQL. Main entity Article has a set of child entities: Set<Price>. Each Price has a link to Country entity, Store entity, ...
horvoje's user avatar
  • 643
0 votes
1 answer
131 views

Hibernate Search Sync strategy with Inheritance

I have a Spring boot project with 3 entities, UserEntity which is a standalone and Person which is inherited by lawyer. I set the automatic indexing strategy to sync, When I insert a new user into the ...
Ossama Nasser's user avatar
0 votes
1 answer
105 views

How do I use a QueryDSL BooleanExpression in a Hibernate Search query?

I have a complex, reusable method that returns a BooleanExpression to filter a Q object QPost. How do I use this BooleanExpression in a Hibernate Search query like this: Search.session(entityManager)....
Johannes Pertl's user avatar
0 votes
0 answers
122 views

Migrating Hibernate Search 5.11.11.Final to any Hibernate Search 6

Is there any way to avoid usage of BooleanJunction while migrating to Hibernate 6? My (poor) understanding is that Hibernate 6 abandoned Quer DSL and is using JPA criteria instead. Code sample is just ...
horvoje's user avatar
  • 643
0 votes
0 answers
33 views

hibernate search orm 5.11.9.Final - Check If collection is empty or contains any value from collection

I need to see if the collection is empty or if it contains any values. Either the product does not have a collection associated with it, or one should be offered by us. Building Query Entity JPA code ...
Aamir's user avatar
  • 1
0 votes
1 answer
61 views

How to configure Hibernate Search to batch fetching rows in database?

I'm using Hibernate Search to implement a full text search. My database is SQL Server. Unfortunately, when my full text search retrieves too much documents, I face the limitation of SQL Server : The ...
Guillaume Delafosse's user avatar
0 votes
1 answer
148 views

Hibernate Search - issue indexing embedded / associated objects

I'm having difficulty adding index fields to embedded objects using hibernate search. I have a simple example whereby a Company can have many CompanyAddress(es) - example of my setup is shown below: ...
footyr's user avatar
  • 23
0 votes
1 answer
72 views

updating an index on an subselect entity

In my project, I have entities that I cannot change, but I need to create an index on top one of them. That an example what I want to archive: That is the entities that I cannot change: @Entity @Table(...
yaroslavTir's user avatar
0 votes
1 answer
192 views

How to start quarkus native app with elasticsearch?

I have already deployed a first Quarkus app with hibernate-orm-panache, resteasy-reactive, postgresql etc as a Docker container. The Quarkus app as a container connects to the PostgreSQL on the local ...
ko.alen's user avatar
  • 18
-1 votes
1 answer
45 views

Infinispan how to select an embedded entity

I am using RedHat DataGrid (it is like Infinispan). I have this class Execution which has a collection of Workflow type. I need to execute the following query: select e.workflow from Execution e where ...
Andrea Bevilacqua's user avatar
0 votes
2 answers
375 views

Hibernate Search 6 @ProjectionConstructor not working

I am experimenting the projection features of Hibernatesearch 6.2.0.Alpha1 before integrating our existing app. I have created a spring-boot project with JHIPSTER sample project. And added the ...
Rambabu's user avatar
  • 40
0 votes
1 answer
70 views

Hibernate Search: Find in list of intervals

I am using Hibernate Search 6.x within my Spring Boot application. I got an indexed entity with a set of date intervals. @Indexed public class ProudParent { ... @IndexedEmbedded(includePaths = {&...
Rokko_11's user avatar
  • 837
0 votes
1 answer
208 views

Using Hibernate Search 6 - How to prevent automatic indexing for a specific entity?

We would like to handle the indexing ourselves for one of our Hibernate Search entities. Is it possible to disable auto indexing within Hibernate Search 6 for a specific entity? Similar to the older ...
Rick Gagne's user avatar
2 votes
1 answer
182 views

Hibernate Search - Start application even if Elasticsearch cluster is down

We integrated hibernate search into our crud microservices (simple spring boot apps) and it works like a charm. One fact that makes our architects nervous is that the crud services refuse to start ...
padmalcom's user avatar
  • 1,156
0 votes
1 answer
95 views

Filter IndexedEmbedded entity in hiberenate search 6

Let's say i have a Indexed entity User that IndexedEmbedded a list of Entity Role. In that list we have also past Roles (soft deleted), i wanna index User, end limit roles list to only active roles in ...
phingage's user avatar
  • 117
0 votes
1 answer
254 views

How to set max_result_window on hibernate search for elasticsearch backend

We have an existing spring boot, hibernate search, elasticsearch production system that works day to day with index results under the 10,000 default. Once a month I run a report on a local environment ...
hairyCrazyMan's user avatar
0 votes
1 answer
127 views

Hibernate Search Adding Correlation Id to the request

I have been trying to add correlation ID in hibernate search . Tried creating custom HTTP client configure as given in the documentation. But It's not working . @Configuration public class ...
Rajeev Massey's user avatar
-2 votes
1 answer
263 views

How do i disable elastic search and fall back to local filesystem storage in hibernate search 6

I am using Hibernate 6 with Amazons opensearch server in production. When i'm testing locally i don't want to use the opensearch server, instead i want to use local-filesystem to store the index files....
Maurice's user avatar
  • 6,703
-1 votes
1 answer
132 views

Hibernate Search 6: Case-insensitive searching of aggregable fields while retaining case-sensitive aggregation results

I have used the new aggregation functionality of Hibernate Search 6 to develop a classic "faceted search" interface, in which the various search fields in the UI are accompanied by the most ...
Archie Goodwin's user avatar
0 votes
1 answer
196 views

hibernate search - get entity id in composite

I'd like to create a composite and add the entities id (the one in the database) as property. I tried to use f.id() but I can't map it to a long and it seems to be the document id in elasticsearch ...
padmalcom's user avatar
  • 1,156
0 votes
2 answers
194 views

Use pagination on query on multiple indices in hibernate search

we are implementing a global search that we can use to query all entities in our application, let's say cars, books and movies. Those entities do not share common fields, cars have a manufacturer, ...
padmalcom's user avatar
  • 1,156
0 votes
1 answer
349 views

How to adjust the index mapping name in Hibernate Search 6

We have a few indexed entities that include an address entity in slightly different ways but we want to be able to search on any of these entities using the same mapping path to address fields. In ...
Rick Gagne's user avatar

1
2 3 4 5
30