63

As part of our ongoing mission to improve our network of sites for our users, we're working on improving search.

As some of you may have already noticed, we have begun recording metrics on the use of our search on Stack Overflow. From those metrics we have decided on some tests we're going to run as well as some improvements that we plan to make. We've also decided for the most part on precisely how we're going to measure the success or failure of these changes.

Some of the coming search improvements we plan to apply will change the way that search results are calculated. Effectively, we will be introducing some level of "fuzziness" - that is to say that you should get relevant results for most of your searches, even if you didn't spell every word correctly, added a few extra words, or didn't match a question title verbatim. In short, the theory is that most searches will get more relevant results, and there will be fewer low or 0 results searches in general, thus improving the search experience.

One thing that has come up which we don't have the ability to draw conclusions on is negative searching. Negative searching is people searching for specific phrases or words with the goal of getting few or no results. Based on our current metrics, we hypothesize that this might be happening on our sites. We think it might be our users searching for an answer to their question prior to asking the question (users of our sites often strive to avoid asking duplicated questions). However, the truth is that we don't know for sure.

If negative searches are a valuable thing for our users, a fuzzy search may destroy the functionality. That's where the community and human factor come in. Given that not everything can be quantitatively measured, I ask you this:

  • If you use our search to perform negative searches, why? Do you feel it works well?

Direct feedback to this question greatly appreciated in the form of an answer. Use comments for commentary.

18
  • 7
    Not an answer to the question; but I greatly appreciate the improvement. Its very annoying to, when searching my own post history (or the meta repository) have to remember exactly how something was worded to find the post I was thinking of. Commented Nov 21, 2014 at 18:59
  • 1
    I used a negative search once. Or tried, anyways. Sometimes, it's very difficult to find a language-neutral result. Adding the applicable language I was looking for resulted in no answers, and not adding it results in a bunch of language-specific answers.
    – Compass
    Commented Nov 21, 2014 at 18:59
  • 2
    I'm afraid most of the newcomer users just stubbornly ignore the proposed links shown to them, when writing a question. Also you should be able to suppose they've taken the SO tour (which isn't really true by means they've really took it). Commented Nov 21, 2014 at 19:00
  • @Compass - give me this comment as an answer please, so I don't lose track of it.
    – Haney Staff
    Commented Nov 21, 2014 at 19:00
  • @JeffreyBosboom awesome, please make this an answer!
    – Haney Staff
    Commented Nov 21, 2014 at 19:31
  • 5
    Fyi, Google handles the "negative search" problem by searching for exact matches for terms enclosed in quotes ".
    – Ajedi32
    Commented Nov 21, 2014 at 20:49
  • @Ajedi32 indeed, a good point.
    – Haney Staff
    Commented Nov 21, 2014 at 20:51
  • This should be featured network wide... :(
    – Braiam
    Commented Nov 21, 2014 at 23:24
  • 2
    @Braiam it will go network wide when we're done, but SO is our biggest user and thus our "test bed" as it were. As changed are approved they'll go out to all, even with some customizations per site eventually.
    – Haney Staff
    Commented Nov 21, 2014 at 23:28
  • 8
    Usually, fuzzy searches are helpful, but sometimes they can be very annoying when I'm looking for a technical term and get hundreds of hits on something similar. Have you considered providing an exact search option? Commented Nov 22, 2014 at 2:54
  • 4
    yepp, "exact match" checkbox. Commented Nov 22, 2014 at 10:02
  • One of IBM's searches of technical documents has Exact, Exact, case irrelevant and Fuzzy (as default option). I mostly use Fuzzy, but if many results or lots in unhelpful context, the others are useful to be able to fall back on. It seems from what you are looking to hold in the indexes would easily suffice for a good exact or two. Commented Nov 22, 2014 at 11:29
  • 1
    Probably the biggest negative search I do is for plagiarism cases, I think that's specific enough though that including it would harm rather than help a general purpose search tool. (Spammers, astroturfers, trolls and persistent Q-ban evaders can be found through negative searching, but that seems to work pretty well in conjunction with the other mod tools) Commented Nov 23, 2014 at 11:05
  • you guys can can outsource your search engine to google. They offer customization etc... Commented Nov 23, 2014 at 15:44
  • 1
    @AwalGarg More accurate for some things, less for others. When I look for unanswered questions with positive score in a particular tag, Google is of little help. In any event, SE already has customized Google search engine.
    – user3717023
    Commented Nov 25, 2014 at 18:13

20 Answers 20

46

Overall, really happy to see work being done on the search feature. I think it is time well spent.

fuzzying

If the results are to be "fuzzied" then do it to the search term and not to the search algorithm. Google does it this way as well. If you search for "aaplecation" and there are a significant amount of results for "aaplecation" then it shows them. It then offers you a suggestion, "Did you mean application"? Which you probably did.

If the "aaplecation" results were impossible to get to, then I think that would be problematic. Doing this fuzzying in the algorithm would cause that type of problem.

duplication

One main issue I have with using the search is that if a question has 6 answers and all of them repeat some aspect of the question that I searched for, I can get in the results the question itself, Q: fizzbuzz?, and each one of the answers A: fizzbuzz(){}. I know that with an advanced search you can either choose to only see questions or only see answers, but that means it is possible to miss one of these. It would be nice if there was a way to remove all duplicates and only show the question if any of the answers or question matched the search.

negative searches

I always look for questions related to my issue on Stack Overflow before asking. And if I do not find it in the first search, I keep looking. I will then look in the related questions, in a different search, a search from google into Stack Overflow, and related terms to see if my question was answered.

Recently, I was researching concurrency and table locks in mysql databases

enter image description here

I will do this for hours and days if required before I ask a question on my own because I am a large believer in self education. Struggling with something makes it memorable in my opinion. If, after all of that, I do not find what I was looking for, I will ask my question. The exception to this is when attempting a canonical post.

Often I do find an answer, although it may be a composite of multiple posts. Searching is very important for determining if the question is a duplicate, or more importantly for simply finding the answer.

12
  • Regarding fuzziness: at the query is expensive relative to pre-calculated in the index. The current thought is to try a combination of literal field, stemmed field, and ngram'd field, giving literal matches a boost so that they're on top. That and maybe a Google style quotation system to give you rigid literal matches.
    – Haney Staff
    Commented Nov 21, 2014 at 23:00
  • So if someone is searching for Math.random, when they get to Math., Math.random will be one of the guessed ngram fields (at least ideally)? At that point, the query would then be issued with both Math.random and simply Math (the stem) and results with Math.random would come first, followed by results with Math? As for your note about query versus index, can you clarify? Is that calculating what to search in the query, versus having some sort of composite key to index? Or are you talking about lookup tables for the field terms?
    – Travis J
    Commented Nov 21, 2014 at 23:09
  • The query would have to enumerate over the result set and perform a calculation on each item until it reached the N threshold results. The enumeration and calculation are expensive and scale poorly. It's better to pre-calculate and store your desired data format (stems, ngrams, etc.) in the index along with the original unaltered field. This takes up much more index space, but hard drives are cheap relative to CPU.
    – Haney Staff
    Commented Nov 21, 2014 at 23:14
  • 1
    So for example: given a question title, we'd store the title verbatim, stemmed title, and title ngrams/shingles to allow for tolerance of misspellings. The query would hit all 3 with a boost on verbatim field. Exact match most relevant followed by fuzz.
    – Haney Staff
    Commented Nov 21, 2014 at 23:17
  • @Haney - Okay, that is much clearer thanks :) Sounds complicated to determine the value of the fuzz, as in whether the fuzz was the strongest part of the result versus the weakest. Perhaps some of the field generation could come from using the connections in tag synonyms.
    – Travis J
    Commented Nov 21, 2014 at 23:28
  • Yeah it's a science and an art. There will be synonyms, isolation of code blocks in questions, even titles stored in reverse to allow edge-gramming for things like type-ahead. ;)
    – Haney Staff
    Commented Nov 21, 2014 at 23:41
  • Well it all sounds very magical :) Can't wait for part 2 in the future or perhaps a sandbox to play in.
    – Travis J
    Commented Nov 21, 2014 at 23:43
  • 2
    A lot of these tests will be announced to meta shortly after, not during. This is because bias will screw with our normalized outcomes/results. So we can't tell you about what we did until after we did it... I'm more than happy to share the results as we go however. :)
    – Haney Staff
    Commented Nov 21, 2014 at 23:44
  • @Haney - Would it be possible to add a date range to the search?
    – Travis J
    Commented Jan 9, 2015 at 8:39
  • It's possible to do a lot of things. Please make it a meta request if you're interested!
    – Haney Staff
    Commented Jan 9, 2015 at 16:03
  • @Haney: Reading your description of all this unfortunately hits way too close to home. I recently had to deploy Elasticsearch and set up all the types and indexing. It's indeed very much an art, and I have total respect for you and whoever else works on the search for StackOverflow. It's enough to drive you insane tweaking everything to be just right. Commented Feb 20, 2015 at 14:52
  • Any time I try to find a duplicate in the close vote duplicate search modal, I end up with few to no results. Even when I know I'm typing in the exact or nearly exact title of a popular question.
    – TylerH
    Commented Aug 5, 2016 at 20:40
25

I almost never use Stack Exchange search and instead rely on Google to search SE for me. The one exception is when I finally get to asking a question (like Travis, I too am a firm believer of self education), in which case I use it to double check I'm not asking a verbatim duplicate. However, by this point the chances of it being a duplicate are extremely low because of my previous Google searches.

Because of this, I believe work on the search engine should not be a priority.

14
  • 1
    I do this as well; but you can't do certain searches with google. For example, you can't search just your posts. Commented Nov 21, 2014 at 22:10
  • 1
    @BradleyDotNET For that case the SE search engine is still perfect because the set of your posts is very small in size. Other searches (ie search by tags) cant explicitly be done by Google, but Google is usually smart enough to give you relevant results anyways. If for some reason Google isn't smart enough, just put the tag you want in the search query and it works fine. Commented Nov 21, 2014 at 22:14
  • Yes, I use the SE search for that; which is why I want it improved. As it stands; I have to remember exactly how I worded something if I want to pull up an old post (nearly 700 posts take a while to sift through). Commented Nov 21, 2014 at 22:16
  • @BradleyDotNET Yeah, but 700 relatively very small. A combination of <search posts by me> and <search query> should narrow that down significantly. Commented Nov 21, 2014 at 22:18
  • 6
    Except the search query doesn't work. If I get the wording wrong, nothing shows up! Hence the fixes being discussed in this post. Commented Nov 21, 2014 at 22:19
  • @BradleyDotNET I suppose thats a fair point, but personally I run into this issue so infrequently that I consider it a non-issue Commented Nov 22, 2014 at 18:23
  • "set of your posts is very small in size" may be true for you, but not for everyone
    – Ben Voigt
    Commented Nov 22, 2014 at 20:28
  • @BenVoigt Relative to the Internet, or even just Stack Exchange, its VERY small for everyone. A simple search engine for a sample size maxing at a few thousand (I dont think anyone has more than that many posts) is generally plenty. Commented Nov 22, 2014 at 20:31
  • 2
    @DavidGrinberg: Some users are into the tens of thousands of answers. Include comments, and it's potentially hundreds of thousands. No it's not a large number on Internet-scale, but large enough that computer assistance with search is necessary, not just nice to have.
    – Ben Voigt
    Commented Nov 22, 2014 at 20:36
  • @BenVoigt I cant say Ive ever been inclined to search for comments (didn't even realize you could do that), but I will grant you that users with 10K+ posts may have trouble. However, I feel this is an exception and not a rule (hence low priority). Commented Nov 22, 2014 at 20:40
  • 2
    @DavidGrinberg: Of course you can search for comments. Click every page, read the comments, stop when you find the one(s) you were looking for. The existing search tools are pretty lacking, that's why there's an effort to improve them.
    – Ben Voigt
    Commented Nov 22, 2014 at 20:46
  • 4
    I'm with this guy. I never used the built-in search, only Google.
    – SeinopSys
    Commented Nov 23, 2014 at 3:12
  • Agree with you. I rely on Google when I'm doing a general search - and generaly look first SO links... I mainly use SO search engine when I want a specific post I've already read (or written). It is hard to build a better search engine than Google's one Commented Nov 23, 2014 at 8:33
  • 1
    I've never had much luck with the SO search, so I always use Google to search only SO by including site:stackoverflow.com in my Google search
    – Cocowalla
    Commented Nov 23, 2014 at 13:18
15

I'm posting these concerns as a separate, second answer, because this is more "devil's advocate" than my other answer and also does not address the negative search use case question.

I have two concerns about "fuzzying" the search results in general:

  1. Single characters, spaces, etc., are significant in programming. You don't want "fuzzy" things like to and do or if and fi or IllegalArgumentException and illegal argument exception on a programming site (maybe the latter, as long as the Fuzzificator searches for the full exact phrase and not individual words), I don't think. That said, there are still good cases for this, e.g. tomcat and tom cat.

    How will you make sure you aren't damaging the relevance of search results by potentially treating distinctly different keywords (say, for in vs. for of) as equivalent? How will you analyze and balance attempting to guess what a user really meant (or include results with typos) vs. keeping results accurate for very specific keywords and phrases in a programming context?

  2. If a search has highly relevant results, the results would be easy to spot. If a search doesn't have highly relevant results, is there a danger that there will be too low a "signal to fuzz" ratio? Further, and perhaps I'm over-thinking, but are you concerned that a low SFR when searching for things that don't have many results could lead to a user concluding that the SO search is poor quality and thus not using it in general? You don't want to damage the SO search's reputation, those kinds of things can last a long time in peoples' minds.

To this end, I wonder if it makes sense to perhaps disable or lower the fuzz factor for searches that don't have a lot of relevant results anyways. This could hurt efforts to display e.g. results that have typos when the user types the search correctly, but could also help by not filling the results with noise if there aren't many good results to begin with.


Fuzzolizer? Fuzzifier? Fuzzinator? Fuzzotron 3000.... XL? GTS-R? What's it gonna be?

1
  • 2
    1. Valid point. We will be handling code blocks probably as verbatim, and native spoken languages (non code blocks) via stemming / sharding / ngramming / fuzzy. 2. Yeah that's one of the main goals of our first set of experiments. We truly aren't sure here yet, but we share your concerns.
    – Haney Staff
    Commented Nov 22, 2014 at 0:05
15

Yes, I do "negative searching", but not to "search before asking"...

When I'm searching with a "goal to get few or no results" it's almost always because I'm trying to find that one question "I've seen before" (or perhaps written / edited a while ago), or that one canonical question.

It works medium-well. Mainly the mix of questions and answers in results is unhelpful, and 9 out of 10 times I add is:Q to the query. About half the times (when I'm looking for a canonical question) I add votes:10 or something similar, mostly when I'm looking for canonical questions. For searches on meta.so this is closer to 9 out of 10 times too.

What I do like are the power user options, they tend to be very helpful.


As a footnote, personally, when I'm searching for answers to my own question, I tend to go like this:

  1. First step is a general Google search. SO will be at the top anyways, if not that it'll be some other important resource (MDN, MSDN, etc). I usually spent no more than 1 minute in this modus.
  2. Second step might be a SO search, if I know or "feel" the answer should be there. I usually spend very little time (max 1 min) on this step, unless I know I've seen the question before. This is because step 3 is otherwise more effective.
  3. Final step is that I start writing a question I may never finish, because this is the most effective way to search. Partially because the "suggested questions/dupes" are very useful, and partially because writing a good question allows me to come up with better search terms (and allow me to go to step 1 again in a different tab).

Bottom line: Stack Overflow search is quite okay. Google search is often better (though less specific). But knowing what to search for is the hard part.

11

I attempt negative searches to avoid posting duplicate questions, but I'm not usually "searching for an answer to [my] question prior to asking"; I'm searching for a question on which to post the answer I found on my own, as an alternative to asking and self-answering.

If there is a question, I usually find it quickly. If there isn't one I have to try multiple queries and sort through multiple pages of results for each to be satisfied the question doesn't exist yet, but that just seems like the nature of proving a negative (analogy: there are no certificates for boolean unsatisfiability). I haven't done it recently, so I can't comment on any recent search engine changes.

2
  • 1
    How successful is this for your use case? Does it work or do you often end up frustrated/disappointed?
    – Haney Staff
    Commented Nov 21, 2014 at 19:33
  • @Haney: If there is a question, I usually find it quickly. If there isn't one I have to try multiple queries and sort through multiple pages of results for each to be satisfied the question doesn't exist yet, but that just seems like the nature of proving a negative (analogy: there are no certificates for boolean unsatisfiability). I haven't done it recently, so I can't comment on any recent search engine changes. Commented Nov 21, 2014 at 19:37
10

I used a negative search once. Or tried, anyways. Sometimes, it's very difficult to find a language-neutral result. Adding the applicable language I was looking for resulted in no answers, and not adding it results in a bunch of language-specific answers which wouldn't help at all.

Somewhere out there, someone probably asked this question, for sure (and I eventually found and wrote my own solution after journeying through the depths of the Internet).

I would probably prefer it be toggled on and off, or perhaps an option like +fuzzy. Sometimes, rigidity is helpful, but forcing it would probably make some intentionally descriptive searches return too many results.

0
7

If you use our search to perform negative searches, why? Do you feel it works well?

I do not usually use negative searches to avoid posting duplicate questions (for that I find the search-as-you-type in the "ask question" form works very well).

However, I frequently use somewhat negative searches to find duplicates to questions I'm reviewing. When I see a new question and suspect a duplicate exists, I search for it with the SO search engine. Usually duplicates are apparent. If there are not many results, or no relevant results on the first page or two, I conclude that a duplicate likely (not definitely) doesn't exist and move on. This process does not take long and has served me well.

I do not think fuzzying the results will affect my process here for questions that have obvious duplicates, where the "signal to fuzz" ratio is high.

However, my only "concern" (I use the term loosely) is that when searching for duplicates, if there aren't a lot of naturally relevant results, the "fuzz factor" will take over and still leave me with a lot of misleadingly relevant results to specifically check. So now it becomes more difficult to conclude that no duplicate exists.

The reason I use "concern" lightly is because the actual end result of this isn't particularly horrible, I don't think. It doesn't sound like fuzziness will make it harder for me to find duplicates when they clearly exist, it just means I might miss a few potential duplicates here and there (and somebody else might catch it instead), which I don't really see as a big enough of a problem to be a strong argument against fuzziness.

In general, I'm kind of indifferent, I think adding fuzziness might be cool, and I wouldn't complain if it stayed the way it was either. But I did want to point out one use case and how I think it might be affected.

7

I don't see a problem.

  • word — perform fuzzy search:
    word, words, w_o_r_d, etc.; may be missing
  • "word" — perform strict search:
    word
  • +word — perform strict search with stemming (optional):
    word, words
  • [word] — perform strict tag search:
    word in tag
  • title:word — perform fuzzy title search:
    word, words, w_o_r_d, etc. in title
  • title:"word" — perform strict title search:
    word in title
  • etc.

If the user entered just a few words, make the search as fuzzy as you want. If the words are quoted or enforced in some way, make sure they actually appear in the results — the user probably knows what exactly he's searching for.


I usually use Google to search for answers on SO. I use SO's search in two cases: non-trivial queries requiring SO-specific operators; and "similar questions" when asking a new question (surprisingly, it's much more useful than usual SO's search).

6

In general, when I want to perform a negative search, I will start by formulating a title for my question.

This gives the "Questions that may already have your answer" list on the new question form.

Personally, I think that adding fuzziness could only improve the results in this list.

6

To find out if a question is already asked, I just go to "ask question" and type the title, the tags, and a few phrases of my question. I find that the 'related questions' algorithm is far more accurate in finding the question I am looking for than the search function.

When I am having a problem with something, I ask google my question. Often this brings me to StackOverflow anyway.

I have tried to use StackOverflow's search function to find one of my own answers. Usually I can't find it, which is frustrating, but at least I only have to look through 3 or 4 posts.

As an actual use case, I once tried to find this answer while writing this answer. Just now I tried to find that particular answer again... I tried searching for:

  • user:2209007 hide get (2 posts, 1 of which is the latter answer)
  • user:2209007 hide get is:answer (9 results?!, contains the latter answer again)
  • user:2209007 hide get is:answer [mod-rewrite] (did not seem to make a difference, even though I see some jquery/php/.htaccess questions without that tag)
  • user:2209007 hide query (1 result)
  • user:2209007 cookie \[CO (4 posts, 1 is the answer I was searching for)

The answer I was searching for didn't actually contain 'hide' it seems, but it does contain 'visible' and 'invisible'.

For a query like this I don't want to see pages of questions & answers. In fact, if I see pages of q&a's my query is too generic and I try to make it more specific. I don't want to wade through a few pages of A's to find my answer. I think it would be nice to have it search for some related words, but make it clear where the exact matches stop and where the maybe-you-meant-this-matches start. I am not always interested in them. Similarly, you can show results with one or more search terms omitted, but let me know where those results start.

6

I do a few unusual searches that maybe fit your definition of "negative search".

  1. I sometimes do the following tag search to attempt to find questions that are erroneously tagged both & by people who don't know the difference:

    [java] [javascript] -[jnlp] -[gwt] -[vaadin] -[selenium] -[selenium-webdriver] -[htmlunit] -[jsp] -[struts] -[struts2] -[rhino] -[servlets] -[jsf] -[jsf-2] -[jstl] -[wicket] -[applet] -[spring] -[spring-mvc] -[tomcat] -[nashorn]

  2. I recently started experimenting with the following search query to find posts that aren't tagged with major programming languages:

    is:question -[javascript] -[java] -[c] -[c++] -[c#] -[php] -[python] -[perl] -[prolog] -[pascal] -[delphi] -[lua] -[clojure] -[clojurescript] -[lisp] -[common-lisp] -[scheme] -[cobol] -[erlang] -[r] -[ruby] -[ruby-on-rails] -[jsp] -[scala] -[groovy] -[haskell] -[swift] -[go] -[dart] -[haxe] -[applescript] -[matlab] -[maple] -[ocaml] -[vb] -[vb6] -[vba] -[vb.net] -[vbscript] -[asp] -[asp.net] -[f#] -[xul] -[xaml] -[xslt] -[autoit] -[objective-c] -[makefile] -[bash] -[shell] -[cmd] -[command-line] -[batch] -[powershell] -[sql] -[mysql] -[sql-server] -[postgresql] -[tsql] -[sqlite] -[mongodb] -[git] -[vi] -[vim] -[emacs] -[notepad++] -[actionscript] -[liquid] -[html] -[css] -[sass] -[stylus] -[regex] -[yacc] -[lex] -[tex] -[latex] -[vhdl] -[maven] -[.htaccess] -[language-agnostic]

    The idea being to find posts that are either completely off-topic or which are by new users who aren't using tags correctly, and so they might not get any response if no-one looks for this.

  3. Today I was experimenting with searches containing quoted phrases like the following in an attempt to hunt down answers that should have been posted as questions:

    "does anyone know" is:answer isaccepted:no

    "is there any solution" is:answer isaccepted:no

    "please suggest" is:answer isaccepted:no hascode:no

    (I flagged 25 old "not an answer"s this way, but ultimately it wasn't very efficient so I probably won't do it again.)

So long as you don't make tags or double-quoted terms fuzzy, fuzziness won't cause any problems for me.

4
  • You could probably increase the efficiency of #3 by restricting the answer score.
    – user3717023
    Commented Nov 22, 2014 at 21:22
  • #2 is a very good idea. Commented Nov 23, 2014 at 15:00
  • Nice tricks. related to#2: YOU FORGOT JSON AND JQUERY HOW DARE YOU!
    – UmNyobe
    Commented Nov 25, 2014 at 17:13
  • @UmNyobe I'm always uncertain if jQuery posts should also be tagged JavaScript. Likewise for AngularJS and Node.js and a dozen other JS frameworks.
    – Boann
    Commented Nov 25, 2014 at 17:45
5

The typical situation in which I'm doing a negative search is when I'm looking for the answer to a question with very similar wording as a frequently-asked one. For example, when I'm trying to disable automatic indentation in Emacs while keeping it with special characters, I find questions like

which are much more frequent but aren't at all what I'm looking for.

(I finally asked the question here.)

4

In addition to trying to avoid duplicate questions I will sometimes do a negative search for editing purposes. For example there is a tab [s4] which refers to a way of doing object oriented programming in r. As you might expect it will sometimes accumulate questions relating to phones. I will occasionally do a search on [s4] -[r] to check if any more have hit and then edit any that do.

I have also done [r] -[s4] s4 as a search (with additional text) to see if there is an answer to a question I have about s4 that was not tagged [s4].

3
  • Do you feel that your negative searches work well, or do they frustrate you?
    – Haney Staff
    Commented Nov 21, 2014 at 20:36
  • @Haney The searches for avoiding a duplicate question can be hit or miss - but that is often a result of my poor choice in search terms. The others work well.
    – John Paul
    Commented Nov 21, 2014 at 20:38
  • that's the fallacy. The hit or miss is the result of the rigidity of current search; something we will be improving upon greatly. :)
    – Haney Staff
    Commented Nov 21, 2014 at 20:40
4

Regarding negative searching prior to asking a question: the community often provides fuzzing after the question is asked in the form of skimming the question and google searches, then downvoting and links to possible duplicates which have similar titles but sometimes substantially different circumstances and content. This is especially true of "beginner" type questions where the OP indicates having negative searched but does not know all the common synonyms.

Although the above behavior can be considered the system working properly, IMO, a fuzzed search with an "exact match" option would shift some workload off of the community and help the system function better.

4

Personally I have learnt to not use the built in SO search and instead do one of two things:

  1. Use google search with the keyword stackoverflow,
  2. Attempt to create a question by creating a descriptive title, then examining each result in the suggested posts.

I find that somehow #2 will often find solutions where the direct search would not.

4

Two common scenarios for me:

  1. Searching for a very specific term that may be close in spelling to many other terms but for which I'm interested only in the exact spelling (and perhaps capitalization) that I've specified. For instance: function names. PointInRect() is not PointInRectange() is not PtInRect(). And no, these are not always marked up as code.

  2. Searching for an unusual phrase that I remember from one specific post that I'm trying to find again. The actual phrase doesn't matter here; it's just a convenient way for me to get back to an answer: searching for it yields few results, while searching for the topic yields many.

To be clear, the value of negative searching here is in not wasting time when the term I'm searching for doesn't exist (no one's written about that funciton, I got the wrong site, etc.) - as long as there's a way to selectively turn off fuzzying, this won't bother me.

3

Please improve the Range Operators and Dates.

For example - Currently:

score:-1 or score:-1.. will both return posts with a score greater than or equal to -1

How do I go about all questions/answers with score LOWER than -5?

I have to make up a negative number like -100 and say:

score:-100...-20

That ^ is confusing and you always need that low negative number.

If I could suggest one improvement to the way the score part works; would it be possible to say

views > 100000

or

score >= 5 && score <= 25

or

created >= 2014-12-06 && created < 2014-12-08

I would find this quite less confusing than how to currently use it...

2

I specifically use SE search to find questions where I could use my expertise to give a good and helpful answer. I use google to find answers to problems I want solutions for. To date I have never had to ask a new question as there always has been something there.

The issue I have with SE is I do not have the search qualifiers I need to reduce the search results to something useful and tractable. For example I would like to be able to say comments:0. I particularly like the previous suggestion of range operators and dates.

It would also be useful if I can say something like [batch-file] -[make] comments:0 answers:0 closed:no comments:0 etc.

If I could add restrictive attributes for every characteristics of a question page it would help me find those questions where I could nail an authoritative answer when I have those few spare minutes between jobs.

2
  • BTW, when retagging posts, make sure you correct other problems with it. Minor edits tend to be rejected.
    – bjb568
    Commented Dec 30, 2014 at 19:25
  • thanks. I noted that when reviewing my edits.... Commented Dec 30, 2014 at 19:28
2

The MOST important improvement would be to much better document EXACTLY how search works. Any search algorithm can be used effectively if you know what it is does. It would be much better if the help page on advanced search contained a thorough description of the search algorithm currently used --- instead of a bunch of random cookbook recipes that it currently has. People shouldn't need to search SO meta to find out how search works.

Secondly, whatever changes you make, there needs to be a way to opt-out. Many people will abhor "fuzzy". They shouldn't be stuck with it. Much more important that what features you implement is the level of control that people can have over those features.

Some already detest how they can't expand searches to include all answers and comments. There needs to be many, many more ways to specify "search" that just the current "in title" or "in body". How hard can it be to have some check boxes where you can choose what parts you want to search?

Most of the current "advanced search" options are not really "search" related. They are database query options: tags, author, score, answers, views, status, types. The entry either matches or it doesn't. You need to consider not only all the places where the terms can be found but also such things as proximity, synonyms and surrounding context. These are the qualities that define an effective search engine.

1
  • 2
    I was about to reject paragraph 1 arguing that you're thinking like a programmer and that no normal human being wants to read through the description of an algorithm; they want cookbook recipes. But then, this is a site for programmers so fair enough.
    – Pekka
    Commented Apr 3, 2015 at 21:46
1

I tend to not use the SO search box. For (what you're calling) negative searches (looking for an answer to a question before asking the question) I most often use the "Related" sidebar (as well as Google).

I find that if I search the (virtual) tree of results in the "Related" sidebar that I get what I consider to be a reasonably comprehensive search of SO for the answer I'm looking for. It picks up different ways of asking the same question effectively, somehow.

You must log in to answer this question.

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