Connect Spring Boot with Elasticsearch

A laptop computer and a tea kettle resting on a table.

Both Java and Elasticsearch are popular elements within common technology stacks that companies use. Java is a programming language that was released back in 1996. Java is owned by Oracle and still in active development.

Elasticsearch is a young technology compared to Java — it was only released in 2010 (making it 14 years younger than Java). It’s gaining popularity quickly and is now used in many companies as a search engine.

Seeing how popular both are, many people and companies want to connect Java with Elasticsearch in order to develop their own search engine. In this article, I want…

Setting up a self-hosted Ghost blogging platform with DigitalOcean, Namecheap and Cloudflare

Image for post
Image for post
Photo by Tandem X Visuals on Unsplash

Recently when I changed my blog from WordPress to Ghost, I’ve run to some problems because it was my first time setting up a Ghost blog. I decided to write this article on how to set up a self-hosted Ghost so you can avoid having the same problem as I am.

Disclaimer: this article contains 1 or more affiliate links.

What is Ghost

I’m sure if you opened this article, you already know at least a bit about Ghost. Ghost is a headless CMS built specifically for blogging built on top of JavaScript and NodeJS. It’s a very fast, doesn’t need a lot…

Abandoning my 2 months old WordPress blog

Image for post
Image for post

If you know me, you might’ve noticed I created a new blog with Ghost. My old WordPress blog is just 2 months old, it’s still up, but I’m thinking to redirect the traffic from that blog to my new Ghost blog.

If you don’t already know, WordPress is a CMS many people use for creating websites and blog. It already exists for a very long time. Ghost, is a relatively new CMS focused on blogging. It’s not really new since it’s already exists for over 5 years, but its age feels like nothing when compared to WordPress.

WordPress is really…

Understanding the process and components

Hiker taking in lakeside view
Hiker taking in lakeside view
Photo by Luca Bravo on Unsplash.

If you want to create a good search engine with Elasticsearch, knowing how an analyzer works is a must. A good search engine is a search engine that returns relevant results. When the user queries something in our search engine, we need to return the documents relevant to that query.

One component we can tune so Elasticsearch returns relevant documents is an analyzer. An analyzer is a component responsible for processing the text we want to index and controlling which documents are more relevant when querying.

Inverted Index

Since analyzers correlate tightly with inverted indexes, we need to understand what an inverted…

Hands-on Tutorials

Improve user’s experience by handling typos easily with Elasticsearch

Image for post
Image for post
Photo by Ksenia Makagonova on Unsplash

Typo is something that often happens and can reduce user’s experience, fortunately, Elasticsearch can handle it easily with Fuzzy Query.

Handling typos is a must if you’re building an advanced autocomplete system with the Elasticsearch.

If you want to create a simple one instead, you can read my other articles “Create a Simple Autocomplete With Elasticsearch”.

What is fuzzy logic

Fuzzy logic is a mathematics logic in which the truth of variables might be any number between 0 and 1. It is different with a Boolean logic that only has the truth values either 0 or 1.

In the Elasticsearch, fuzzy query means the…

How to avoid the “billion-dollar mistake” in Java

Ladybug standing on tall grass with the sun peeking through.
Ladybug standing on tall grass with the sun peeking through.
Photo by Barnabas Hertelendy on Unsplash.

In 1964, British computer scientist Tony Hoare invented the Null Pointer References.

The Null Pointer Exception has contributed the most bugs in production exceptions. It was implemented in many programming languages, including C, C++, C#, JavaScript, Java, and more.

The loss of financial resources, time, and human resources to fix it prompted Hoare to call it a “billion-dollar mistake.”

Java is one of the programming languages that implement Null Pointer References. If you’ve been developing with Java, I’m sure that you’ve seen them a lot. It doesn’t matter if you are new to Java or have ten years of experience…

How to create a simple autocomplete with Elasticsearch using text field data type and standard analyzer

mobile phone showing Google search screen
mobile phone showing Google search screen
Photo by Solen Feyissa on Unsplash

Autocomplete is a feature to predict the rest of a word a user is typing. It is an important feature to implement that can improve the user’s experience of your product.

Creating an autocomplete might sound daunting at first if you’ve never created one. But with the help of the features in Elasticsearch, it’s actually a simple thing to do.

Things You Should Know

If you have little knowledge of Elasticsearch, I suggest that you read my other articles first. We do not require this, but knowing how an analyzer and a text field work definitely will help you understand this article.

The article…

Functional programming in Java, with examples

Image for post
Image for post

If you’re a Java developer, I’m sure that you have seen code similar to the snippet above at least once. The code in the snippet above is an example of functional programming paradigm implementation in Java, which will filter and transform the List<String> in the request to another List<String>.

In this article, I will write about how to write code using Java’s API for functional programming. In the end, we will write our own stream API so we can understand how to implement a functional programming style in Java.

Functional Programming in Java

Functional programming in Java has been around for a long time…

The reasons why I took it even though I’ve never worked with it

Image for post
Image for post
Photo by Gery Wibowo on Unsplash

I’ve always been interested with Artificial Intelligence and Machine Learning field since I started working as a software engineer. I wondered how the machine learning algorithm work and how cool the result they produce, I mean, the programming I know was like, I need to define the flow from X to Y and the resulting software will follow exactly what we wrote.

But, Machine Learning is different, I only need to feed it with data, and the response that it produces will always be different depending on the data I fed into it. …

Brilian Firdaus

A Software Engineer— Interested in Artificial Intelligence, Programming, Technology, Software Engineering and Relevance Engineering—

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store