68

If I use the search query "MKMapView momentum" (without the quotes) I get exactly zero results.

If I do the same search via Google (targeting only SO), I get nearly 2000 results.

Why would the Stack Overflow search not return any results? Is there something wrong with it?

15
  • 1
    Related: meta.stackoverflow.com/questions/277584/… Commented Feb 19, 2015 at 17:47
  • 7
    Google is a search engine. Let it focus on that. Stackoverflow is Stackoverflow . Let it focus on that. I think it's well known that majority of entry-points to this site come from Google. And you would be well-served to use Google, just in case your answer is on a different site Commented Feb 19, 2015 at 17:49
  • 45
    @Coffee in that case, it should be made explicit to users that SO search isn't for finding general purpose results, but rather for doing metadata searches like search by tag, user etc.
    – mluisbrown
    Commented Feb 19, 2015 at 17:54
  • 7
    Another solution would be for SO search to actually use Google's engine: google.com/cse Commented Feb 20, 2015 at 10:40
  • 7
    @MasterScrat that would remove the unique ability of SO search to search by metadata (tags, usernames etc), the only thing it's actually good at.
    – mluisbrown
    Commented Feb 20, 2015 at 11:22
  • 3
    @Coffee: It's "Stack Overflow". Commented Feb 20, 2015 at 11:24
  • 7
    @Coffee: The problem with SO's bad search is it creates the breeding ground for all these terrible SO content grabbers that hope to get some Google clicks. Because everyone searches SO using Google (and most are too lazy to restrict the domain). Commented Feb 20, 2015 at 11:48
  • 1
    @mluisbrown sure but is that ever useful? I mean such results are useful to get when you click on a tag or username, but does anyone ever actually input this kind of things by hand in a search box? Commented Feb 20, 2015 at 12:31
  • 32
    Now the first Google result for "MKMapView momentum" is this question! Thats very meta. Commented Feb 20, 2015 at 12:51
  • 1
    @Coffee and if that's the case, then why doesn't SE just use a custom Google search plugin? Commented Feb 20, 2015 at 14:20
  • @mikeTheLiar They do. Just not for every individual site.
    – Kendra
    Commented Feb 20, 2015 at 14:45
  • 1
    well you have 2 search results in Stackoverflow now :D
    – Vishnu
    Commented Feb 20, 2015 at 18:32
  • 6
    Very simple: SO search is broken. Mostly useless.
    – Hot Licks
    Commented Feb 20, 2015 at 19:21
  • 2
    Easy & cheap fix : make the SO search redirect to google.com/?q=<query>+site:stackoverflow.com
    – user2629998
    Commented Feb 21, 2015 at 3:17
  • This is a bit like expecting pub food to be a gourmet resteraunt. The pub serves food because it goes with their primary purpose, but it isn't what they are all about. Sure, in an ideal world, SO's search would be as good as Google's, but you have to accept that Google are the world leader in that area and search is their first and main product (to end users). Not that there is anything wrong with pointing it out and trying to get it improved, if it is important for you. For me, going to google to search is never a problem. Commented Feb 22, 2015 at 13:30

3 Answers 3

100

There are no posts with both words in the text.

Google finds posts where both words appear on the page, but they are simply never present in just the question or in one answer.

That doesn't mean that search is broken; it just is looking through a more focused dataset than Google is. Google sees whole pages, the Stack Exchange search engine sees individual posts (so just the question or answer text, in isolation).

Some examples:

Etc.

That said, Stack Exchange is currently looking into how search can be improved; see Feedback Requested: Search Engine Usage for a tip of that iceberg.

18
  • 5
    I was just about to mention that example question. If the SO search algorithm doesn't pick up that question when I search for the terms mentioned, then it is, as far as I'm concerned, broken. It is the one extremely useful question / answer on SO about the topic.
    – mluisbrown
    Commented Feb 19, 2015 at 17:51
  • 3
    @mluisbrown: Then stick to Google. Noone tells you you cannot search the site with Google! But the goals are very different; the Stack Exchange search engine serves different purposes. Commented Feb 19, 2015 at 17:52
  • 6
    I do use Google to search SO, and only use SO search for metadata searches. If that is its intended purpose, rather than general purpose search, that should be made clear.
    – mluisbrown
    Commented Feb 19, 2015 at 17:56
  • @mluisbrown: and note that the other two examples I included have no mention of momentum in them at all; Google indexed the page when there was a hot network question on one of those that had that word, but that doesn't mean that there is anything relevant to momentum in the post. Commented Feb 19, 2015 at 17:57
  • 16
    I accept that most of Google's 2000 hits are probably garbage, but it does find the useful question on the topic, as the first hit.
    – mluisbrown
    Commented Feb 19, 2015 at 17:58
  • 3
    @mluisbrown: so what happens when that comment is deleted? If that information is so important then it should really be edited into the answer instead. Commented Feb 19, 2015 at 18:14
  • 4
    Re: Why does google find posts without momentum? The Hot Network Questions list. Specifically, this post: Conservation of momentum when rain pours into a wagon which seems to have included the word momentum for consideration in many of these pages.
    – Travis J
    Commented Feb 19, 2015 at 19:34
  • @MartijnPieters the same thing that happens when an answer or question is edited (or deleted): the search index has to be updated. Comments ought to be able indexed for search as they often contain crucial information.
    – mluisbrown
    Commented Feb 19, 2015 at 19:50
  • 3
    @mluisbrown: comments are meant to help clarify posts, but we want the information to be present in the posts themselves if they are that crucial. Commented Feb 19, 2015 at 20:29
  • 2
    That's the intention of course, but in practice it often doesn't happen. Either way, I still think it's important that comments be indexed for search.
    – mluisbrown
    Commented Feb 19, 2015 at 21:17
  • 8
    This might be the accepted/right/correct answer but it's still ridiculous that search doesn't work like 100% of users expect it to. (i.e. return the posts that have both words on the page)
    – Clintm
    Commented Feb 20, 2015 at 0:32
  • 1
    "Ridiculous" might be a bit strong here. The SE search feature works as intended. Perhaps the intent was mistaken. Given that most people expect a search to include comments, perhaps the search feature could be re-evaluated.
    – Sam Axe
    Commented Feb 20, 2015 at 1:50
  • 13
    SE search is completely useless unless I'm searching for pairs of tags, or maybe something within a single tag that is slightly more obscure. In addition to performing worse in 98% of my uses, its results page is awful and worse than unstructured.
    – Nick T
    Commented Feb 20, 2015 at 3:23
  • I agree completely with @NickT.
    – mluisbrown
    Commented Feb 20, 2015 at 11:36
  • 6
    I've to chime in. I rely on Google, too, to search on SO. It just gives better results or any results at all. The pure fact that using Google rather than SO's own search yields so much better results means that SO search is broken, imo. The fact that comments aren't considered for search is a bug imo. (And to ask they should be integrated into the question or answer is cloistered!) They could be ranked lower, okay, but they definitely should be considered. Better show one poorly ranking result too many than not show it at all! Commented Feb 20, 2015 at 11:40
22

We're working on this right now! As others have pointed out, the issue for this particular query is that Google is looking at entire pages whereas our search just looks at single posts. This is obviously not what people expect, so we're reworking our search to index whole "pages" (or really, question + answers and maybe comments eventually). Making our search not suck is a major area of focus this year.

1
  • 5
    this is the only acceptable answer to me. Thinking in terms of solutions rather than excuses. I accept SO serves many types of users. I would pose the vast majority are not experts looking to provide answer, but rather people with a problem looking for an answer. Being in that last category, in almost every case I find the comments to provide the devil in the detail that makes the answer (and sometimes the question) worth looking at. I try SO search sometimes, but never find what I am looking for. Google gets me the right answer every time, And I always limit the search to SO. Commented Feb 22, 2015 at 0:46
2

It's worth mentioning that you're comparing apples and oranges. Stack Overflow uses Elasticsearch as a backend for searching. Elasticsearch uses types, and each type has a configuration which details how the properties of that type should be treated in terms of indexing and searchability, in general. When indexing, the actual object data is used, not the rendered web pages we, as users, see.

Google, on the other hand, has their own algorithm tailored for their purposes. Importantly, Google is a search engine for the entire web, so the factors they consider in terms of what makes a page "match" or not is vastly different from the considerations Stack Overflow has made in the development of their system. Also, Google employs crawlers that index fully-formed web pages and attempts to extract meaningful information from the page based on how its algorithms interpret various HTML elements.

There might be room for Stack Overflow to make some tweaks to their Elasticsearch type configurations to improve the returned results, but it will never be the same as what Google returns, simply because it's two entirely different systems with two entirely different algorithms running against a potentially different pool of data.

6
  • 5
    That's as may be, however, if Stack Overflow search is not giving the results that the vast majority of its users expect it too, then it is IMO, broken. The objective of SO search should be to show you the most relevant answers related to your search terms. Google does this very well. SO search fails miserably at this.
    – mluisbrown
    Commented Feb 20, 2015 at 14:50
  • 2
    The point I was sort of trying to make is that Google has a vested interest in trying to make its results work for vast amount of users of all different backgrounds and demographics. While StackOverflow must do this as well to some degree, it can have additional priorities that relate to how its individual users use its search. It's all very subjective, as while you personally think SO search sucks, other users may find it perfectly adequate to their needs. Commented Feb 20, 2015 at 14:59
  • 3
    You're talking about the technicalities why Google and SO differ. That's all fine but frankly, as a user, I don't care. I just expect relevant search results. Now in theory SO should have a much better position providing relevant results taking all the structured details into account and not relying on essentially a full text search. In light of this, SO's abysmal search is even more embarrassing. Commented Feb 20, 2015 at 22:11
  • I think tweaking Elasticsearch is the wrong answer. The SO SearchBox should do a google-type search, and provide a link to the Elastic Search if that's what the user actually wanted. Commented Feb 20, 2015 at 22:51
  • We are actually working on this right now
    – David Fullerton Mod
    Commented Feb 20, 2015 at 23:26
  • @ChrisPratt Unrelated to your answer. Not only is your Username Chris Pratt, but you also kindof look like "the other one" (at least on your picture on SE)!
    – philkark
    Commented Feb 22, 2015 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .