- Elasticsearch – Aliases and Zero-Downtime Reindexing
A field type cannot be changed once it has been written, so sooner or later you have to move every document into a new index. Whether that is an outage depends on one decision you make on day one: never let your application name a concrete index. Aliases, _reindex, the atomic alias swap, what happens to writes that land during the copy, and how to migrate a cluster that already got this wrong.
- MySQL Json
MySQL supports the native JSON data type since version 5.7.8. The native JSON data type allows you to store JSON documents more efficiently than the JSON text format in the previous versions. MySQL stores JSON documents in an internal format that allows quick read access to document elements. The…
- Elasticsearch – Geo Queries and geo_point
“Show me places near here”, done properly. Mapping geo_point and the five formats it accepts — including the one that reverses longitude and latitude and silently puts your listings in the Gulf of Guinea. geo_distance as a filter, geo_bounding_box for a map viewport, sorting by _geo_distance and reading the distance back off each hit for free, and geo_shape when a point is not enough.
- Elasticsearch – Aggregations and Faceted Search
Aggregations are the other half of Elasticsearch, and the half that turns a search box into a filter panel. Metric, bucket and pipeline aggregations, nesting them, aggregating on keyword rather than text and why that is not optional, and the part most tutorials skip: a facet counted inside its own filter collapses to a single row, so the guest can never switch cities without clearing the filter first.
- Elasticsearch – Sorting Results
Sorting looks trivial until the first field you try refuses. Why sorting on a text field fails and what fielddata has to do with it, tie-breakers and why a sort without one gives unstable pages, missing values, sorting by distance and by script, what happens to _score when you sort by a field, and reading the sort values back off a hit — which is also how search_after paginates past the 10,000-result wall.