elasticsearch-5

Secure Elastic connection using transport client

我只是一个虾纸丫 提交于 2020-12-12 09:36:35
问题 The bounty expires in 7 hours . Answers to this question are eligible for a +50 reputation bounty. Atul Thakre is looking for a canonical answer . Need to connect to a secure elastic search which has https authentication using Transport client in java code. I have userId and password to connect secure elastic. I am using elasticsearch 7.10.0. try { Settings settings = Settings.builder().put("cluster.name", clusterName) .put("xpack.security.user", "elastic:elastic") .put("xpack.security

Elasticsearch: restart node after java.lang.OutOfMemoryError: Java heap space

ぃ、小莉子 提交于 2020-12-08 07:59:10
问题 One of my ES nodes has failed because of java.lang.OutOfMemoryError: Java heap space error. Here is the full stack trace from the logs: [2020-09-18T04:25:04,215][WARN ][o.e.a.b.TransportShardBulkAction] [search1] [[my_index_4][0]] failed to perform indices:data/write/bulk[s] on replica [my_index_4][0], node[cm_76wfGRFm9nbPR1mJxTQ], [R], s[STARTED], a[id=BUpviwHxQK2qC3GrELC2Hw] org.elasticsearch.transport.NodeDisconnectedException: [search3][X.X.X.179:9300][indices:data/write/bulk[s][r]]

Elastic Search - Tokenization and Multi Match query

我们两清 提交于 2020-07-31 04:20:21
问题 I need to perform tokenization and multi match in a single query in Elastic Search. Currently, 1)I am using the analyzer to get the tokens like below String text = // 4 line log data; List<AnalyzeToken> analyzeTokenList = new ArrayList<AnalyzeToken>(); AnalyzeRequestBuilder analyzeRequestBuilder = this.client.admin().indices().prepareAnalyze(); for (String newIndex : newIndexes) { analyzeRequestBuilder.setIndex(newIndex); analyzeRequestBuilder.setText(text); analyzeRequestBuilder.setAnalyzer

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

elasticsearch mapping with numeric token

我与影子孤独终老i 提交于 2020-07-23 02:22:09
问题 I have the mapping below and it works normally { "settings": { "index": { "number_of_shards": "5", "number_of_replicas": "0", "analysis": { "filter": { "stemmer_plural_portugues": { "name": "minimal_portuguese", "stopwords" : ["http", "https", "ftp", "www"], "type": "stemmer" }, "synonym_filter": { "type": "synonym", "lenient": true, "synonyms_path": "analysis/synonym.txt", "updateable" : true }, "shingle_filter": { "type": "shingle", "min_shingle_size": 2, "max_shingle_size": 3 } },

Phrase suggester with ngrams

瘦欲@ 提交于 2020-07-22 06:40:08
问题 because I use the option "output_unigrams_if_no_shingles": true" in the "shingle_filter" filter for in the search for suggestion only show shingles in the results, but the suggestions display the ngrams "shingle_filter": { "type": "shingle", "min_shingle_size": 2, "max_shingle_size": 3, "output_unigrams_if_no_shingles": true Follow below my mapping { "settings": { "index": { "number_of_shards": "5", "number_of_replicas": "0", "analysis": { "filter": { "stemmer_plural_portugues": { "name":