My friend Anu G Prem and I were working together to create a very small app for a relative who runs a business of construction materials, tools, appliances, and other related services.

The requirement is very basic - a website where he can add various stuff that he sells. The app will allow its users to see all available items, and create a quote by choosing items. I work on the mobile app while my friend works on the back-end services for the app.

There’s a search functionality in the app. As usual, the user types in the searchbar, and the actual search happens at the backend.

We finished the work and published the app and the website.

One day he called us and said — “I search for cement, but I get LED bulbs all the time”

That got us confused. We opened the app and searched “cement”. He is right, we are getting a lot of LED bulbs when we search for cement. Scrolling down revealed that there are many electric generators after the list of LED bulbs. Further scrolling down, we have actual cements at the extreme bottom of the search results list.

Investigation started.

Why LED bulbs are showing up when we search for “cement”? What’s with the electric generators here?

Ok, the search algorithm searches in both the title and description of products.

Ok, there’s something common with all those LED bulbs — they all have a replacement warranty in common.

So, they have a replacement warranty. Oh, a “repla’cement’ warranty!”

🤦‍♂️🤦‍♂️🤦‍♂️ Moment of realization 🤦‍♂️🤦‍♂️🤦‍♂️

But why electric generators?

They don’t have a replacement warranty anyway. What else?

Ok, generators have a “displacement” specification in their description. For example, a displacement of 350cc.

Now you already know it. A “displacement” specification.

🤦‍♂️🤦‍♂️🤦‍♂️ A day full of realizations 🤦‍♂️🤦‍♂️🤦‍♂️

He rewrote the query and fixed the issue later that day. All those LEDs and generators disappeared from the search results of “cement”.

Looking forward to the next revelation.