Weeknotes 023 - ElasticSearch Rant

Going to be a work focused weeknotes this week, sorry. I told myself weeknotes would generally be about the stuff around work rather than a step by step breakdown of the things I've done.

To make up for all the work stuff; as people were doing a "Me At 20" thing here's one of me, I'm the one in the middle. I've always tended to be the one with the camera, so there's never been that many of me anyway. Even less so from the pre-digital time.

📷 📸 📷

I also did a few more pen-plots this week, making more cards. An internet co-penplotter folk kindly sent me some of his plots. One of the things that stood out to me was that the plots went right to the edge of the paper, and nicely rounded corners. I gave that a whirl by over-plotting four larger designs and cutting them down to A5 postcard size.

When making plots the line-widths are generally always the same, no such thing as narrow and bold, thick and thin, but "over-printing" over lines with certain pens on particular paper allows a bit of control.

I'm going to do more with these gold pens, but I'm all outta ink and need to get some more.

🤖 ✒️ 🤖

Now onto the work part, which is mainly a rant, because this is the internet.

ElasticSearch, the database thing, fronted by graphQL is annoying the pants off me. In that, it's very Engineery, built by engineers with very strict and proper engineer principles.

What I like is that you just get to throw JSON at it. I think that's part of the selling point. "Oh hey, got some random JSON files to store somewhere and search through, just throw it at ElasticSearch and it'll take care of the rest!"

It's brilliant!!

Then you go, "Hey, I want to do a general fuzzy kinda search on these text fields, that's a completely obvious thing to do."

And ElasticSearch goes "Sure, but first, you need to add that to the mappings for those fields and then make a new index."

And I'm like "Ok, sounds easy, can you please just, like, do that?"

Then ElasticSearch is all, "Oh no, you see, I can't modify this current index I've built, because now it's built I can't change it because people may be depending on it working just how it's currently working. What you need to do is build a whole new index, and let it know which fields you want to have the fuzzy search on. Oh, and that index needs to have a new name, but don't worry you can point the old index to the new index if you need to, it's not that complex, honest, just do PUT with curl."

And I'm "But can't you just make that one field a nice keyword fuzzy search thing?", and no, you can't. For very proper, correct and annoying engineer reason it may break things. Instead of just throwing the JSON at it, I need to tell it exactly which fields in the JSON do what and I can't easily change it after the fact.

So you do all that, only to find out it doesn't do case-insensitive searches or can tell the difference between "kitten" or "kittens."

Which means you now have to add those to the "mappings," which all need to be defined before you import any data, or build a new index.

And the joy of "just thrown any old JSON" at it, really means; fully understand the JSON you're about to throw at it, and write a whole new "mappings" JSON file to tell ElasticSearch exactly how to import the data and what you want to be able to do with each "field" in the JSON, etc. etc.

Basically it boils down to...

Me going, "can't I just do this really simple, common thing that people must need to do all the time?"

And ElasticSearch going "No, because of all these technically correct reasons, that are very well thought out and make sense when I explain how they may break some theoretical situation."

Meanwhile, I just want to find kitten and kittens.

Rant over, thank you all.

😾 😾 😾


🔗 🔗 🔗

Blatant self promoting calls to action

You should totally follow me on these social medias, but mainly Instagram
📸 👍 🐦
This page has been viewed
times since April 18th 2020