7

Search has many issues, but I want to specifically mention the fact that it utterly fails to manage quotes properly.

Here are some queries that return 0 results here on Meta:

Meanwhile, another search shows that there are plenty of results for the phrase "stack overflow".

This is most certainly related somehow to another bug. I had independently discovered this bug a while ago in this MSO question here.

Note that the original question on MSE is slightly inaccurate because the bug seems to be unrelated to C# or its keywords. I have replicated this bug on several different SE sites and, as far as I know, it affects every site in the network, even non-English sites.

With this bug, quotes are added to the front and end of the query. An example. Note that this may be affected by the number of results:

Could not find any results for "bug close" votes; showing 58 results for ""bug close" votes",

It also affects tags in a bizarre way. For this search, notice that it interprets the tag as both a tag (in this case a negated tag) and also as a search word:

There is something horribly wrong with the search in this picture

If I search for just the negated tag, it has similar behavior. But, if I take that same query and run it again, with the surrounding quotes, the term is only counted as a key word, not a tag. This means that the tag parser isn't inherently broken; I suspect that tags are parsed first and then quotes are added.

Strangely enough, if the original query is altered to include a "dummy" parameter, such as score:.., then it fails to display the bug altogether.

Here are some instances that I found (either look at the URL encoding or type them in yourself to see what I mean):

Slight modification to my first set of queries will also produce this behavior.

Yes, some of these searches are dumb, but I did once try to search for -[feature-request], only to be met with disappointment. There are numerous other instances that I have run into accidentally, but it's not like I have kept track of all of them. There are just too many.

This may also be related to the symbol bug.

*This seems to be an utter failure of the "stripping the not operator"

  • 2
    This makes me want to make a feature request to make the built in search just open a google search in a new tab, instead of trying to search. – enderland Jun 4 '16 at 22:55
  • 4
    What your expected result for a search query with quoted spaces..? – Jeremy Banks Jun 5 '16 at 2:49
  • @JeremyBanks It should ignore them. Or make sure that the post has at least one space. The only reason I included them was to prevent the automatic conversion to the tag. – Laurel Jun 5 '16 at 15:49
  • The first 4 examples behave the way they should. " " stack overflow " " would be 2 spaces on each side. "" + stack overflow + "" and " " + stack overflow + " " would have the plus signs included in your search. It's very unlikely there're posts that contain "(space)(space)stack overflow(space)(space)" or "+ stack overflow +". – clickbait Jun 7 '16 at 2:10
  • @NarawaGames You made me dig deeper, and I appreciate that. " " is the new broken search I found as a result. I do however, disagree with your conclusion about what the search means. If you actually search for it and look to your right, you will see the system interprets the spaces as their own entities, and reorders them. – Laurel Jun 7 '16 at 2:16
  • Possible duplicate of Search is adding quotes to searches starting or ending with very specific quoted phrases, which has been resolved in Jan 2018. – Samuel Liew Jan 23 at 5:16
2

This is now fixed.

Part of the internal workings of search is that in some cases where the initial terms return zero results, it will perform a variant search using the same terms (but surrounded by quotes). This variant search ended up leaking back into the UI in a confusing way. No longer an issue.

  • Ok, but why do the searches return results now? No post on Coffee SE contains the exact phrase "dark light", for example. There's also a minor bug with the title of the page where it's excessively quoted: Posts containing '"[caffeine] "dark light""'. – Laurel May 6 at 19:04
  • The results shown when searching for coffee.stackexchange.com/… are the result of the variant search that I referred to. Must have missed the title, will get to that soon, thanks. – Yaakov Ellis May 7 at 7:48

You must log in to answer this question.

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