Questions tagged [spring-data-elasticsearch]

Spring Data makes it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services as well as provide improved support for relational database technologies.

Spring Data makes it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services as well as provide improved support for relational database technologies.

1454 questions
6
votes
1 answer

elasticsearch dynamic query - Add another field to each document returned

What I need is very simple, but I am unable to find how to do it in Elasticsearch, possibly because of the complexity of what is required to be done. Input (two sample JSON documents) { "car" : 150, "bike" : 300 } { "car" : 100, "bike" : 200} What…
5
votes
4 answers

How to create complex query to Elasticsearch with OR logic using Spring Data Elasticsearch?

I'm looking for best approach to make complex query to Elasticsearch with OR logic from java. I really need something like ((A and B) or (C and D) or (E and F and G)). Now I using ElasticsearchTemplate and…
dsgr
  • 99
  • 6
5
votes
0 answers

Elasticsearch Spring Data - joining child object

in current project I'm using Elasticsearch Spring Data (3.0.9) with ES 5.5.0 and I'm researching for usage of parent-child relation (more specific I'm testing what approach is better [in meaning of performance] to use - nested objects or…
5
votes
1 answer

Spring data elasticsearch wrong page totalPages

I have a simple repository @Repository public interface SurgeryIndexRepository extends ElasticsearchRepository {} When I call the search method like this surgeryIndexRepository.search(query, pageable) I get a Page response…
Maelig
  • 2,046
  • 4
  • 24
  • 49
5
votes
2 answers

Caused by: java.lang.ClassNotFoundException: org.elasticsearch.transport.Netty3Plugin

I'm using Spring Boot 2.0.3 Release and i have problem while instantiating org.elasticsearch.client.Client. My code: Client client = new PreBuiltTransportClient(Settings.builder() .put("cluster.name", clustername) …
5
votes
2 answers

spring data elasticsearch dynamic multi tenant index mismatch?

I am experimenting with spring data elasticsearch by implementing a cluster which will host multi-tenant indexes, one index per tenant. I am able to create and set settings dynamically for each needed index, like public class SpringDataES { …
5
votes
1 answer

StackOverflowError exception. Cannot evaluate org.elasticsearch.common.inject.InjectorImpl.toString()

ElasticSearchTemplate throws exception during initialization Method threw 'java.lang.StackOverflowError' exception. Cannot evaluate org.elasticsearch.common.inject.InjectorImpl.toString(). XML config
java_dude
  • 4,038
  • 9
  • 36
  • 61
5
votes
3 answers

Automatically generate numerical id when using ElasticSearch with Spring Data

I am currently converting a project I did from Spring Data with Hibernate to Spring Data with ElasticSearch. Before, I was able to auto generate the id of my entity using the annotation @GeneratedValue(strategy = GenerationType.IDENTITY). This way,…
pike
  • 671
  • 3
  • 9
  • 23
5
votes
4 answers

java.lang.IllegalStateException: Received message from unsupported version: [2.0 .0] minimal compatible version is: [5.0.0]

I'm trying to do this sample tutorial, in order to get familiar with elasticsearch. but running the project it gives this error in intellij: org.elasticsearch.transport.NodeDisconnectedException: [][127.0.0.1:9300][cluster:monitor/nodes/liveness]…
ShakibaZar
  • 727
  • 3
  • 9
  • 27
5
votes
1 answer

PropertyReferenceException: No property findAll found for type

Spring boot Application I have entity Test which has both JpaRepository and ElasticSearchRepository when I use either of repositories indevidually its working fine. But when created two repositories for Test entity its throwing error bean creation…
5
votes
0 answers

Spring Data Elasticsearch containing query with spaces

I have an entity named Port with a field portName. I wrote following Spring Data ES query method for containing query: List ports = portRepository.findByPortNameContaining(searchText); It is working fine until the searchText doesn't contain…
user7014786
5
votes
0 answers

Why doesn't spring-data-elasticsearch use the objectmapper from the spring context

I am developing an application that uses spring-data-elasticsearch for the data storage. I am also writing this application using kotlin. This has some special quirks, one being that jackson needs the jackson-module-kotlin (to get rid of the…
Geert Olaerts
  • 1,155
  • 2
  • 9
  • 17
5
votes
4 answers

How to provide highlighting with Spring data elasticsearch

it seems that SpringData ES don't provide classes to fetch highlights returned by ES. Spring Data can return Lists of Objects but the highlights sections in the Json returned by ES is in a separated part that is not handled by the…
Sachin
  • 1,675
  • 2
  • 19
  • 42
5
votes
2 answers

ElasticSearch installation error - curl: (7) Failed connect to localhost:9200; Connection refused

I'm trying to configure ElasticSearch with this tutorial I did everything except step 4 of the tutorial. In step 5, when I run this command: curl -X GET 'http://localhost:9200' I get this error: curl: (7) Failed connect to localhost:9200;…
Mojtaba
  • 733
  • 4
  • 12
  • 26
5
votes
0 answers

Inconsistency in the Spring Data Elasticsearch documentation for limiting the result size of query with Top or First keyword

Spring data offers a convenient way to limit results with the keyword Top or First. We can read in the Spring Data ES documentation : The results of query methods can be limited via the keywords first or top, which can be used interchangeably.…