elasticsearch-7

Elastic search filter based on array of object

人盡茶涼 提交于 2021-02-11 18:23:29
问题 Below is mapping which i have { "defaultBoostValue":1.01, "boostDetails": [ { "Type": "Type1", "value": 1.0001 }, { "Type": "Type2", "value": 1.002 }, { "Type": "Type3", "value": 1.0005 } ] } I want to apply boost type based on type , so if boostType is Type3 then boostFactor should be 1.0005, and if it does not have that boostType, it should apply "defaultBoostValue" as boost below is the query which i have tried { "query": { "function_score": { "boost_mode": "multiply", "functions": [ {

Something inside Elasticsearch 7.4 cluster is getting slower and slower with read timeouts now and then

主宰稳场 提交于 2021-02-10 12:46:11
问题 Regularly the past days our ES 7.4 cluster (4 nodes) is giving read timeouts and is getting slower and slower when it comes to running certain management commands. Before that it has been running for more than a year without any trouble. For instance /_cat/nodes was taking 2 minutes yesterday to execute, today it is already taking 4 minutes. Server loads are low, memory usage seems fine, not sure where to look further. Using the opster.com online tool I managed to get some hint that the

ElasticSearch : Nested query not returning desired results

有些话、适合烂在心里 提交于 2021-02-05 09:28:16
问题 I am new to Elastic Search and facing some problems in implementing some queries. Following is my index structure { "cl_1" : { "aliases" : { }, "mappings" : { "properties" : { "@timestamp" : { "type" : "date" }, "@version" : { "type" : "long" }, "class" : { "type" : "text", "fields" : { "keyword" : { "type" : "keyword", "ignore_above" : 256 } } }, "file" : { "type" : "text", "fields" : { "keyword" : { "type" : "keyword", "ignore_above" : 256 } } }, "level" : { "type" : "text", "fields" : {

Elasticsearch put role API

泄露秘密 提交于 2020-08-17 12:02:18
问题 I started using the create role API and it works as expected : https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html I got the list of default roles in elasticsearch, /_security/role but I don't know to create the following roles and not able to find the proper docs for it. I want to segregate the user based on the following needs, Role which has the privilege to perform only READ / WRITE in all the indices in Elastic Search (This role should not have