Questions tagged [resthighlevelclient]

Java's High level REST client that wraps an instance of the low level RestClient and allows to build requests and read responses from elastic search

Elastic Search Java's High level REST client that wraps an instance of the low level RestClient and allows to build requests and read responses from elastic search

163 questions
0
votes
1 answer

Aggregator of type top_hits cannot accept sub-aggregations

I am trying to execute below query but getting Aggregator [recommendationIds] of type [top_hits] cannot accept sub-aggregations below is the query and corresponding java code and i am using java rest high level client for elastic search client i…
0
votes
1 answer

elasticsearch how to identify which fields have the common aggregated values

I have a scenario where for the aggregated values from the document i want for each aggregation response which id have the aggregated values for example in the document below if i do aggregate by…
0
votes
1 answer

elastic search how to use must not query inside filter

I have below search query and document how to use must not query. scenario is for matched shipment id it has to fetch the documents and it has to ignore the documents whenever there is a match for id below is document which is in the elastic search…
0
votes
1 answer

Elastic search query filter and aggregation is not working

I have the below document and search query when i execute the query elastic is fetching the unmatched documents scenario is for the matched exceptionId it should do the aggregation but it is fetching all the documents and also aggregation is not…
0
votes
1 answer

Aggregator of type [sum] cannot accept sub-aggregations

I am using rest high level client and getting the above exception but works fine from the postman here is the java source code and this is built using rest high level client. suspecting the last three sum aggregations are causing the problem please…
0
votes
1 answer

query on same field with multiple values using RestHighLevelClient

I have to filter/query multiple urls on "url" field using Elasticsearch RestHighLevelClient. I formed my query as below but it is giving 0 records. query.must(QueryBuilders.queryStringQuery("http://localhost:8080/test/*") …
Madhava
  • 47
  • 6
0
votes
1 answer

How to create index type and id in create index request?

I am using IndexRequest from elastic 6.3.2. Now I changed to version 7.6.2. How can I do the same below steps using the CreateIndexRequest? Elastic rest high level client 6.3.2 code: public Object createIndex(Object document, String id) throws…
0
votes
1 answer

How to generate elastic search nested aggregations in java?

I have the below aggregation query which i need to translate into java Below aggregation query needs to be translated into java using elastic search client RestHighLevelCleint not sure i tried multiple times but the java code is not able to…
0
votes
1 answer

How to group by field type for matched document fields?

I am using term aggregation to count the field values but before to aggregation i am doing filter search based on the result aggregation will work.. finally i need the id's and aggregation count for example if exception id is 1 and if it get matches…
0
votes
0 answers

Spring boot RestHighLevelClient Elastic Search on combine queries

I have a domain public class Person { private String name; private String description; private Long positionId; // ---- other props ------ } and I want to search for query string on field name, description and positionId I can make it…
0
votes
1 answer

Elastic Search update by query not reflecting correctly updated number of documents

I am running an update by query call using the java rest client: https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/java-rest-high-document-update-by-query.html This is my code: (extracted only the relevant part and updated some…
0
votes
1 answer

query from Index in different Elasticsearch host

I use RestHighLevelClient to execute a query.I generate my client with multiple nodes like this. RestHighLevelClient client = new RestHighLevelClient( RestClient.builder( new HttpHost("host1", 9200, "http"), new…
0
votes
1 answer

how to catch IndexNotFoundException with RestHighLevelClient 6.5.0

I want to save data to es, but before save operation, i need always check whether or not the index exists; because the restHighLevelClient's bulk method never throws any exception about IndexNotFoundException; therefore it will make performance…
0
votes
1 answer

How to get Average from AvgAggregationBuilder elastic search for spesific keys

I'm am trying to get results from Elastic search with spesic keys example: average salary, by city, gender so i check at metrics_aggregations and I was able AvgAggregationBuilder totalDuration =…
Hard Worker
  • 995
  • 11
  • 33
0
votes
1 answer

Elasticsearch high level rest client could not map geo_point

I have an application for use elasticsearch geospatial. I am using elasticsearch rest client for indexing and searching documents. When i index a geo_point field to elastic i could not search them. I am getting an exception. My Object Class; import…
mertaksu
  • 535
  • 1
  • 9
  • 26
1 2 3
10
11