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.
1,405
questions
0
votes
1
answer
47
views
How to join data in unidirectional ManyToMany and ManyToOne relation with Hibernate Search
I'm new to Hibernate Search, I'm using Hibernate Search 6.1.4.Final along with Spring Boot 2.6.7, Spring Data JPA 2.6.7 and PostgreSQL 14. I have the following schema:
CREATE TABLE manufacturer
(
...
0
votes
2
answers
20
views
java.lang.NoSuchMethodError: 'java.lang.String org.hibernate.search.engine.Version.versionString()'
I'm having a problem trying to upgrade hibernate search from v5 to 6.0. I had it working previously but now I'm getting the following error no matter what I do.
Apr 29, 2022 6:50:45 PM org.apache....
0
votes
1
answer
16
views
Hibbernate search cannot use agregation on IndexedEmbedded
I am trying to do an aggregation on @IndexedEmbedded, unfortunatly is not working well, but the search on the same field is working ok.
I have
Book {
...
@IndexedEmbedded
@ManyToOne
@JoinColumn(name=&...
0
votes
1
answer
38
views
Hibernate Search 6 search multiple fields with multiple keywords
I want to search through these 2 different variables :
@Enumerated(EnumType.STRING)
@Column(length = 20)
@Convert(converter = WorksEnumConverter.class)
@GenericField(valueBridge = @ValueBridgeRef(type ...
0
votes
1
answer
26
views
Hibernate Search 6 combine projections not working
I have implemented Hibernate Search and am currently having issues with Projection.
All relevant data are indexed and accordingly I try to project them to the DTO.
as the documentation (https://docs....
0
votes
1
answer
38
views
Hibernate search with lucene does not index similar names correctly
I'm learning Hibernate Search 6.1.3.Final with Lucene 8.11.1 as backend and Spring Boot 2.6.6. I'm trying to create a search for product names, barcodes and manufacturers. Currently, I'm doing an ...
0
votes
0
answers
15
views
lucene - inheritance search
I have the below entities:
@Entity
@Indexed
@DiscriminatorValue("A")
public class CPAEntity extends ServiceEntity {
private static final long serialVersionUID = 1L;
@OneToOne(...
0
votes
1
answer
24
views
How can I reuse a field in several bridges in Hibernate Search 6?
In Hibernate Search 5 I had several custom bridges that populated the same field. That was handy so that I can perform a query on just one field. Now if I try to do it I receive this error:
...
0
votes
1
answer
94
views
Converting nested Hibernate Search 5 predicates to Hibernate Search 6
In the process of converting an application from Hibernate Search 5 to 6. I've read thru much of the documentation, especially https://docs.jboss.org/hibernate/search/6.0/migration/html_single/#...
0
votes
0
answers
26
views
HSEARCH700061: Unable to index-embed type 'java.lang.String':
Can someone please help us why we are getting below exceptions in hibernate-search 6?
failures:
- HSEARCH700061: Unable to index-embed type 'java.lang.String': no index mapping (@...
0
votes
1
answer
51
views
Unable to find below classes in hibernate-search 6
We are in process of migrating hibernate-search 5 to hibernate-search 6.
While migrating we are not able to find below classes in hibernate-search 6 api
import org.hibernate.search.bridge.FieldBridge;
...
0
votes
0
answers
12
views
Difference between below two methods in hibernate-search
What is difference between below two methods and what is the equivalent method for onFields(String, String[]) in hibernate-search 6 ?
QueryBuilder.simpleQueryString().onFields(String, String[]) //...
0
votes
1
answer
12
views
Unable to find TermRangeQuery in hibernate-search 6
I am not able to find below class in hibernate-search 6
import org.apache.lucene.search.TermRangeQuery;
is there any similar class available?
0
votes
1
answer
35
views
How to use QueryBuilder and Search String in hibernate search 6?
We wanted use QueryBuilder object in hibernate search 6 .... Something like this
<code>
QueryBuilder qb = fullTextEntityManager
.getSearchFactory()
....
0
votes
1
answer
74
views
Correct the classpath of your application so that it contains a single, compatible version of org.elasticsearch.client.RestClientBuilder
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.hibernate.search.elasticsearch.client.impl.DefaultElasticsearchClientFactory....
-1
votes
1
answer
100
views
Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true [JAVA]
We have a java application (spring boot + hibernate search + elastic search).
Application is working fine on elastic search version 6.8
Recently, we have created a new cluster in aws with version 7.10....
0
votes
1
answer
48
views
Hibernate Search: mapping IndexedEmbedded on ElasticSearch causes No field found for [] in mapping
I've two entities, Search and Amount that I'm mapping using Hibernate Search in this way:
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ToString
@Entity
@Indexed
public class ...
0
votes
1
answer
19
views
Can I build SearchPredicates in HibernateSearch without SearchSession and Class?
I am trying to migrate a project using ElasticSearch to HibernateSearch. Currently, we build complex ElasticSearch queries via combining multiple QueryBuilder objects created by separate methods like ...
0
votes
1
answer
52
views
lucene - search with contains value
I have a field socialReason in my database with the folowing values
ch fleyriat
CLINIQUE DENTAIRE MUTUALISTE
CENTRE DE SOINS INFIRMIERS BETSCHDORF
for example, i want when i search with the word CH ...
0
votes
1
answer
49
views
lucene - search in list of objects
I have the entity ExerciseEntity which contains a list of objects identifiers
@ElementCollection
@IndexedEmbedded(targetElement = IdentifierEntity.class)
private Set<IdentifierEntity> ...
0
votes
1
answer
44
views
Accumulator function to reduce stream of HibernateSearch SearchPredicates
The following example (Example 183) taken from https://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/#query-predicate explains how to apply multiple filters to a HibernateSearch ...
0
votes
1
answer
88
views
Hibernate search 6 custom index settings
I would like to configure a custom tokenizer for using in my custom analyzer in Hibernate Search (6.0.8) with Spring Boot 2.5.x. According to the documentation (https://docs.jboss.org/hibernate/search/...
0
votes
1
answer
18
views
How to be compatible with like syntax after upgrading Hibernate Search 6.x version
I recently upgraded hibernate search from version 5.x to version 6.x, and encountered some problems. Most grammars can be processed by referring to the document, but there is a like grammar that ...
1
vote
2
answers
57
views
HSEARCH 700061: Index a list of enums with Hibernate Search 6
I am new in Hibernate search 6 world, I want to index a list of enum in my entity, but I get unfortunatly this Error
HSEARCH700061: Unable to index-embed type 'com.commons.enums.B
@Entity
@Indexed
...
0
votes
1
answer
73
views
Tika Bridge is deprecated in Hibernate Search 6. Alternatives?
In Hibernate Search 6 the Apache Tika bridge has disappeared:
https://docs.jboss.org/hibernate/search/6.0/migration/html_single/#tikabridge
What is the best way to index the contents of a PDF or a ...
0
votes
1
answer
77
views
org.hibernate.search.SearchException: Unable to create index directory: /data/index
I am having a problem starting my project. The project compiles though however when starting the server I get this error here:
FATAL: Exception sending context initialized event to listener instance ...
3
votes
0
answers
82
views
Selected facet should not filter own group using hibernate search
If I have some Products with color and size.
Jeans Blue Size L
Jeans Red Size S
T-shirt REd Size S
and so on..
Doing a facet search using hibernate-search works as quite well. But if I select one of ...
0
votes
1
answer
128
views
How to match numeric and boolean values in a lucene query
I am using hibernate search to construct a lucene query that returns string values that contain (part of) the search string. Next to that the query must only return the string values if the language ...
0
votes
1
answer
54
views
Hibernate Search 6 with Infinispan Directory Provider
Can't find any information about the Infinispan directory provider in the Hibernate Search 6.0 documentation.
See: https://docs.jboss.org/hibernate/search/6.0/reference/en-US/html_single
Does this ...
0
votes
0
answers
97
views
How to upgrade hibernate version 5.3.x to 5.4.32.Final in Jboss EAP 7.3
I am trying to integrate hibernate search 6.0.7.Final with JBoss EAP 7.3.
Hibernate Search 6.0.7.Final requires Hibernate ORM 5.4.32.Final so I upgraded hibernate version by this setting
But this ...
0
votes
1
answer
98
views
Single return type in Hibernate Search
Let's say I have an app with many different entities, which do not have relations between each other.
I would like to create a search that queries all of them, but returns a unified type, i.e:
class ...
0
votes
1
answer
38
views
Avoiding indexation by Lucene every time Java application is starting
ISSUE: My issue is that indexation done by Lucene in my Java app is taking 50 minutes every time I am restarting the application.
WHAT I HAVE TRIED: Indices were saved in RAM so I have changed ...
1
vote
1
answer
99
views
Hibernate Search + Elasticsearch - version_type in requests - how to implement
In our application we use Hibernate Search + Elasticsearch together as search engine for end users. Configuration in search service (let's call it XXXsearch, written in java) looks as below:
spring:
...
0
votes
1
answer
177
views
Hibernate search : Sorting with filter on nested object, how to?
I have to code an hibernate search query (for elastic search database backend) which include a conditionnal sort of this kind :
Date dateOfBirth = new Date('01/01/2000');
Integer age = 10;
if (...
0
votes
1
answer
101
views
@IndexedEmbedded on class containing other @IndexedEmbedded fields
I'm trying to manage hibernate search indexing on a class with a field mapped by @IndexedEmbedded on a custom @Embeddable entity. This entity also contains others @IndexedEmbedded fields in the @...
0
votes
1
answer
81
views
Elastic Search / Hibernate Search : how to code xor operator with query DSL API in java?
I'am using hibernate search java API to generate an elastic search query. I have problem to code a xor operator. Typically I wrote :
private void applyXorOperator(BooleanPredicateClausesStep<?> ...
0
votes
0
answers
72
views
How to connect Hibernate elasticsearch use SSL with quarkus?
I connect ES without SSL is success
but when I enabled SSL then error:
file application.yml
quarkus:
ssl:
native: true
native: additional-build-args: -J-Djavax.net.ssl.trustStore=tls.crt,-J-Djavax....
0
votes
1
answer
154
views
hibernate search 6 updating elasticsearch index after entity update
I have a problem using elasticsearch with hibernate search 6. Let's assume we have this setup :
@Entity
@Table(name = "entityA")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Indexed(...
0
votes
1
answer
50
views
Hibernate Search / Lucene based Sorting Issue
I am having an issue in sorting, which specify below.
Previously, the code is writtern as
Sort sort = new Sort(new SortField[] {
SortField.FIELD_SCORE,
new SortField("field_1", ...
0
votes
1
answer
136
views
Using @IndexingDependency derivedFrom and a property bridge
I would like to use hibernate search's @IndexingDependency with a PropertyBridge but I can't seem to make it work.
I get this error :
Hibernate ORM mapping: type 'com.something.Person': path '....
0
votes
0
answers
57
views
Complex search including normalisation and different fields in Spring boot
I'm trying to build a complex search that includes calculating a score based on different parameters which revolve around the user search and properties of the entity.
I will try to explain the ...
0
votes
1
answer
131
views
MassIndexer does not index anything
I am having a problem with the MassIndexer that brings me to my head, first of all I feel if my English is a little bad, I am using the translator a lot
I am using Java 8, Hibernate search 6 and ...
0
votes
2
answers
322
views
Hibernate/Lucene Fields added in Custom FieldBridge unknown when search is performed
We need to index different fields from one data property. This has been solved by implementing a FieldBridge, and adding the Fields there.
As seen in this example from the hibernate search reference:
/...
0
votes
1
answer
126
views
Is it possible to Use Hibernate Search 6 with WildFly 24?
I want to use Hibernate Search 6 in my project which required Hibernate ORM 5.4 or higher. And I also use WildFly 24.0.1 which has out of the box Hibernate 5.3.
When I run WildFly server my .war in ...
0
votes
0
answers
41
views
Hibernate Elasticsearch Highlighing problem
I have a problem with building a highlighting service for my project using the hibernate elasticsearch framework. I need to add the possibility to highlight all text phrases in these fields. When I ...
0
votes
1
answer
91
views
Hibernate Search migration from 5.11.9 to 6.0.6 - analyzer not being applied
I'm having some issues in the migration process to the newer version of Hibernate Search, mainly related to dynamic fields and the associated analyzer not being applied.
First, i'm building the ...
0
votes
0
answers
54
views
discovery.enabled: true gives spring boot startup error on Mac
Enabling node discovery via hibernate.search.backend.discovery.enabled = true gives a timeout while connecting to a node during application startup and the spring boot application exits. This happens ...
0
votes
0
answers
14
views
ceate indexer with hibernate search take a lot of time
I try to search with hibernate more like this and I succssed , but when I try to index also the IndexedEmbedded it run much more time and not finish for houres.
I using mysql with aws BusinessParties ...
0
votes
1
answer
97
views
Hibernate search aggregation : countByDocumentType (with elaticsearch backend)
I'am coding a simple query which targeting multiple index :
//targetIndexes is a list of indexes
searchSession.search(targetIndexes).extension(ElasticsearchExtension.get())
Now I simply want a "...
0
votes
1
answer
59
views
NoSuchMethodError when using HibernateSearch 6.0.6 with ElasticSearch 5.6
I am trying to add HibernateSearch 6.0.6.Final to a project currently using ElasticSearch 5.6, using https://docs.jboss.org/hibernate/stable/search/reference/en-US/html_single/ as a guide.
Since the ...