2 reasons to use ElasticSearch aliases
ElasticSearch has a very handy feature to use different names to point to indices, aliases.
Why should I care?
Aliases can simplify and fasten deployment if used properly.
Below are 2 examples.
Mapping changes
Elasticsearch has come a long way from v0.9.x to v7.x.
I still remember that prior to v2.x, default mapping of string fields was analyse...
Useful xpaths and tips for web scraping
The internet is chaotic, the structure of websites follow no rules, have no reservations
and will make sure that they are different from that other site that looks the same but it’s made using the latest x javascript technology
because it’s cooler and the frontend developer wanted to learn something new, end of rage .
But even in this chaos, ...
Change EBS volume size without downtime
Part 1. AWS Console
Navigate to ec2 → ebs volume → volume that needs modification.
Click Modify Volume and change size to desired one and wait until it’s finished.
Part 2. Modify volume inside ec2 instance
Instructions can also be found here.
Basically use lsblk to check if partition uses the whole device size
$ lsblk
NAME MAJ:MIN RM SIZE ...
Search content of multiple pdf files from terminal
There are often times where you just want to search something in multiple pdf files.
Usually it’s fine when these files are like 1 or 2 so you can open them and hit Ctrl + F to search.
But what if you want to search a keyword in 20 files?
Today I wanted to get all search results when looking for the keyword ECS in a directory.
This dire...
Git autocorrect from heavens
What’s your favorite git command?
Mine is by far git stauts!!!
Of course that’s not a command but there is a way to make it!
Git autocorrect solves that by setting:
git config --global help.autocorrect 1
or add above property in your global git config,
or not global, maybe typos occur only in a specific repo .
Delete Elasticsearch index, keep mappings/settings
One of the most used problems when I develop against ElasticSearch is that I often require a clean index to debug or investigate an issue.
But that index needs to also keep it’s original settings and mappings so dropping it, is not an option.
Luckily there is an easy workaround that utilises delete_by_query apifrom 5.x
(delete_by_query plugin fo...