Skip to content
Advertisement

Tag: elasticsearch

Spring data elasticsearch: Using @Document annotation on POJO interface class not working

I am migrating an application to the latest spring-boot version (using maven spring-boot-dependencies with version 2.5.4). I have an interface called Customer and I have two implementations of that interface (BusinessCustomer, PrivateCustomer) The three classes are annotated like that: For querying the index “customers” I used to have code like: But this is not working anymore. I get an error

Does MultiSearchRequest request returns response in the same sequence as it was added in SearchRequest?

I am using MultiSearchRequest to execute multiple search queries using SearchRequest as below: My question is when i call: MultiSearchResponse response = client.msearch(request, RequestOptions.DEFAULT); can i expect to get response in the same sequence as the requests were added OR they will be at random. Currently i am assuming it will be returning response in sequence as they were added

Difference between elasticsearch ReIndex task REST API implementation and Java rest high level client

Hi I’m trying to use elastic search reindex api via rest high level client and am comparing two ways of doing it. Rest API: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#docs-reindex-task-api [![Rest API Documentation screenshot][1]][1] Running reindex asynchronously – If the request contains wait_for_completion=false, Elasticsearch performs some preflight checks, launches the request, and returns a task you can use to cancel or get the status of

Name or Service not Known when calling service via spring boot in Openshift Container Platform (a cloud-based Kubernetes container platform)

I have an application which consists of a backend (spring boot) and a search engine (elasticsearch). After I deployed it into OCP, Initially I tested the connection between the two using the command “curl” to elasticsearch service (https://service-name.namespace.svc.cluster.local:9200) from backend pod and it worked. Here’s the picture: However, when I try to access elasticsearch from within the deployed backend application,

Spring Elasticsearch sorting by field with whitespace

I need to sort my documents by some fields, one sorting – one field. But every time I’m getting wrong sorting. In document I have uid and title. Uid in document looks like ‘AAA-100’ and title could be just a text with spaces. And when i’m trying to sort by those fields i’m getting wrong order. For example when i’m

Advertisement