Currently i am using your example and i got this simulation output.
"result": {
"execution_time": "2018-06-21T11:02:18.582Z",
"execution_duration": 6,
"input": {
"type": "search",
"status": "success",
"payload": {
"_shards": {
"total": 25,
"failures": [
{
"node": "yYkc8cDWRgm6sXhgrEnnjQ",
"reason": {
"reason": "Fielddata is disabled on text fields by default. Set fielddata=true on [sonar.code.length] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.",
"type": "illegal_argument_exception"
},
"index": "logstash-2018.06.21",
"shard": 0
}
],
"failed": 5,
"successful": 20,
"skipped": 0
},
"hits": {
"hits": [],
"total": 2267449,
"max_score": 0
},
"took": 5,
"timed_out": false,
"aggregations": {
"total_code_scan": {
"value": null
}
}
},
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"logstash-*"
],
"types": [],
"body": {
"size": 0,
"query": {
"match_all": {}
},
"aggs": {
"total_code_scan": {
"max": {
"field": "sonar.code.length"
}
}
}
}
}
}
},
"condition": {
"type": "always",
"status": "success",
"met": true
},
"actions": [
{
"id": "my-logging-action",
"type": "logging",
"status": "simulated",
"logging": {
"logged_text": "There are {} documents in your index. Max is 24."
}
}
]
},
I dont quite understand the reason : "Fielddata is disabled on text fields by default. Set fielddata=true on [sonar.code.length] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.