1,520 questions
Advice
0
votes
0
replies
16
views
How to apply multi-tenancy pre-filters to all Spring Data Elasticsearch repository queries (including findById and custom @Query)?
I am trying to implement multi-tenancy in a Spring Boot application using Spring Data Elasticsearch.
My goal is:
Automatically inject a tenantId filter into all Elasticsearch queries
This must apply ...
0
votes
1
answer
56
views
Spring data elasticsearch how to print the elasticsearch JSON representation of the query
Using SpringBoot data elasticsearch
Need to print the Elasticsearch JSON representation of the query
Creating a org.springframework.data.elasticsearch.core.query.CriteriaQuery that is passed to
org....
1
vote
1
answer
48
views
ElasticsearchRepository result is greater than 10000 Documents
I have a SpringBoot application in which I query an Elasticsearch cluster using an Elasticsearch repository. This is working fine at first.
I have the following method in my repository, among others:
...
0
votes
0
answers
54
views
Spring Data Elasticsearch all shards failed exception
I faced a problem connected with Elasticsearch while implementing full text search. When I try to find documents in index I face this problem
2025-08-27T09:15:59.544+03:00 ERROR 19622 --- [Muse] [nio-...
0
votes
0
answers
42
views
Spring Data elasticsearch , using match_phrase with Criteria
I have a Spring Boot 3.3.x application that uses Spring Data Elasticsearch to query a single Elasticsearch index.
The query is built dynamically using the Criteria API. Now, I need to add a new ...
0
votes
1
answer
67
views
Concurrent writes to Elasticsearch Index using plainless script
This is a followup question to (Is there a way to have field level audit in elastic search?)
Step 1:
#push a sample doc
PUT my_index/_doc/1
{
"created_at": "2025-02-24T13:00:00Z",...
0
votes
1
answer
84
views
How should I implement script sort in spring-data-elasticsearch 5.3.x
How should I implement script sort in spring-data-elasticsearch 5.3.x
NativeQueryBuilder nativeQueryBuilder= new NativeQueryBuilder();
nativeQueryBuilder.withQuery(query);
nativeQueryBuilder.withSort(...
0
votes
1
answer
91
views
Is there a way to have field level audit in elastic search?
I have an index with say 10 fields. These fields may get modified from time to time. Is there a way to add any field level timestamp, which can store the timestamp when it was last updated and also ...
0
votes
1
answer
76
views
Spring data elastic search custom conversions doesn't work
Custom @ReadingConverter isn't being triggered but when I was initially implementing this code it worked normally.
Configuration class:
@Configuration
public class ElasticsearchConfig {
@Bean
...
0
votes
1
answer
50
views
How to combine must and should for the same field in filter Elasticsearch Spring Boot?
I'm using Elasticsearch filters and I would like to apply a must condition for selected regions (e.g., Occitanie and Île-de-France). Additionally, I want to ensure that profiles with the region "...
0
votes
0
answers
29
views
How to Implement Complex Queries (Vector Queries) in Spring Data Elasticsearch
The following code will throw an exception: [es/search] failed: [parsing_exception] unknown query [query].
@Query(value = """
{
"query": {
"script_score": {...
-1
votes
1
answer
119
views
How to submit task in ElasticSearch Java API Client?
Now, RestHighLevelClient is deprecated.
So i want rewrite code with ElasticSearch Java Api Client in my spring project.
Most of the functions are being modified properly, but I have not found an ...
0
votes
0
answers
29
views
Highlighting not working when using Java elasticsearch api
When I use the following query using CURL I successfully get highlights:
{
"query": {
"query_string": {
"query": "Angular"
}
},
"...
0
votes
0
answers
76
views
How to search elasticsearch using spring-boot-starter-data-elasticsearch?
I want to use the following elastic search query in Java to search through all my documents in my index.
{
"query": {
"query_string": {
"query": "my ...
1
vote
4
answers
809
views
Elastic Search query upgrade for RangeQuery builder
I am upgrading the elasticsearch version from 8.14.3 to 8.15.3 and there are some issues with this query-
return new RangeQuery.Builder() .field(fieldName) .gte(JsonData.of(dateToday)) .build() ....