A Journey of a Thousand Miles Begins with a Single Step

Reindex Subset Data in Elasticsearch

The Elasticsearch Reindex API is a powerful way to index a subset of data from existing data. If you think of a long term statistics solution, you can aggregate data and store the aggregated values instead the atomic details. In my company we have an index that contains approximately 150 fields in each document. For a longterm solution only 30 are relevant. The Reindex API can just fetch the 30 desired fields and store them in a new index.

The reindex template

Read more

Elasticsearch Range Query

An accident in the Elasticsearch universe. Instead writing to an daily index it was index to a yearly index. Now I had to check the date range of the documents. The Elasticsearch Date Math is a great help for the Range Query.

Read more

Delombok Java Beans

If you are using Lombok you can let lombok generate via the Maven Plugin the source code.

Read more

Update Jekyll blog entry meta-data

If you track your jekyll post with git, preferably if you hosting your github pages, than you can utilize the git attributes to automatically update post meta-data. For instance we replace the modified information in the yaml frontmatter (that is the jekyll metadata) every time you do a update on a jekyll post or page.

Read more

Minify JSON

Another way to minify JSON is to use the npm package.

Read more

Convert JSON 2 CSV in JavaScript

json2csv is java script library which allows conversion of the format csv and json on a linux terminal.

Read more