Remember when We Made Search 51% Less Crappy?
Well, we rolled up our sleeves and increased search quality a whole ten percent to 61%. How?
- Search now heavily weights title in the results, since people seemed to really like that approach. This is currently used on the /ask page, which does a title-exclusive search when you tab away (onblur) the title field.
- Any individual search terms which map directly to the top 40 tags will be auto-converted to tag searches. So if you enter
c++ entities
it will convert to
[c++] entities
automagically on your behalf.
This alone is a rather substantial improvement. One specific query, cited as an example of how bad the old search was, is to search for “what is a Monad”:
http://stackoverflow.com/search?q=what+is+a+monad
As you can see, pretty solid results now.
(And don’t forget to avail yourself of the Votes sort tab on the search results page. It defaults to relevance but sometimes votes is a better default sort IMO. There were users who almost literally fought me to the death on the choice of this default search results sort order in the Stack Overflow beta, so that’s how it is.)
I’ve also started implementing some BETA advanced search operators, as requested on meta.
The current advanced search operators are:
posts from a specific user | user:1234 apples oranges |
questions with a minimum number of votes | votes:15 apples oranges |
questions that have an accepted answer | hasaccepted:1 apples oranges |
questions that have no answers | answers:0 apples oranges |
questions that have been closed | closed:1 apples oranges |
questions that are community wiki | wiki:1 apples oranges |
Yes, these are a little buggy at the moment, but they mostly work. And they can be combined with [tags] and search terms of course.
One thing to bear in mind: the advanced search operators will sometimes kick you into a combined questions and answers search result format. So don’t be alarmed, when you decide to browse all posts by Jon Skeet voted up 20 or more times, that you see a mixture of questions and answers in your search results!
All of the above is documented on our new search help page:
http://stackoverflow.com/search
Feel free to file bugs/feedback on this on meta, and please tag them with [advanced-search] if you’re talking about a search qualifier with a colon in it.
17 Comments
Hmm, in some cases the search is still rather.. suboptimal.
The first thing I tried: java xml library (http://stackoverflow.com/search?q=java+xml+library) – result: nothing! I also tried java xml libraries, which better matches tags on SO, but still nothing.
There certainly is a lot of matching content on SO! Compare with the 6000+ hits from Google: http://www.google.fi/search?q=+site:stackoverflow.com+java+xml+library
Yeah, not sure on that one. Seems like a bug, as there are questions with the word library within the [java] and [xml] tags.
Ah, I see the problem — “library” is such a generic search term that we had to go 4x deeper to get an intersection between “stuff containing ‘library’” and “stuff containing the [java] and [xml] tags”.
Works now:
http://stackoverflow.com/search?q=java+xml+library
Is the “user” stuff released? Simple searches like “user:23354 [c#] foreach” or even just “user:23354 foreach” don’t find anything; I’m sure I’ve mentioned foreach a few times?
SOME of the advanced query terms are scoped to questions only at the moment. It’s a bit awkward because all our code has to start caring about answers as search results, whereas before we worked exclusively in the realm of questions as search results.
Way to go!
One small matter, is the “1″ really necessary in “wiki:1″ and “closed:1″ etc.? Seems a bit lame, unless the point is to allow using “closed:0″ to do a “NOT”.
I’m searching for “grails” using the top-right box and get 0 results? :-\ but if I use google and “stackoverflow grails” I get lots.
I meant “site:stackflow.com grails”
@Aviv – I don’t know if this was the reason, but an advantage of keeping to a key:value pattern (even when only 1 valid value) is that you disambiguate against that key as search term, i.e. looking for something about “open windows”…
It seems weird when I search for \javascript barcode\, on the new page the text box is still saying \javascript barcode\ instead of (the expected) \[javascript] barcode\.
(ok, in the right panel it says that I’ve searched for barcode with the javascript tag, but that’s not the first thing I’m looking for).
OK: the quotes are replaced by backslashes. Bug on this forum? I think I mistyped the captcha the first time….
Mate, that “user:1234″ alone is worth the price of admission. Now I can finally see all the crap I’ve vomited forth in the last year or so :-)
Heh, just noticed something cool: the user search lets me find answers to deleted questions!
Now, just let me search for deleted posts directly…
http://meta.stackoverflow.com/questions/10775/why-is-the-1-needed-in-the-new-search-grammar
Now the next 49%, can the search do some sort of greedy algorithm?
I search for boost-test or “boost test” I would like the results with boost-test first not all the results about “testing visual basic” .
Submitting to Googgle?
At some point is it just worth not doing search and letting Google do it for you (MSDN are you listening)?
Google already ranks terms as higher importance in header tags etc. With the site file is it possible to tell Google that terms in tags have a higher relevance?
At some point is Google going to need some sort of API so you can use your inside knowledge of votes and reputation to suggest which of your pages are more relevant?
It’s not quite the semantic web, but for web2.0 to work Google is going to need some more information about the structure of sites like FaceBook, SO etc to effectively search them.
@mgb, why wouldn’t you just search for ‘[boost] test’ – the tag should automagically exclude VB (except for the “Is there something like boost for VB?” questions).
Advanced search updated again, should properly return questions and answers when appropriate.
This search help page will always contain the latest syntax and rules, so please do refer to it:
http://stackoverflow.com/search
Another search option I came across recently: http://stacksearch.org/
As far as I can tell it’s only searching stackoverflow, meta.stackoverflow and superuser.