elasticsearch-aggregation

Elasticsearch analyzer for parsing the application logs

我们两清 提交于 2020-07-23 06:19:12
问题 I am using the file beat and able to successfully push the logs to the elasticsearch in a particular index. I have a use case where I need to find the duplicates in the logs, I tried using aggregation and I am able to find the duplicates in the logs for the exact log match like below, 2019-07-23 11:38:17,401 WARN [org.amazon.events] (default task-3) type=LOGIN_ERROR, realmId=amazon, clientId=angular-cors, userId=209fd7db-6964-41ff-bffd-3975ccbc03bb, ipAddress=44.44.44.44, error=invalid_user

Elasticsearch analyzer for parsing the application logs

萝らか妹 提交于 2020-07-23 06:18:20
问题 I am using the file beat and able to successfully push the logs to the elasticsearch in a particular index. I have a use case where I need to find the duplicates in the logs, I tried using aggregation and I am able to find the duplicates in the logs for the exact log match like below, 2019-07-23 11:38:17,401 WARN [org.amazon.events] (default task-3) type=LOGIN_ERROR, realmId=amazon, clientId=angular-cors, userId=209fd7db-6964-41ff-bffd-3975ccbc03bb, ipAddress=44.44.44.44, error=invalid_user

Elasticsearch analyzer for parsing the application logs

試著忘記壹切 提交于 2020-07-23 06:17:26
问题 I am using the file beat and able to successfully push the logs to the elasticsearch in a particular index. I have a use case where I need to find the duplicates in the logs, I tried using aggregation and I am able to find the duplicates in the logs for the exact log match like below, 2019-07-23 11:38:17,401 WARN [org.amazon.events] (default task-3) type=LOGIN_ERROR, realmId=amazon, clientId=angular-cors, userId=209fd7db-6964-41ff-bffd-3975ccbc03bb, ipAddress=44.44.44.44, error=invalid_user

Logstash aggregate filter use with pagination

☆樱花仙子☆ 提交于 2020-07-20 04:17:28
问题 I have a logstash pipeline that fetches data from mysql using jdbc input connecter aggregates data for users based on user id pushes aggregated data to elasticsearch cluster It fetches large amount of data (e.g 2 million rows) from mysql server and uses cursor fetch with "jdbc_fetch_size" of 100000 so that it does not load all the rows at once (not page size, limit + offset but fetch_size) to avoid out of memory exception. Below is my configuration: input { jdbc { jdbc_driver_class => "com

Aggregation in elasticsearch across indices is not working

陌路散爱 提交于 2020-07-09 12:37:05
问题 I was using elasticsearch 5.5 where I have one index and 3 types like below, Index Name : Main Types : TypeA, TypeB, TypeC In 5.5, I was running aggregation like this, AggregationBuilder ag = AggregationBuilders.terms("aggregatekey").field("field1").order(Terms.Order.aggregation("datafield", false)).size(100); SearchResponse response = eswrapper.prepareSearch("Main").addAggregation(ag).setSize(0) .execute().actionGet(); so It searches across the single index where 3 types were there. Then I

Elasticsearch: Save aggregations query into CSV file

不问归期 提交于 2020-06-29 03:55:06
问题 I have data such as: { "_index": "user_log", "_type": "logs", "_id": "gdUJpXIBAoADuwvHTK29", "_score": 1, "_source": { "user_id": 105, "user_name": "prathameshsalap@gmail.com", "working_hours": "2019-10-21 09:00:01", "date": "2019-10-21", "working_minutes": 540 } { "_index": "user_log", "_type": "logs", "_id": "gtUJpXIBAoADuwvHTK29", "_version": 1, "_score": 0, "_source": { "user_id": 106, "user_name": "vaishusawant143@gmail.com", "working_hours": "2019-10-21 09:15:01", "date": "2019-10-21",

Elasticsearch: Sort the Documents on the index value of the search string in a text field

南笙酒味 提交于 2020-06-28 05:02:14
问题 I have Elasticsearch data like this- PUT /text/_doc/1 { "name": "pdf1", "text":"For the past six weeks. The unemployment crisis has unfolded so suddenly and rapidly." } PUT /text/_doc/2 { "name": "pdf2", "text":"The unemployment crisis has unfolded so suddenly and rapidly." } In this example I am making a full text search, I am searching for all the documents that have "unemployment" sub-string in the "text" field. And in the end i want all the documents sorted in the ascending order of the

Desire feature of searching for part of word in Elasticsearch returning nothing. Only works with complete word

浪尽此生 提交于 2020-05-24 04:44:23
问题 I tried two different approaches for creating index and both are returning anything if I search for part o the word. Basically, if I search for first letters or letters in the middle of the word I want get all the documents. FIRST TENTATIVE BY CREATING INDEX THAT WAY (other stackoverflow question a bit old): POST correntistas/correntista { "index": { "index": "correntistas", "type": "correntista", "analysis": { "index_analyzer": { "my_index_analyzer": { "type": "custom", "tokenizer":