ElasticSearch

python-logstash not working

有些话、适合烂在心里 提交于 2021-01-27 12:46:02
问题 I have an elasticsearch cluster (ELK) and some nodes sending logs to the logstash using filebeat. Lately I added a new application server, who is sending logs to my logstash using python-logstash . My logstash input configuration looks something like this : input { beats { type => beats port => 5044 } udp { port => 5044 } } My application server sends the logs successfully to the logstash. On my logstash machine I tried to run the following command: tcpdump -nn | grep x.x.x.x x.x.x.x is the

Elastic Search: One index with custom type to differentiate document schemas VS multiple index, one per document type?

本小妞迷上赌 提交于 2021-01-27 12:23:44
问题 I am not experienced in ES (my background is more of relational databases) and I am trying to achieve the goal of having a search bar in my web application to search the entire content of it (or the content I will be willing to index in ES). The architecture implemented is Jamstack with a gatsby application fetching content (sometimes at build time, sometimes at runtime) from a strapi application (headless cms). In the middle, I developed a microservice to write the documents created in the

How to disable SSL verification for Elasticsearch RestClient v6.7.0 in Java

随声附和 提交于 2021-01-27 12:21:25
问题 I'm trying to connect to an elasticsearch instance which is behind a ssh tunnel. Domain of the elasticsearch instance is *.ap-south-1.es.amazonaws.com while locally on the tunnel, I connect via localhost:9201 . Here is the code I'm using to connect to elasticsearch RestHighLevelClient(RestClient.builder(HttpHost("localhost", 9201, "https"))) I'm getting the following error javax.net.ssl.SSLPeerUnverifiedException: Host name 'localhost' does not match the certificate subject provided by the

How to correctly query inside of terms aggregate values in elasticsearch, using include and regex?

て烟熏妆下的殇ゞ 提交于 2021-01-27 07:01:51
问题 How do you filter out/search in aggregate results efficiently? Imagine you have 1 million documents in elastic search. In those documents, you have a multi_field (keyword, text) tags : { ... tags: ['Race', 'Racing', 'Mountain Bike', 'Horizontal'], ... }, { ... tags: ['Tracey Chapman', 'Silverfish', 'Blue'], ... }, { ... tags: ['Surfing', 'Race', 'Disgrace'], ... }, You can use these values as filters, (facets), against a query to pull only the documents that contain this tag: ... "filter": [

How to correctly query inside of terms aggregate values in elasticsearch, using include and regex?

雨燕双飞 提交于 2021-01-27 06:56:28
问题 How do you filter out/search in aggregate results efficiently? Imagine you have 1 million documents in elastic search. In those documents, you have a multi_field (keyword, text) tags : { ... tags: ['Race', 'Racing', 'Mountain Bike', 'Horizontal'], ... }, { ... tags: ['Tracey Chapman', 'Silverfish', 'Blue'], ... }, { ... tags: ['Surfing', 'Race', 'Disgrace'], ... }, You can use these values as filters, (facets), against a query to pull only the documents that contain this tag: ... "filter": [

No property index found for type User

拟墨画扇 提交于 2021-01-27 06:03:40
问题 I'm trying to use ElasticSearch with MySQL in the same project. I defined two repositories in different project but I always get this error message: Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.owish.services.UserServices com.owish.controllers

Spring Data Elasticsearch requires property named id

假如想象 提交于 2021-01-27 06:03:18
问题 I started to work with Spring Data Elasticsearch and find issue. During run test which is calling findAll() through repository I am getting: No id property found for class com.example.domain.entity.Project! When I add field @Transient private Long id; in my Project entity then I am able to retrieve results correctly. But I do not want to add this field because I have already defined primary key named projectId . There is annotation @Id for that field also, so why my field projectId is not

Consider defining a bean named 'elasticsearchTemplate' in your configuration

不打扰是莪最后的温柔 提交于 2021-01-27 05:20:11
问题 I have just started springboot and tried to implement elastic search with spring-boot but I am getting this type of error while running spring-boot app Consider defining a bean named 'elasticsearchTemplate' in your configuration. POM.XML <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>

Spring Data Elasticsearch (4.x) - Using @Id forces id field in _source

旧时模样 提交于 2021-01-27 05:19:12
问题 Summary Recently we upgraded to Spring Data Elasticsearch 4.x. Part of this major release meant that Jackson is no longer used to convert our domain objects to json (using MappingElasticsearchConverter instead) [1]. This means we are now forced to add a new id field to all our documents. Previously we had domain objects like this: import org.springframework.data.annotation.Id; public ESDocument { @Id private String id; private String field1; @JsonIgnore public String getId() { return id; }

Spring Data Elasticsearch (4.x) - Using @Id forces id field in _source

蓝咒 提交于 2021-01-27 05:19:08
问题 Summary Recently we upgraded to Spring Data Elasticsearch 4.x. Part of this major release meant that Jackson is no longer used to convert our domain objects to json (using MappingElasticsearchConverter instead) [1]. This means we are now forced to add a new id field to all our documents. Previously we had domain objects like this: import org.springframework.data.annotation.Id; public ESDocument { @Id private String id; private String field1; @JsonIgnore public String getId() { return id; }