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

How to reproduce the ElasticSearch query?

I have ElasticSearch query with which I fetch data through Kibana. I also require the same request in my Java application. The query generated by Kibana is the following one: { "version": true, "size": 500, "sort": [ { "@timestamp":…
Pasha
  • 1,768
  • 6
  • 22
  • 43
0
votes
1 answer

How does spring framework knows how to instantiate RestHighLevelClient in this example?

I'm following this post which explains how to use Java High Level REST Client (JHLRC) to connect with ElasticSearch. The important parts for this questions are in ElasticsearchConfig.java: @Configuration public class ElasticsearchConfig { ... …
lepe
  • 24,677
  • 9
  • 99
  • 108
0
votes
2 answers

Flink ES connection Not compiling as expected

My problem is somewhat as described here. Part of Code (actually took from apache site) is as below val httpHosts = new java.util.ArrayList[HttpHost] httpHosts.add(new HttpHost("127.0.0.1", 9200, "http")) httpHosts.add(new HttpHost("10.2.3.1", 9200,…
0
votes
1 answer

How to full query on elastic about Chinese characters

I want to do the full match query on elastic here is the data: { "organizationId": "ec1c691a4b43e65aebdb2ab9481", "organizationName": "工業區" } If I use this code QueryBuilder QueryBuilder = QueryBuilders.termQuery("organizationName","工"); it…
0
votes
3 answers

Elastic Search 7 High level Client Create Index with mapping

iam using elastic search 7.0. I have a model which has to be saved to elastic. When the index did not exist, then i try to save the documents directly to elastic: final IndexRequest indexRequest = new IndexRequest("seminar_map", "seminar", id) …
0
votes
2 answers

RestHighLevelClient Not Found in Scala

I am trying to insert into ElasticSearch(ES) in a Scala Program. In build.sbt I have added libraryDependencies += "org.elasticsearch.client" % "elasticsearch-rest-high-level-client" % "7.5.2" , libraryDependencies += "org.elasticsearch" %…
0
votes
1 answer

Why simple query by id could cause timeout exception?

Occasionally, there are below exception in production environment, 2020-01-29 17:10:46.085 ERROR 2852 --- [o-8022-exec-258] c.c.p.common.dao.SearchDao : Search person by id failed java.net.SocketTimeoutException: 30,000 milliseconds…
zhuguowei
  • 8,401
  • 16
  • 70
  • 106
0
votes
2 answers

How do we create an IndexRequest in Java for ElasticSearch 7.4.2 Java High Level REST Client?

I am trying to insert data into ElasticSearch (version 7.4.2) hosted on bonsai.io cloud. When I try to create an IndexRequest & IndexResponse in my client code in Java (Java High Level REST client), there is no import available for both IndexRequest…
0
votes
0 answers

elasticsearch in json string (and / or )

I am new to AWS elasticsearch but need to create queries to search the follow data with different criteria. search_metadata (json string with key/value pair) - "{\"number\":\"111\"; \"area\":\"central\"; "\code\":\"1111\";…
0
votes
1 answer

Ignore white-spaces when searching - RESTHighLevelClient Java

I am performing a search on a field that contains spaces, I would like it to not be analysed i.e. not be split to grams and be considered as a single entity. How do I do this in Java? I am using the RESTHighLevelClient, version 7.4.
Ace
  • 700
  • 7
  • 37
0
votes
1 answer

How to perform a search with multiple strings with RESTHightLevelCient

I have a field which has multiple strings, how do I write a search query for that with the RESTHightLevelCient. Also, the search string i give is just a partial string. Adding a little more detail. I am trying to implement something where I have…
Ace
  • 700
  • 7
  • 37
-1
votes
1 answer

Getting below error in elastic search rest high level client

I am getting below error when i try to create the mapping using create index request. Elasticsearch exception [type=mapper_parsing_exception, reason=Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: …
-1
votes
1 answer

How to write json mapping in java using elastic search RestHighLevelClient?

I have the below mapping and wondering how to write the same mapping in java using RestHighLevelClient { "mappings": { "properties": { "events": { "type": "nested", "properties": { "ecommerceData": { …
1 2 3
10
11