I have 2 documents, ShopDocument and ProductDocument. What i need is to filter out all shops that have field hidden and removed equals to true, from shops that left filter out products that have removed and hidden fields equal to true, then from whats left, i want to filter out shops and products that doesnt match certain string (the matching
Tag: elasticsearch
Multiple queries in E v5.6 REST high level client
How can I have multiple query in Search API in elasticsearch v5.6 in rest high level client? I need to have OR and AND queries in the search query. I’ve been using searchSourceBuilder, it only has one matchQuery. Thanks in advance! Answer You can use something like: BoolQueryBuilder finalQuery = QueryBuilders.boolQuery(); For OR clauses you can use: finalQuery.should().add(your query); For
Importing OpenTelemetry trace data from Spring Boot application to Elastic APM – views are missing data
I have a Spring Boot application with Spring Cloud Sleuth, OpenTelemetry instrumentation and OpenTelemetry exporter OTLP. This is a gist of dependencies: spring-cloud-starter-sleuth without Brave, because we are using OpenTelemetry instrumentation spring-cloud-sleuth-otel-autoconfigure which introduces OpenTelemetry instrumentation libs and provides Spring autoconfiguration opentelemetry-exporter-otlp for sending data to apm server I have only basic configuration in my application.yml: With this setup I
enabling Elasticsearch in JHipster results in UnsatisfiedDependencyException: Error creating bean with name ‘userService’
I’ve been trying to build an app with JHipster that can use some advanced filtering, in particular ElasticSearch. Why does it fail when I run it out of the box, without even editing the project ? I am running the following software in Windows 10: Java v15.0.2 node v14.17.4 NPM 6.14.14 Same happens in Ubuntu with: Java v17.0.1 node v16.14.0
ElasticsearchClient 7.16 mapping source from JSON file
I’m migrating our app to new ElastisearchClient for Java. We have few mapping/setting/properties configurations created in JSON files like here Elastic mapping source 7.15. Is it still possible to map sources as in these examples? Or is it fully migrated to: builders and functional patterns Currently, we do it like this (RestHighLevelClient 7.14 Elastic): Answer It’s possible from 7.17.0 version
ElasticSearch how to aggregation the “copy_to” field
I need to group by 9 fileds and get the count for each group in ElasticSearch, the orignal code use the “Script” and the performance is bad so i need to optimize it. I managed to create a new field and use “copy_to”, but when I aggregate with the new filed i found some problem. I use the ‘srcIp’ and
Elasticsearch 7 – query with raw JSON of Kibana
Recently I’ve started using the Elasticsearch (7.6.x) with Java backend (I’m pretty much a beginner in ES) and I have a general question, I’ve searched for that but didn’t find an answer: My workflow goes like this: I open kibana’s dev tools console and come up with a query to search. Since the syntax is new to me, it takes
Connecting to ES with Spring Data Elasticsearch (reactive) gives error host not reachable
I’m running on an aws-elasticsearch (with OpenSearch 1.1.x) service and im trying to connect with it from a spring application using spring-data-elasticsearch, according to the doc i configured the bean as it says. on my local i used a ssh tunnel from my aws account. i used this command: so i can connect with OpenSearch dashboard over localhost in my
@IndexedEmbedded on class containing other @IndexedEmbedded fields
I’m trying to manage hibernate search indexing on a class with a field mapped by @IndexedEmbedded on a custom @Embeddable entity. This entity also contains others @IndexedEmbedded fields in the @MappedSuperclass. These are the entities involved: And these classes: When running the application, Hibernate Search throws the following error: I’m running it with the following dependencies: Any suggestion on how
CRATE db tables are causing an error when upgrading to CRATE:4.3.4 from CRATE:4.2.7
Facing the below error while restoring snapshots or upgrade cratedb to a higher version from 4.2.7 to 4.3.4 Below is the sample table creation schema. As field3 is the dynamic object, it’ll allow adding more attributes into it. So, now after data is inserted into the table the current schema is as follows I’ve taken a snapshot and now I’m