Ask HN: Why do search functions everywhere not return what I search for?

69 points by andrewstuart ↗ HN
It's driving me nuts.

All over the web, search functions don't actually return the word you searched for.

They seem to all do some sort of creative interpretation of what you searched for in the name of "relevance", thereby returning irrelevant results.

And in many cases, there is simply no way to do a literal word search. You'd expect maybe if you put your term in quotes that you would then get back precisely what you search for, but no..... again, the search function comes up with its own creative interpretation somehow.

Ugh why can't search...... search?

77 comments

[ 2.8 ms ] story [ 140 ms ] thread
Yes, and I see this phenomenon everywhere now. They completely ignore the explicit instructions we are giving and prioritize their “suggestions” instead. Facebook, Twitter with their default timeline views. On Twitch’s TV app it used to be one click from the main page to continue watching a video now it’s 5 clicks because they replace with suggested channels, recommended blah blah.

One can go blue in the face “quoting” terms on Amazon search but they’ll just show whatever they want anyways completely ignoring the exact terms entered. I’d prefer them to say “we couldn’t find any results for you” than to give me pages of useless results instead.

They completely ignore the explicit instructions we are giving and prioritize their “suggestions” instead.

I suspect it's deliberate. They're more interested in giving you what they want and trying to coerce you into that direction. I absolutely abhor it.

Partly deliberate revenue maxxing, partly SEO infosphere pollution, and partly the underlying technical elements of poorly (for the user) implemented embeddings, that have now largely replaced keyword based search. Tldr of the latter mechanism is multiple words share the same vector space representation so you often don't get what you want, but always you get what the model suggests you need. https://en.m.wikipedia.org/wiki/Word_embedding
These types of searches are built for normie users who are likely to not search for exactly one thing, and would find a relevant result good enough. Not to absolve conflicts of interest, but this is simply what you get with giant mainstream monolithic products like Google or Amazon. They optimize for the normal distribution.
And it keeps getting worse!

No solutions, but I empathize and it drives me nuts too.

Yes, it's terrible, happens all the time
I often find that too, that it doesn't work. I tried different search engines and they tend to have some advantages and some disadvantages, but overall, it does not help. (Although, some things might just be obscure and difficult to find anyways, possibly; and, sometimes, it is difficult to know what search terms to use. But, sometimes even if I know what is needed and put it in exactly, still it does not work.)
As someone who wrote a very silly and small search system with an elastic search backend.. this thing is a bit complicated.

If I do exact match for single words life is easy

Once you add phrases or punctuation and tell elastic search to find the best match (text analysis) then life isn't so simple anymore. It feels a bit like magic and I honestly cannot be bothered to become a language expert to know how to tune the machinery. The docs aren't great also.

Maybe there's a missing middle ?

Of course that if you're talking about social media, or search focused companies, they likely have other interests

> this thing is a bit complicated.

Oh gods. I wrote our public search backend in ES a few years ago, then months of fine-tuning followed (whenever one of my coworkers searched and weren’t happy with the result). Today I barely understand what anything in the code is doing, but the results are good…

This topic (or a variation of it) comes up quite frequently on HN.

I agree with your observations. Google search seems to completely ignore search terms in quotation marks. It's like the search favours showing somewhat relevant results instead of nothing at all.

I rarely use Google, but my experience was always that quoting still worked.
A few weeks/months back on a similar thread a googler posted that the quotes will always be honoured, but the text they are matching won't necessary be part of the visible page.

In general when I've landed on apparently unrelated pages and checked this it's been true.

This is often an anti-feature though - if I search for an exact match I probably don't want pages that don't visibly include it.

I am strongly reminded of the days when AltaVista searches had started turning up more and more spammy garbage and this young upstart with a funky name turned up to challenge them.

I reckon Google's crown could be grabbed by the end of the decade. Sooner if they're slow reacting to a challenger.

Under normal usage, google will search for synonyms of the keywords you typed. But I have never experienced it ignoring quotes.
If your term is specific enough it will ignore it the first time around even if in quotes, and you have to click on the "search this term for real" link underneath

Google search is however personalized per user account in mysterious ways, so there's that at play as well

This isn't my observation, I use quotation marks frequently.
Elasticsearch or a functionally equivalent competitor is a straightforward commercial-off-the-shelf solution for text search. Default settings for it include fuzzy matching and returning "relevant" results instead of only exact ones.

Pretty sure there's nothing more nefarious going on than a bunch of different engineers and different companies plugging in COTS text search solutions with minimal customization.

Some kind of weirdness is in almost all search-engines. I recently wondered why our backend search based on SQL Server would not return the expected results, turns out that for some reason, it has a stoplist that includes a ton of Roman numerals (also written out numbers twentyone, twentytwo… I have no idea what the thinking is there), so searching for "Sony Alpha III" is exactly the same as searching for "Sony Alpha IV" because III and IV are neither indexed nor searched for.
Lots of people here saying ElasticSearch can’t actually do straightforward literal searches.

Sigh.

You should reread. The phrasing is:

> Default settings for it include fuzzy matching and returning "relevant" results instead of only exact ones.

Which does not in any way say that it is incapable of literal search, only that it is not the default and that most go for the defaults.

So, better phrased as, “the most widely used search engine, elasticsearch, defaults to fuzzy matching not precise matching”.

Which has the flow on effect of any elasticsearch site effectively being useless or suboptimal for……. searching for something specific.

Put another way, ElasticSearch is the default search and it’s borked search across the entire web.

The phrasing of the original poster was just fine. You misrepresented what they said and now you're trying to backpedal.

Let it go.

I agree. I actually want literal search most of the time. Not the smart kind.
Oh it’s the engineers who think they know better than the common man/woman. Elitist, snobbish etc.
My guess is that if you do user research you'll find that for the vast majority of people exact token matches are not what they actually need or appreciate.

People run searches on their phones with typos. They don't have a good mental model for how search works, or how best to use it. If they search for "can puppy eat pork" they're actually looking for results about if dogs can eat ham.

As an expert user of search this infuriates me too, especially when tricks like double quoting don't get me what I'm looking for.

But as someone who often implements search engines I'm spending a lot more time thinking about fuzzy matches and semantic search (things like searches that use vector embeddings generated by language models).

Weren't "advanced search" UIs and the old convention of using quotes exactly for this?

Use fuzzy search as default, switch to exact search for everything written in quotes.

Where would be the problem?

The convention is well-known enough that even nontechnical users wouldn't be surprised by it.

I prefer exact matches with fuzzy appended to the end.
There's value in fuzzy matches, but defaulting to complete fuzzyness always is not a good way of attempting to unlock that value.
I confess that sometimes the fuzzy matching is useful. I do not always know what the keywords ought to be.

But sometimes I do - and I die a little when there's no way to express that.

By the by I remember that one of the things that made me switch to Google from AltaVista was that Google were indexing the term "C++" as being distinct from "C" which obviously made a big difference to the utility of the results!

On Amazon, sorting by anything other than "Featured" is absolutely useless.

Instacart will show a couple of relevant items, and then a bunch absolutely random results, some of them being the opposite of what I asked for.

A lot of that is coming from optimizing for conversion. Turns out search isn't supposed to be accurate, it is supposed to generate money. You just happen to be the minority that cares about the exact thing.

Another reason is that search is just... hard.

Though in Amazon's case I bet it's just sheer incompetence caused by monopoly.

Yep my experience too; if it's not featured it's basically a free for all what results you get.
Because search results are super competitive and they bombard SE with highly optimized tactics to rank higher even for irrelevant terms.

As as suggestion, try searching (or asking for recommendations) on ChatGPT for the same keyword

In Google put your phrase in quotes and it’ll find the exact word or words
Sometimes that helps (I use quotation marks very often since it helps enough that it is worth doing), but somehow it does not always help.
The vast majority of users are not technical. They don't want keyword search, they want to find the information they're looking for. In that sense, they treat a search box more as a chatbot rather than a literal search tool. That is, they want something more like ChatGPT, not Google. That Google doesn't yet offer this functionality is incidental (it does sometimes and for limited use cases, such as surfacing weather details or lyrics, not pages with the literal words "X weather" or "Y lyrics").
Lots of developers in this thread saying users aren’t technical and don’t want literal search.

I’ll need evidence before I believe these assertions.

I think users want literal search first.

Talk to a group of ten or a hundred non technical people, do a comparison of a literal search engine versus a non literal search engine and record their satisfaction rates.
It's your assertion - have you done that research?
Anecdotally? Yes, but since it seems you want evidence which my mere mentioning of anecdotal experimentation is likely not to suffice for your edification, feel feel to conduct the same experiment and find the same findings as I have.
Are you assuming that Google and other providers of search interfaces haven't done this research?

What's in it for them not to figure out what users want and deliver it?

I hate this line of reasoning because it assumes that these companies are always making decisions that are correct and rational. Large corporations do stupid stuff all the time and ruining search is one of them.
But all, or majority of them? Can you give an example of a search function of a prominent website that provides literal search capability front and center?
I think user interface research these days consists of A/B tests, not talking to actual users. At least, given how user-hostile so many products are these days.
From my experience implementing search using Solr (or Elasticsearch) is simple to get the basics and hard to get really really good. So I guess most developers/companies are satisfied with "good enough".
It could be that everyone just delegates to elastic search or similar which I think might be incapable of exact string searching (a trade off to get better fuzzy searching and speed). Tuning ES is probably possible but takes commitment and is complicated I suspect most don’t bother! I used it in one side project and a lot of tuning is needed for your use case.
(comment deleted)
I guess you know the answer, and it has been mentioned several times already: search is "bad" from the seller's point of view, they don't want you to buy what you want. Instead they want you to buy what they want to sell, and that is of course easier if they control the presentation of products. Search is an explicit way of trying to give control over what is shown to the user, and that runs counter to the underlying optimization for maximum sales.

At least I guess so, the nearest I have been to any kind of sales optimization pipeline is buying a lot of stuff online. :)

Smaller and niche sites can still do Real Search, but it's the large marketplaces with thousands of everything (where, you know, you really want good search) that usually instead favor their own optimization.

Actually, but perhaps surprisingly, a site like Aliexpress actually kind of explain this in their search help text, which is at least trying to be transparent. I like that, but it still drives me nuts when the search results change when you change to sort by price. That's like ... "impossible" in my mind; changing the presentation order of a list should not change the contents o of the list, but there you are.

Aargh, basically. I wish it could stop.

Applying Standard Capitalist Rules, I guess in the future you'll need to pay a fee to each site for the right to search and sort exactly and disable the optimizations for you. Fun times.

EDIT: Minor grammar fix.

Yea it is truly awful.. e.g. job search has become even worse than it was a few years ago. The only good platform (Stackoverflow) has closed its job search. Most jobs seem to be on Linkedin these days.

However for a while now Linkedin job search seemingly shows me random stuff.. I can search for C++ and find all kinds of Java, Javascript, PHP jobs. It is driving me mad.

Any recommendations for job search sites (maybe even with negative filters)? I know about Who is Hiring? of course but there are not too many jobs for my region usually.

One of the things that triggered this post was I did a search on LinkedIn jobs for "python" and the task of sorting through the seemingly random results to find "python" jobs was too hard so I gave up.
"Java" + "Staff Engineer" produces so many completely unrelated roles that it just isn't funny. I was also extremely irritated to find that you can't specify your own role on your profile as you wish; they'll force "Senior Software Developer" to be "Senior Software Engineer" for example.
Search engines use some metric to find relevance to your query. In ye olde days it was "how many words in description matched your query". Now it's typically "how much money did this company give us".
LinkedIn is mostly catering to the recruiters. If they make the job search too efficient then they'll stop being able to sell access to the candidates.

Drives me nuts too.

I mostly use LinkedIn as a place to curate my CV (resumé) and I reckon they'd be weak to a challenger who used that as their route into that market. Doubly so if they can figure out how to get the candidates to pay instead of the recruiters (there are more of us).

My theory is that search is, from a ux perspective, seen as a way to generate “browsing” opportunities rather than pinpoint something specific.

At the same time there’s a wish for searching for “what you meant” rather than “what you typed”.

YouTube did something extremely bizarre with their search.

They limit the results to like 5-10 videos and then replace the rest of the results with irrelevant videos under the "People also watched" tab where the results are the combined list of random words from the search query and "From related searches" tab where it's just random videos that belong to the same category of videos. This means that unless you're extremely blessed by the algorithm your video has basically no chance to show up in the search results, even if is relevant!

The weirdest thing is that the old search isn't even gone! You can still get relevant results after clicking "Filters" and then "Videos" in the "Type" column.

Who is this feature even for and what was the motivation for doing it? From the perspective of an actual user it makes no sense.

Sounds like ongoing ticktockification to me.

I think from the perspective of a social media company, the ideal UI would not allow the user any kind of agency in what content is shown and would be 100% driven by the algorithm.

Of course users don't want that, so what we have in practice is social media companies testing how close they can get to their ideal without upsetting too many users.

These sections can be blocked on a desktop browser with AdBlock.
Try search "white couple" in google images. Results are irrelevant in 50%.

https://www.google.com/search?q=white+couple&source=lnms&tbm...

However "black couple" results are more relevant.

https://www.google.com/search?q=black+couple&source=lnms&tbm...

It's hard to believe that results are not manipulated for purpose.

This explanation seems reasonable, however should be fixed. https://www.seroundtable.com/google-image-search-results-rac...

Normies. It is because of normies who are too dumb to use a computer. They couldn't work a boolean search even in english to another person so search has to be ruined for the rest of us.
I really disagree that for some reason “normies” don’t actually desire to find the search term they entered.

Why would that be true?

If someone were to describe such a line of thinking it would be “I don’t really know how to work this computer thing, I know I want to search for ‘ponies’, but since the computer is smarter than me it’ll tell me something better than what I thought I wanted to know”

Is that the thought process that all the developers think users have? Makes no sense to me. Why wouldn’t and ordinary person want a job site for example to return exactly “pastry chef”?

This kind of thinking is part of the "I know computers, therefore I am better than everyone else" arrogance that has plagued IT since forever. Anyone who describes users as "normies" earns my ire, to also call them "dumb"...

Maybe people like GP here are the reason software gets suckier all the time.

It's to drive engagement. Why give you exactly what you want, when they can make you click some other stuff? There's no real competition, and if there were, the competition would soon realize it would have more revenue if it used the same strategy.

You can bet that somewhere, someone was looking at some A/B testing with these "features" and they saw an uplift of X% in revenue, so why not do it?