26

When I am in a question like MySQL Error 2049: Authentication protocol error (or any other post in the main site, or in any of the review sites https://stackoverflow.com/review/...) and I search in the upper searchbox the number 2048 I go directly to a question Monitor a specific RSS.
Which has the url with .../questions/2048/...

As noted in comments and the answer there are other numbers like the 4563341 which also redirect to a question, while others like 456334 or 2047 don't. If it is a feature of the elasticsearch how is this performed? When does it search the question number n and when does it search for post containing the number n?

I use Chromium Version 47.0.2526.73 Ubuntu 14.04 (64-bit), I don't know if it is just my browser or anything related to my configuration, but I bet it is not just for me.
I tested with Mozilla Firefox 43.0 for Ubuntu canonical - 1.0 and I observed the same problem.
Sorry I don't have any screenshot

6
  • 2
    I think that if there's no results returned for a solely numeric search your search terms get's replaced with the question with that ID. For instance, searching for 456334 on SO returns one question but searching for 4563341 sends you straight to stackoverflow.com/questions/4563341/…. If it's not been specifically redirected I suspect this'll be a "feature" of elasticsearch...
    – Ben
    Commented Jan 3, 2016 at 23:16
  • 5
    Whoever thought that was a good idea, ... Commented Jan 3, 2016 at 23:19
  • Oh, yes I forgot to mention I tried other numbers, but none of them redirected me to a question. Then if this due to a featurewhen does it search the question number n and when does it search for post containing the number n?
    – llrs
    Commented Jan 3, 2016 at 23:23
  • 1
    You are on Meta and it doesn't happen here - for anyone else who just tried it and got quite confused as to why they weren't taken to the given questions. Commented Jan 5, 2016 at 15:49
  • "You are on Meta and it doesn't happen here" I actually just tried it with this question's number and it worked for me here on meta. @RyanfaeScotland Are you sure you picked a question's id number?
    – Kendra
    Commented Jan 6, 2016 at 15:07
  • @Kendra you appear to be right, I guess there just isn't a question 2048, 456334 or 2047 on Meta (Please forgive me, I didn't check all the positive integer numbers) Commented Jan 7, 2016 at 13:54

2 Answers 2

26

Since the other answer concentrate on the "why" here's what to do about it: if you notice that searching for 2048 takes you directly to a question just search for "2048" which will search for all posts containing 2048.

23

It's a feature:

Already exists. Searching for a specific question ID will take you to that question.

Proof? Try searching for "43410" right now.

This does not work for answers, however.

For example, if you search for this answer post id https://meta.stackoverflow.com/search?q=313917 it will search the number, unlike if you use https://meta.stackoverflow.com/search?q=313916 which is this question id it will redirect you to this question. If an id has not been used, then the search will proceed as usual.

1

You must log in to answer this question.

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