What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

Possible Duplicate:
How can I search for a string containing a colon?

Searching for non-word character sequences (which are operators in many languages) feels like it should be a doable thing on SO, yet a simple search for ++ yields no results.

It makes sense for general purpose search engines to optimize these strings away, but this is a programmer's site. You should be able to search for anything in a programming language.

Try it for yourself: ++, --, **, ~~, !!, or even most non-word characters by themselves.

So, is there an update? Is this a feature we can expect soon?

This same topic was approached and answered briefly by Jeff Atwood here:

In each case implying that SO's search engine was probably backed by Google. Google seems to optimize away character sequences like these, so a direct solution is out. But why not encode characters for the sake of the search index?

An efficient way to do it would be to scan each page for the character sequences /[\w\s](\W+)[\s\w]/ and then add them in an encoding to a meta tag. Then have the search also look for the encoded version of similar sequences found in search strings.

This shouldn't break any existing functionality if a simple encoding like url-encoding is used, but if a smarter encoding such as ++ to plusplus is used, then the search can also operate in natural language across SO and other search engines.

share|improve this question

marked as duplicate by Ether, jmfsg, Gnome, ChrisF, Lance Roberts Jun 23 '10 at 15:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
Reminds me of when searching for "C++" on google was a real bitch... –  Nick Craver Jun 23 '10 at 0:49
3  
Or selecting an item containing "C#" in Google's AJAX dropdown. –  Gelatin Jun 23 '10 at 0:51
    
Variation of this already exist somewhere, though I don't know right off if they are exact matches. The usual advice is to use google. –  dmckee Jun 23 '10 at 1:38
    
closing this question only serves to let this problem fester as it has been... To those that voted to close, do any of the other questions on meta actually describe what the real problem is, or the scope of the problem? Do any of them actually seem like they are working towards a solution (or are they sitting idle with accepted answers...)? The question already has 8 upvotes, seems to me that this is a question the SO community would like answered (in a more complete and meaningful way than it has been previously). –  Eric Strom Jun 23 '10 at 17:17

1 Answer 1

As a manual solution add a tag with the prefix non-word- from this list:

&  (ampersand)
*  (asterisk)
@  (at-sign)
\  (backslash)
`  (backtick)
!  (bang)
{} (braces)
[] (brackets)
^  (caret)
:  (colon)
,  (comma)
$  (dollar-sign)
.  (dot)
"  (double-quote)
=  (equal-sign)
-  (hyphen)
<  (left-angle-bracket)
() (parentheses)
%  (percent)
+  (plus-sign)
?  (question-mark)
>  (right-angle-bracket)
;  (semi-colon)
#  (sharp)
'  (single-quote)
/  (slash)
~  (tilde)
_  (underscore)
|  (vertical-bar)

The Camel Book Index (Programming Perl) is used for the terminology. For example, tag non-word-tilde-tilde would be used for "~~". This tag would be added to SO question, What does “ ~~ ” mean in Perl?, which is one of the provokers of this question.

Using a tag would allow a person to determine that the dot at the end of this sentence does not get a non-word-dot tag.

share|improve this answer
    
My reputation does not allow me to add these new tags. –  C.W.Holeman II Jun 23 '10 at 14:57
    
-1.. Sorry this is a bad idea and it's not what tags are meant for. –  Andreas Bonini Jun 23 '10 at 15:10
2  
I don't want to know what a tidle is. –  George Stocker Jun 23 '10 at 15:17
    
That would require us to retag every question on SO that uses a special character (or has answers that do) so that we can search for them. That count is somewhere around 750,000 at this point. (If I'm reading this right?) –  Bill the Lizard Jun 23 '10 at 15:37
    
@Bill => this type of tagging could be done transparently at the database / search level in an entirely automated way. Sure it might take a few days to generate the new indexes, but as is the price of progress. –  Eric Strom Jun 23 '10 at 17:20
3  
I'll give you credit for an inventive solution to the problem, but this is not what tags are for. –  Jon Seigel Jun 24 '10 at 0:29

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