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
1
vote
1 answer

Elasticsearch exception [type=parsing_exception, reason=[wildcard] query does not support [case_insensitive]]

I'm using 7.10.2 version of Maven-org-elasticsearch-client_elasticsearch-rest-high-level-client version and WildcardQueryBuilder should work with caseInsensitive property. Following is my code snippet and I'm getting "Elasticsearch exception…
1
vote
0 answers

Is it posibile to use RestHighLevelClient with assume role?

I am trying to implement integration with elastic search on aws with RestHighLevelClient. the only supported authentication method I found is UsernamePasswordCredentials: credentialsProvider.setCredentials(AuthScope.ANY, new…
1
vote
0 answers

How to use BulkProcessor in synchronous processing?

I am trying to figure out how to use BulkProcessor java-rest-high-document-bulk-processor during synchronous processing (bulk method) so that I could write something like this: val processor = BulkProcessor.builder( { request, _ -> …
avocato
  • 211
  • 3
  • 11
1
vote
0 answers

ElasticSearch rest high level client createIndexRequest

Iam trying to create an index using the rest high-level client by passing the indexName as "test_". But the request that goes to the ElasticSearch has "test_%5C" as the indexName. Why is ElasticSearch appending %5C instead of . CreateIndexRequest…
Deepti
  • 21
  • 1
1
vote
1 answer

ElasticSearch term query returns 0 hits although document exists

I have an ES domain, from which when I query with the document's emailId field, I'm not getting any hits. However this field and value exist for a document. For the same document, querying by employeeId works. Below is how my index mapping looks…
1
vote
1 answer

What is the best way to execute elasticsearch queries with RestHighLevelClient

Trying to use CompletionSuggester for autocomplete feature, There are different ways to implement the completion-suggester through Java's RestHighLevelClient, Wanted to understand is there any difference (in terms of performance/query execution…
manjunath
  • 91
  • 1
  • 4
1
vote
3 answers

Connect springboot java RestHighLevelClient to aws elasticsearch

Config: private static final String HOST = "search-qas-sam-zxbalglrksamjfcazl3zmkiiq7.ap-south-1.es.amazonaws.com"; private static final int PORT = 443; // tries 9200, 9300, 80 private static final String PROTOCOL = "https"; @Bean public…
1
vote
0 answers

Running a java program and using the return value in another program

So, what I need to do is create 2 RestHighLevelClients (for 2 different environments) in a Java ElasticSearch Connector. And then get data through the Clients from both environment. Now, if I had the hostname and port number for both environment,…
1
vote
1 answer

Change elastic documents dynamically using Java High Level REST client

My main purpose is to update an existing document in ElasticSearch, via Java High Level REST Client. For this task, I'm using UpdateByQueryRequest, and sets a Script which modifies the relevant docs. My question is, if I can set the fields and their…
1
vote
1 answer

Java RestHighLevelClient - Elastic Search - How to add special character '/' in id field value

Getting exception while inserting field value with '/' in elastic search Code: String id = "/EACVBSDSFASFA"; IndexRequest indexRequest = new IndexRequest(INDEX, TYPE, id).source(objectsMap); IndexResponse indexResponse =…
Saurabh Raoot
  • 1,303
  • 3
  • 26
  • 31
1
vote
2 answers

Avoid timeout in Elasticsearch re-indexing in Java

Below code returned a timeout in client (Elasticsearch Client) when number of records are higher. CompletableFuture future = new CompletableFuture<>(); client.reindexAsync(request, RequestOptions.DEFAULT, new…
1
vote
0 answers

Migrate Transport Client to RestHighLevelClient Search Query

I am new in elastic search. I have to migrate search query from Transport client to RestHighLevelClient. Below is the code with Transport client which I need to migrate. SearchRequestBuilder searchRequestBuilder =…
1
vote
1 answer

creating index using RestHighLevelClient failing

I am trying to create index using RestHighLevelClient, Client got created successfully but while creating index I am getting error. CreateIndexRequest request = new CreateIndexRequest(elasticsearchIndex); request.settings(Settings.builder() …
1
vote
1 answer

How to get Node status HighLevelRESTClient ElasticSearch

I am using the Java HighLevelRestClient to connect to my ElasticSearch.I was working on a task to get the health status of each nodes. Tried with : private string getHighLevelClientInfo(){ try{ ClusterHealthResponse…
1
vote
0 answers

Elastic Search Rest High Level Client returns 403 error

I have an elastic search service behind a CNAME and when I try to access it through my command line using curl command, I am able to get the correct response with HTTP 200 OK response. However, when I try connecting to the service using Java API's…
1 2
3
10 11