Elasticsearch Delete by Query
// delete all POST twitter/_doc/_delete_by_query?conflicts=proceed { "query": { "match_all": {} } } // range POST...
ES Aggregation sort and sub aggs
SortOrder sortOrderEnum = SortOrder.DESC; SortBuilder<?> sortBuilder = SortBuilders.fieldSort("dcCreateTime").order(sortOrderEnum); ...
Java Thread Word Tearing
https://docs.oracle.com/javase/specs/jls/se9/html/jls-17.html Some processors do not provide the ability to write to a single byte. It...
Null check in ES
Script script = new Script(String.format("params._source.unreachableList == null ? false : params._source.unreachableList.containsValue(...
Layered Log
import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Collection; import java.util.Date; import...
New computeifabsent method in Map
https://stackoverflow.com/questions/19278443/how-do-i-use-the-new-computeifabsent-function This is really helpful if you want to create a...
How to get latest values for each group with an Elasticsearch query?
Use "top hits" aggregation(https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-top-hits-aggregati...
Redis Batch Deletion
$ redis-cli -h host --scan --pattern 'user:*' | xargs -L 1000 redis-cli -h host del #/bin/bash redis-cli -h host --raw Keys '*cmdb*' >...
Static and Dynamic Binding
https://stackoverflow.com/questions/19017258/static-vs-dynamic-binding-in-java Here are few important difference between static and...
Common Git Commands
https://gist.github.com/robmiller/6018582