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
0
votes
1 answer

Indexing domain object using elastichsearch, spring data and JPA

Im working on a application using spring data and JPA to implement a REST-based service. I want to use elastcSearch as an indexing engine. My domain object: @Document(indexName="elastic",type="user_demo") @Entity @Table(name="USER_DEMO") public…
Achraf
  • 658
  • 6
  • 14
  • 34
0
votes
1 answer

@Query ignored in ElasticSearch Spring java framework

I have this interface defined in Spring for querying Elascticsearch. I added @Query annotation to get some filtering done. public interface ObjectElasticSearch extends ElasticsearchRepository { @Query("{\"query\" :…
0
votes
2 answers

Elasticsearch NumberFormatException when running two consecutive java tests

I have two test in a class, each of them containing the following query: SearchQuery searchQuery = new NativeSearchQueryBuilder().withQuery(matchAllQuery()).withFilter(rangeFilter("publishDate").lt(date)).build(); In one of the tests, the number…
0
votes
2 answers

Elastic Search - Exact phrase search with wildcards

I am looking for help on exact phrase search with wild card. QueryBuilders.multiMatchQuery("Java Se", "title", "subtitle") .type(MatchQueryBuilder.Type.PHRASE_PREFIX); The above query, returns the following results. 1) Java Search 2) Elastic…
user1578872
  • 7,808
  • 29
  • 108
  • 206
0
votes
2 answers

Elasticsearch Query String with Dot/Point at the end, i.e. +foo.*

I have an index containing lot's of streets. The index looks like this: Mainstreet 42 Some other street 15 Foostr. 9 The default search query looks like this: +QUERY_STRING* So querying for foo (sent as +foo*) or foostr (sent as +foostr*) results…
Benjamin M
  • 23,599
  • 32
  • 121
  • 201
0
votes
3 answers

Spring data elasticsearch scan and scroll paged result is not working?

I have problems using scan and scroll as the pages from scan return strange result. I am not using them exactly as stated in the documentation. In the method getAllExampleItems() I have a while loop on the "page.hasNext()" method, which always…
0
votes
1 answer

Elastic search aggregation and range

We want to aggregate some value. For example sake, let's say we are indexing users, who register in an organization. We want to get the registered users count splitted like : registered from gmail : 900 registered via fb : 800 registered via yahoo…
0
votes
2 answers

Store Key-Value structure in Elasticsearch via Spring-Data

I need information how to store the best way a Document (Java POJO) with the Spring-Data-Elasticsearch @Document Annotation which includes a Map @Document(indexName = "downloadclienterrors", type = "downloadclienterror") public class…
0
votes
1 answer

elasticsearch nested document query

I'm new to elasticsearch, well have some idea on how to go about doing filters, queries, and aggregation but not sure how to solve this following problem below. I'm want to be able to query only the most recent deliveries (date and crate_quantity)…
0
votes
1 answer

Updating filtered documents in elasticsearch

I want to know if there is a way to update elasticsearch documents after filtering them out. Let's say I have a user collection with following documents: [ { "name":"u1","age":23}, { "name":"u2","age":31}, { "name":"u3","age":27}, {…
Sambhav Sharma
  • 5,741
  • 9
  • 53
  • 95
0
votes
1 answer

Is it possible to map a spring data entity field to another field in elasticsearch?

I have this model: public class Foo{ @Field(type = FieldType.String, store = true) String color; } right now it maps to the field "color" in elasticsearch document. Can I map it to another field: "shirtColor"? Maybe through an annotation?
user1099123
  • 6,063
  • 5
  • 30
  • 35
0
votes
1 answer

Elasticsearch Query Aggregate spring framework elasticsearsh How To?

I would like to aggregate the result of my query using the following : "aggs": { "agg1": { "terms": { "field": "basket_id_1", "size":0 }, "aggs": { "basket_id_2": { "terms": { …
Xarouma
  • 171
  • 1
  • 10
0
votes
1 answer

Spring Data elasticsearch @Query annotation for nested objects

I have two class, @Document public class PracticeQuestion { private int userId; private List questions; // Getters and setters } public class Question { private int questionID; private String type; // Getters and…
Munees Majid
  • 747
  • 2
  • 8
  • 22
0
votes
2 answers

Conflict between Spring data MongoDb and Elasticsearch

I started a project in which I use both Mongo, Elasticsearch and spring boot. With either technologies by itself, the project works just fine. However with both together, they conflict. I saw this particular article that seemed to be similar to my…
0
votes
3 answers

UnsatisfiedResolutionException thrown when using Spring Data Elasticsearch in CDI

I followed the Spring Data Elasticsearch documentation with regard to the CDI integration in order to use Elasticsearch repositories in a CDI environment. In short I have imported the related dependencies with Maven and tried to make available the…
Tassos G.
  • 1
  • 3