Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
303 views

I am using the Elasticsearch's 8.x Java API client for indexing documents to Elasticsearch. While indexing, I'm specifying an ingest pipeline to be executed during data ingestion. public Mono<...
Swastik Gupta's user avatar
1 vote
2 answers
2k views

I am using the new version 8.13 of Elasticsearch for a new search app and trying to imitate the below kind of logic using the new Java API client instead of using Java High Level Rest client which was ...
Xwin's user avatar
  • 163
0 votes
1 answer
54 views

Elk-Stack Version: 8.7.1 Java Api Client: 8.13.1 When executing a search I want to search over all indices excluding all indices that start with a dot. According to the regular Elasticsearch Api you ...
Oliver Olbrueck's user avatar
0 votes
1 answer
173 views

I am using elasticsearch-java api client (8.10.3) and facing a small issue and I hope someone has already encountered this issue before. I am trying to perform a min aggregation on documents that may ...
Almog Oz's user avatar
0 votes
1 answer
393 views

I have the following query to use with Elasticsearch. { "query": { "function_score": { "query": { "match_all": {} }, "...
developerd's user avatar
1 vote
1 answer
146 views

I have an ES index that is created from Java code level when I index a POJO with ElasticsearchClient. How do I specify that I need certain fields to be type: "nested" in my index?
James Work account's user avatar
0 votes
0 answers
161 views

I'm migrating from ES1.7 to 7.17. Facing some issues with implementing filteredQuery using Java Client API. For example, in 1.7.5 QueryBuilder queryBuilder = QueryBuilders.filteredQuery(QueryBuilders....
devilhector's user avatar
0 votes
1 answer
187 views

how to use "more Like this" query score to function score in Elasticsearch static FunctionScore mltFunctionScore(String text, Double weight, List<String> fields) { return ...
vane's user avatar
  • 41
0 votes
2 answers
672 views

The elasticsearch document has "flattened" fields that can contain one or more pairs of "name":"value". For example, the "flattened" fields "genre" ...
Dmitriy_Ze's user avatar
1 vote
1 answer
633 views

Use case: I have multiple kafka listeners for various topics. Each topic Listener will run in multiple threads (using spring's 'ConcurrentKafkaListenerContainer'). Listeners will be performing Update/...
Irfan Ulla's user avatar
0 votes
1 answer
276 views

Does anyone know if this is possible? The closest thing I've seen is the save query option in Kibana. But I'd like to have this for Java/Spring. My idea is for users to build their own elasticsearch ...
Pompompurin's user avatar
1 vote
1 answer
3k views

I'm trying to bulk insert documents in elasticsearch using java with (elasticsearch-java). I checked official documentation of elasticsearch-java and found information around bulk indexing in index, ...
Ssk's user avatar
  • 13
0 votes
1 answer
509 views

I have following structure in elastic search index { "_index" : "hotel", "_type" : "_doc", "_id" : "13171", "...
Sandeep Nair's user avatar
0 votes
2 answers
2k views

I attempted to add a couple new fields to an existing record in elastic search. The record is being updated, however all previously indexed fields have been cleared. Is there something am I doing ...
Phani Varma's user avatar
0 votes
1 answer
562 views

I'm using Quarkus 2.16.6.Final with ElasticSearch 8.7. I've written a small piece of code to use ES's update_by_query feature. try (Reader query = new StringReader(/*my json query String*/)) { var ...
Abhinab Kanrar's user avatar
0 votes
1 answer
63 views

I have the following structure in ES (Also dataset for this example) { "took": 3, "timed_out": false, "_shards": { "total": 5, "successful&...
Sandeep Nair's user avatar
1 vote
1 answer
1k views

I don't even know how to word this question properly so here's my best. This is the result of me getting the innerhits from a nested field called "attributes" I have for an index (after ...
Pompompurin's user avatar
1 vote
1 answer
1k views

I'm working with OpenSearch, and I have a large input text that contains several exercise names. I'd like to extract these exercise names from the input text and search for documents that match these ...
Taras Vovk's user avatar
1 vote
0 answers
2k views

I'm trying to create a Hit<ObjectNode> from a json string returned by Elastic (for unit-testing purposes). When I try to deserialize this using .withJson I get a ClassCastException with the ...
Mansfield's user avatar
  • 15.3k
0 votes
2 answers
590 views

This is my query function : public List<feed> search(String id) throws IOException { Query nestedQuery = NestedQuery.of(nq ->nq.path("comment").innerHits(InnerHits.of(ih -&...
Ali Abbasi's user avatar
0 votes
1 answer
442 views

I am migrating a java application from elastic search high level client to java api client. There is a SearchTemplateRequest class in elastic search java high level client. But I couldn't find any ...
Chetna Joshi's user avatar
0 votes
1 answer
1k views

I'm updating my Spring Boot project to version 3.0.0 of Spring Boot. One important dependecy is the Spring Data Elastic Repository. I included the starter dependency: implementation("org....
Sebastian A.'s user avatar
1 vote
1 answer
2k views

I'm trying to test pagination in the latest release (8.5) with point-in-time and search after in the Java API. I don't know exactly how to implement it as the Java API documentation is barely existent ...
maudderung's user avatar
0 votes
1 answer
1k views

GET products/_search { "query": { "multi_match" : { "query": "novel", "fields": [ "description", "name",&...
Ali's user avatar
  • 21
0 votes
1 answer
2k views

I want to use Java API client provided by ElasticSearch but I don't know if it would be compatible with my cluster. I saw there was ElasticSearch High Level REST client which has been deprecated for ...
Anonymous Panda's user avatar
0 votes
1 answer
1k views

My scripted update produces the following noop response since the condition was not met: /my_idx/_update/my_doc_id { "_index": "my_idx", "_type": "_doc",...
linusv's user avatar
  • 4,118
1 vote
1 answer
963 views

I've been trying to connect to my ES instance on the Elastic cloud with no success using the Java client and following the Documentation In the hostname I put https://myinstance-xx.europe-west1.gcp....
Ala A.'s user avatar
  • 2,345
0 votes
2 answers
404 views

I have a model for Book saved in elastic search. It has couple of attribute minimumAge and maximumAge, which determines what age the book is recommended for I have couple of usecases for searching ...
Sandeep Nair's user avatar
1 vote
1 answer
2k views

I am trying to move from Elastic High level rest client to Elastic Java API Client (Low Level Rest Client). I am able to get the response, but i want to set the timeout for my elastic query. But this ...
Ashish Mishra's user avatar
2 votes
4 answers
4k views

I hava tried many version of elasticsearch-java but none of it can work. So, my elasticsearch version is 7.5.2, and the error resonse is like this: org.elasticsearch.client.ResponseException: method [...
Aki's user avatar
  • 33
0 votes
1 answer
623 views

Hi Team I am using elasticsearch after a long time and facing some difficulties with multi_match queries. Essentially my query need to have an exact match on 2 fields and should do a text search on 4 ...
Tuhin Subhra Mandal's user avatar
0 votes
1 answer
2k views

I need examples for DeleteRequest with respect to ES 8.3.0 Java Api client. I am looking for code reference where I want to delete one particular document by passing index name and the condition to ...
Java's user avatar
  • 21
0 votes
1 answer
528 views

I'm migrating from the HLRC to the new client, things were smooth but for some reason I cannot index a specific class/document. Here is my client implementation and index request: @Configuration ...
Pompompurin's user avatar
0 votes
1 answer
1k views

I've been at this for a day and I don't quite understand how I do it! This is the query I want to "recreate" with the new Java API Client (using Spring Boot) { "aggs": { &...
Pompompurin's user avatar
1 vote
1 answer
3k views

I am having a hard time on using the new elasticsearch-java api client. I am migrating from HLRC to the new elasticsearch java api. When I create an index, I used CreateIndexRequest and load it with ...
francissoria's user avatar
4 votes
3 answers
5k views

I'm using elasticsearch-java-client 7.17.4 to make my a count request to AWS Elasticsearch server like this follow code elasticsearchClient.count(s -> s .index("my-index") ).count(); ...
Bruce's user avatar
  • 1,145
3 votes
3 answers
10k views

I am trying to convert some Java High Level REST Client code to new Elasticsearch Java API Client. I want to convert this query which retrieves the contents if the id is equal to 10 or 20. ...
cagdasalagoz's user avatar
3 votes
2 answers
15k views

I wanted to swap out the deprecated High Level Rest Client with the new Java API Client from Elasticsearch. Problem is, I'm not sure if my dependencies are configured correctly! I'm running into this ...
Pompompurin's user avatar
2 votes
1 answer
6k views

I'm learning about Elasticsearch and the Java Client API (currently just following the documentation), it works well but I'm wondering if it's possible to return the whole search response from a query ...
Pompompurin's user avatar
2 votes
3 answers
4k views

We wanted to create IndexRequest, DeleteRequest, UpdateRequest and BulkRequest in Elasticsearch version 8 using JAVA APIs. But I don't see any java documentation in elasticsearch v8 official website. ...
Dunggeon's user avatar
  • 110
1 vote
0 answers
568 views

I have got a simple method that performs simple terms aggregation using elastic search8.0 I am able to do it using RestHighLevelClient but with ElasticsearchClient I am getting empty buckets. can ...
khasim's user avatar
  • 21
0 votes
2 answers
5k views

I'm trying this basic elasticsearch example from there guide to use java client API in a spring boot project. but it gives me the following error when running: java.lang.NoSuchMethodError: org.apache....
zaydoosh's user avatar
  • 379
1 vote
1 answer
411 views

I am trying to migrate some elastic functionalty from elasticsearch 6.5.4 -> 8.1.1, specifically a functionScoreQuery: private SearchRequest buildRequest(String query) { SearchRequest ...
T Ä's user avatar
  • 21
1 vote
1 answer
1k views

my search field is one ,but I need to highlight two fields in a document? how can I achieve this Ex: my search query is match:{"file":"hello"} I want to highlight email field also
AJITHKUMAR's user avatar
1 vote
1 answer
2k views

i need to highlight the match word in a document, in java client. i don't know where to fix highlight object this is my java code for search: HighlightBuilder highlightBuilder = new ...
AJITHKUMAR's user avatar
0 votes
1 answer
175 views

I'm using the newer 8.1 Java API for Elastic in Kotlin, and getting behavior that isn't what I would expect, nor what I get when using the manual REST API. Here's my code: val boolQuery = BoolQuery....
Richard Pianka's user avatar
0 votes
1 answer
2k views

I found some topics about ranged queries and Elasticsearch but these use the deprecated High Level REST Client interface. I also found a discussion on the elasticseach page which uses the new ...
Pangaeanain's user avatar
1 vote
2 answers
851 views

I want to explicitly order highlighted fields using the Elasticsearch Java API Client 7.16. In other words I want to build the following request GET /_search { "highlight": { "...
igor's user avatar
  • 759
3 votes
6 answers
6k views

A new Java API Client was released in the 7.16 version of ES and the Java Rest Client was deprecated. There was the ability to convert a query to JSON in the deprecated client. It was convenient for ...
igor's user avatar
  • 759
1 vote
1 answer
411 views

I have a dynamic template in which I use the special value {dynamic_type}, as I need it to work on every type that doesn't match any of my other templates. (https://www.elastic.co/guide/en/...
jwbroek's user avatar
  • 11

1
2 3 4 5 6