Questions tagged [elasticsearch-rest-client]

47 questions
1
vote
1 answer

How to write following elastic-search wildcard query in spring boot?

Database: Elasticsearch Field Name: "tag" Datatype: String Question: How to perform a search in the tag field with a wildcard character? I tried the following (in Kibana): User Request: { "tag" : [ "Attendance", "Employee" ] } POST test/_search { …
1
vote
1 answer

Write elastic search filter search using ES Java API v7.x

I tried to write a filter query using elastic search Java API version 7.6 But there is no good documentation on how to write a filter context search. Anyone know how to write Java API for the following: GET /_search { "query": { "bool": { …
1
vote
0 answers

ElastifcSearch UpdateByQueryRequest from 6.2 to 7.4.2

I have to upgrade our ES from 6.2 (TCP client) to 7.4.2 (REST API) And I have a little problem with UpdateByQueryRequestBuilder, that looks like need to be change to UpdateByQueryRequest (doc). The old code looks like this: BoolQueryBuilder…
AsfK
  • 3,328
  • 4
  • 36
  • 73
1
vote
1 answer

ElasticSearch AutoSuggest Built-In REST API

Currently I have a spring boot microservice that stores list of items in MongoDB. Now I want to add autosuggest functionality when searching by item's name (partial/fuzzy search). I'm thinking of using ElasticSearch's built in REST API for this. My…
1
vote
1 answer

Validation Failed: 1: source is missing;2: content type is missing; In ElasticSearch?

Hi I am trying to start an embedded elastic search server , then using a java high level rest client to insert a document in to an index. However i am getting the following error . com.openmind.primecast.web.rest.PerformanceReportingIntTest Time…
knowledgeseeker
  • 339
  • 4
  • 14
1
vote
2 answers

Can we pass Java Pojo to Elasticsearch Index API using new REST Client

I am going through the new Elasticsearch's Java REST client and looking at different ways to index a document ( here https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.3/java-rest-high-document-index.html ) Is there any possibility…
karthikdivi
  • 3,466
  • 5
  • 27
  • 46
1
vote
1 answer

How to generate the same elasticsearch query using Java Resthighlevel client?

I am trying to generate a query using the Java RestHighLevelClient of Elasticsearch similar to this: GET /field_search/_search { "query": { "bool": { "must": [ { "match": { "ENTRY_ID": "ttttt" } …
Shashank
  • 247
  • 5
  • 17
1
vote
1 answer

Elasticseach - RestHighLevelClient connection to elastic cloud

I'm not able to connecto to my cluster hosted by Elastic Cloud using RestHighLevelClient: org.apache.http.ProtocolException: Not a valid protocol version: [0x1e][0x1f][0x20]*ÿÿÿÿ[0x26][0x27][0x28][0x2a][0x2b][0x2c][0x2d]No acceptable header…
0
votes
1 answer

ElasticSearch: Connection to elastic search server from a Java Restful service fails with "java.net.ConnectException: Connection refused"

I have an elastic search server with security enabled. I have a Java application (a Restful service running inside Tomcat) which attempts to connect to the elastic search using the HTTP RestClient (So version differences between the elastic search…
Shobhana Sriram
  • 394
  • 1
  • 2
  • 14
0
votes
0 answers

Elasticsearch gives a high response time under very low throughput and vice versa

I have configured a self-managed Elasticsearch cluster with three nodes on Google Cloud VMs. The cluster consists of four primary shards and four replica shards. However, when I deployed Elasticsearch on the production environment, I noticed the…
0
votes
0 answers

Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed] error

i am new to elasticSearch, looking for the fix @Document(indexName = "user_filters") public class UserFilter { // Maps to _id field of ElasticSearch doc @Id private Long userId; @Field(type = FieldType.Nested, includeInParent =…
0
votes
0 answers

RuntimeException: Request cannot be executed; I/O reactor status: STOPPED in Elasticsearch

I'm using elasticsearch rest-high-level-client version 7.13 in java but randomly some of the requests (read/write) encounter this error! I've checked the memory usage and it's between 20% - 40% and have not OutOfMemoryError
0
votes
0 answers

High CPU Usage of I/O dispather thread when using RestHighLevelClient (elasticsearch-rest-high-level-client 7.10.2)

We are seeing 100% cpu utilisation on containers with elasticsearch high level client. We have stopped the ingestion onto the cluster and we are still seeing containers at 100%. top command shows all of the cpus are busy executing i/o dispatcher…
0
votes
2 answers

Unable to establish connection with elasticsearch 8.1 (java)

I have elasticsearch 8.1 running in docker with this docker compose file: version: '3.7' services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:8.1.0 container_name: es-node environment: -…
0
votes
1 answer

DeleteByQueryRequest socket timeout exception - java high level rest client api

I'm a beginner to elasticsearch and I want to delete a huge amount of document which matches to the particular query. I'm using DeleteByQueryRequest for this purpose. I tried the code below. String fileName="output2.log"; RestHighLevelClient client…