All Questions
47 questions
1
vote
0
answers
118
views
Alternative to FiltersAggregator.KeyedFilter in new Java Elasticsearch client
currently we are in the process of migrating to spring boot 3 ,and since there aren't many migration guides and examples with alternatives to specific queries and aggregations:
What's the alternative ...
1
vote
0
answers
111
views
I am Unable to use "org.elasticsearch.aggregations.pipeline.BucketSelectorPipelineAggregationBuilder" in elastic search 8.9.2
In maven repo inside the elasticsearch-8.9.2.jar, I am not able to find aggregations folder which contains BucketSelectorPipelineAggregationBuilder class.
https://repo1.maven.org/maven2/org/...
0
votes
1
answer
473
views
Elasticsearch date histogram aggregation shows incorrect dates
Im using ES version 6.8, trying to do a query with the Java High Level REST Client. I'm trying to use the Histogram Date Aggregation to get the count of documents by date.
This is my query:
{
"...
0
votes
2
answers
479
views
Counting by ranges in Double elasticSearch Spring boot using aggregation
I'm trying to count records from elastic search which are in specific range.
I have 3 ranges which represent different values in double.
low (0-4]
medium (4-7]
high (7-10]
and the object is something ...
0
votes
1
answer
799
views
Elasticsearch composite aggregation throws "[x_content_parse_exception] [1:131] [composite] failed to parse field [sources]"
Context:
Running tests on local Elasticsearch 8.6.1 deployment, using elastic Java client (same version).
Index mapping is pretty simple - two keyword fields ("strKey1" and "strKey1&...
0
votes
1
answer
187
views
Trying to use aggregations in java using the ElasticsearchRepository to fetch aggregated data from Elasticsearch. But my aggs are always null
Java = 8
ElasticSearchServer = 7.16.3
My code never returns the value for aggregations , I tried most of the combinations. Below is the code , please see if you can help here
@Repository
public ...
1
vote
2
answers
739
views
slow ElasticSearch query while using term aggregation
I am having around 20million data in ES, If I only query
"query": {
"bool": {
"must": [
{
"term": {
...
2
votes
2
answers
2k
views
Pass a dynamic value in the Elasticsearch Painless script params from the Elasticsearch
I am passing params map in the painless script, that map is type of <String, Long>.
The key of the map defines the id and the value defines the foundDate in epoch Long.
The elastic Document have ...
3
votes
0
answers
814
views
OpenSearch Java Client: class org.glassfish.json.JsonProviderImpl cannot be cast to class jakarta.json.spi.JsonProvider
I am migrating from OpenSearch Java High Level REST Client v.2.2.1 to Java Client v.2.2.1.
The logic that I am rewriting builds filters values by concurrently issuing search aggregation requests to ...
-1
votes
1
answer
467
views
Extract elasticsearch query output in csv with java
I'm using java for querying Elasticsearch; I want to export the data of my query in csv file. I'm breaking my head over this.. please can anyone help me with this code? I would be grateful.
This is my ...
0
votes
1
answer
161
views
Getting Unique results for Objects inside List in Elasticsearch
I have mapping like this
"custom_metadata": {
"properties": {
"key": {
"type": "keyword"
},
"value": {
...
0
votes
0
answers
266
views
How to get sum using filter aggregation in elasticsearch
I wanted to calculate the sum of total_stake which status does not Cancelled as per below mentioned table using elasticsearch. Please let me know whether my approach is correct or not. Please let me ...
1
vote
1
answer
153
views
Get members in aggregation bucket ElasticSearch
I'm pretty new to elasticsearch
I have a class called SubRequest
Mapping:
{
"sub-request" : {
"aliases" : { },
"mappings" : {
"properties" : {
...
0
votes
1
answer
420
views
Elasticsearch: Filter the records based on nested field with nested field containing only the filtered object
I am trying to filter the records based on nested field and want only the matching object in that array to be shown as part of the record.
Below is the detailed explanation of my requirement.
So, I ...
1
vote
0
answers
582
views
ElasticsearchClient gives exception on composite aggregation
I am trying to set up a composite aggregation using the ElasticsearchClient since the RestHighLevelClient is deprecated. However I keep getting the following error:
co.elastic.clients.elasticsearch....