18

Note: the below is outdated, search was changed once again: A new search engine for Stack Exchange

For a few reasons, we recently changed the guts of how search works on our sites. If you keep up, you've probably read somewhere that we were using SQL Server Full Text Search. There are a few areas that utilize search that all got a replacement tonight:

  • Search itself (box in the upper right)
  • Related Questions (to the right of a question)
  • Titles (when asking a question, this finds similar questions that may have already been asked)

As of now, we've moved search over to Lucene, specifically the Lucene.Net flavor.

We invite you to try it on all sites in the network, for example here's the search pages for the trilogy:

As with all the features we add, it's better with feedback, please use the search and post feedback here (quality, issues, good/bad results?). We'll be watching the next few days to make tweaks as we go. Of course, if you're able to break it, post that too - we'll be watching and adding awesome as fast as we can.

9
  • Beware: given an old (now deleted) earlier announcement, infavorites is no longer supported. Some other search keys like intitle have changed names, and the new body is introduced. So: see the help on the /search pages.
    – Arjan
    Jan 27, 2011 at 8:54
  • @Benjol - There was actually a totally (well somewhat) unrelated bug in the title search the way the string was being sent to the server, special characters in titles should behave much better now. Also, title duplicate search for questions now looks at tags (and converts popular terms to tags, naturally), hopefully this will cause quite a few more relevant results to show up there. Jan 27, 2011 at 13:06
  • Does the new search now "AND" multiple words together by default (looking for all of them) rather than the previous "OR" approach? Jan 27, 2011 at 17:36
  • 1
    @Kevin - Yes and no, they are by default OR (unless you use a +), but AND results that contain all terms appear as the most relevant (first/top results by default). If you want to force an AND and see only those results, just prepend your terms with a +. Jan 27, 2011 at 17:44
  • 1
    @Nick - well, it's a big improvement over the old search. I do still wish it worked like, well, every other search engine and ANDed the words together. As is, it can be quite deceptive. Jan 28, 2011 at 0:18
  • Is there information anywhere on performance deltas? Both loading into the index and search of the index. Also has the size of the index changed performance? We currently use SQL to full text search a table with millions of rows and would like to read about what you have found. Thanks Jan 28, 2011 at 1:03
  • @Mike - You can find some additional info in last night's blog post here: blog.stackoverflow.com/2011/01/… If it matters, we're indexing a Post table approaching 5 million records, the index is under 2GB for all sites combined currently. Jan 28, 2011 at 19:36
  • I doubt it will look nice (especially for the colored mod-only tags), but maybe matching tags could be highlighted too in the search summary? (Example.)
    – Arjan
    Feb 1, 2011 at 11:37
  • @Arjan - That's not a bad suggestion at all, but you're also correct that it would look like crap on some of our sites at the moment - I'll discuss with Jin, if we add a style that works on tags as well to all sites later, I'll take another pass at highlighting the tags. Feb 2, 2011 at 12:25

2 Answers 2

1

The old search allowed for searching URLs within the Markdown mark up.

Any chance we can get that back? Or, if not for everyone, then at least keep it for moderators (or anyone who happens to know where to find it)?

Examples:

I above all used it to search for spam. And to find references to possible link rot. (Luckily I just finished moving all my images from skitch.com to imgur.com. But I've seen others putting a lot of effort in solving link rot when documentation links changed.) And just today, Google warned me about:

The website at meta.stackoverflow.com contains elements from the site img5.tinypic.info, which appears to host malware.

So we might want to search for that domain, but no longer can.

13
  • This is a possibility, but not on the table right now, we actually strip all HTML when we go to index in order to get the most relevant results. If we decide to do something that would enable link search I'll update this. Jan 28, 2011 at 18:11
  • @Nick, then maybe keep the old search available for moderators? Or anyone who happens to know where to find it? (Like on Super User there were two new (but surely fake) users (1, 2) advertising arx.com. How to find other fake users now that we know that this company has been spamming? Also, I saw someone putting a lot of effort in solving link rot for some Perl or Python (?) documentation changes on SO.)
    – Arjan
    Jan 28, 2011 at 18:49
  • I believe the URL searching is back perhaps @nick can elaborate? Mar 29, 2011 at 16:40
  • 1
    Url search (and the new parsing in general) is in testing on Meta, for example: meta.stackoverflow.com/search?q=url:%22http://stackoverflow.com/…*%22 Mar 29, 2011 at 18:01
  • @Nick, I got blocked out for too many searches, but it seems only full URLs work? Like url:"http://lucene.apache.org/java/docs/index.html" finds this very question, but url:"http://lucene.apache.org" does not?
    – Arjan
    Mar 30, 2011 at 20:58
  • 1
    @Arjan - use a wildcard to do partials, e.g. url:"http://lucene.apache.org*" Mar 30, 2011 at 21:10
  • @Nick, the URL search also works on other sites nowadays. Is it official already?
    – Arjan
    Apr 13, 2011 at 16:11
  • 2
    @Arjan - Yes, this is enabled across the network :) Apr 13, 2011 at 16:18
  • Nice, @Nick! Does this need to be added to the search help, like on meta.stackoverflow.com/search?
    – Arjan
    Apr 13, 2011 at 16:28
  • @Arjan - We'll take a look after MIX here...there are a few features we don't list on search that could be added I suppose, for example is:question and is:answer :) Apr 13, 2011 at 16:30
  • @Arjan - Windows Phone 7 keynote....meh :) Apr 13, 2011 at 16:44
  • @Nick, it also seems the number "10" in "any search terms matching the most popular 10 tags will be automatically mapped to a tag" is wrong?
    – Arjan
    Apr 21, 2011 at 12:53
  • @Arjan - This will vary by site, and the tag must have a minimum number of questions to be considered...the text will be accurate to the site you're on. Apr 21, 2011 at 13:22
0

Is the number of results being capped? If I do a search for closed:1 on Stack Overflow and sort by votes, the results end at +3 voted closed questions, yet I know that the others haven't been deleted yet.

I find this particular search useful when finding bad, neglected content to vote to delete, and being only able to see the first 40 pages of results prevents you from finding the truly bad stuff.

2
  • Yes, the number of results is currently capped at 2000, we'll decide if that needs tweaking as we go. Basically there are several unknowns when deploying to SO (the sheer load is untestable in any development environment) so once we gauge the impact of something, we can adjust from there. Jan 27, 2011 at 16:03
  • 1
    @Nick - Would it then be possible to implement a query argument for questions with less than a certain number of votes? This would be the opposite of the votes:3 argument which only shows results with a certain minimum number of votes. Again, this could be useful for housekeeping tasks. Jan 27, 2011 at 16:11

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