Search is a curious beast. It is as much as a solved problem as much as it is not solved. What I mean is that there are several tools and services to build a search engine for a website, and virtually every website uses search, but each one needs a specific search solution. In other words, we know very well how to do search, but we just don’t know how to do search for each specific case at first glance.

Each specific search solution will depend on how you expect users to search, which on itself depends on what is your user base. Your users are normally dominated by some specific niche, normally with clear behavioral patterns and cultural treats. In more complex cases, several of these groups or cohorts may be found using a search service (i.e. big marketplaces like Amazon or MercadoLibre are used by a large and diverse public) but these are well identified (or should at least) and search will adapt to each user depending in which group it belongs to.

Why is this important for search? A typical example is grammar differences between dialects. For instance European English spells “grey”, while American English spells “gray”. So if you are searching for a “grey shirt” on an American marketplace, there is a chance that you wont get “grey shirts” (you probably will anyways, but you get the point).

There are of course more interesting examples that depend on cultural slang, when people refer to something with a completely different name to the correct one. This can happen due to either good marketing or to social interactions. Today I bring an example of these two that have caught my attention while using an app to buy groceries. Specifically I’m talking about the app from Lider (Chile), acquired by Walmart in 2008.

With the pressure of Cornershop (now Uber), Lider has been increasingly enhancing their online shopping since at least 2015. By now they have what I consider a good service. I use their app because of convenience and affordability, having just few minor problems for many years. However, I do have some complaints on their search. These are minor of course, but are so evident and simple to tackle that it really bothers me that these exist at all.

The first issue is about toilet paper (sad but true). In Chile, we call toilet paper “papel confort”, literally translating into “confort paper”, being Confort a brand of toilet paper. This is a cultural treat acquired by the years to the point that literally no one says “papel higénico”, the correct name for toilet paper. Despite this fact, Lider does not incorporate this in their search. When you search “papel confort” you will get exclusively toilet paper from the brand Confort, at least for the first five or six results. Why is this an issue? Because unfortunately for Confort, we as Chileans expect to search for “papel confort” and see other brands, just as what happens when we go to our local store and ask for “papel confort” and we are handed a different brand. In my opinion, Lider should be smarter here, and tweak the search so when the query is “papel confort”, the top six results are more diverse, because that is what we expect culturally. This can be done in many ways. One simple solution could be with synonyms that should be easily configurable in any search engine:
// for one-way synonyms we may use something in the ways of
{
  “synonyms”: [“papel confort => papel higénico”]
}

// for both-ways
{
  “synonyms”: [“papel confort, papel higénico”]
}
The above should already show an improvement on these results being more diverse. Another way to improve this query is to penalize Confort products or boost non-Confort products for that query. This approach is more deliberate, but still possible:
// this will penalize the word ‘confort’ found in the field ‘title’ of a product
{
  "match": {
    "title": {
      "query": "confort",
      "boost": 0.95
    }
  }
}
The second case I want to discuss is about small sausages. The correct word for these in Spanish would be “longanicillas”, literally meaning small sausage, diminutive for “longaniza”. Lider has no problem on finding these using this correct term, but in a similar way to papel Confort no one calls them like that, but rather we call them “pichulitas”, a diminutive for penis (no joke, that is how we know them socially... I do not make the rules). As of now, if you search for “pichulitas” on Lider, you will get literally no results. This bothers me so much because all you need to do is a simple synonym clause, without even worrying about scores or a both-ways synonym:
{
  “synonyms”: [“pichulitas => longanicilla”]
}

The exact reason on why Lider has decided to not do any of the above troubles me deeply. Yes, I say decide because it is an evident decision as much as it is an evident thing to do. And yes, it troubles me deeply because I'm a nerd. Has any user not found what they were looking for because of this? Has Lider lost any money? How many cases like this are there? I’m not sure on the answer of any of these questions. They probably know about all this, so my guess is that users, as myself, still get to find what they need. In any case, the only thing I know for sure is that Lider has decided to make their search worst for no reason at all.