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.

If matching words are in quotes, the result is not shown:

share|improve this question
3  
Whta have you tried? :) –  Pëkka Mar 22 '13 at 16:12

1 Answer 1

The search engine is only considering whitespace delimited text when searching for exact results.

In other words, searching for exact matches requires you to include punctuation. In your first example, there is no literal what have you tried sentence without punctuation in the question text. There are only forms with quotes around them:

"What have you tried?"
"What have you tried"

I have not been able to figure out how to search for an exact phrase with quotes; there seems to be no way to escape literal quotes available.

But you can search for another phrase that includes punctuation:

This is generally a good thing,

Search for "This is generally a good thing" is:q fails, but if you add the comma and search for "This is generally a good thing," is:q then suddenly there is a match.

I am not that familiar with elasticsearch / Lucene configuration, but if it is possible to configure the index to not include punctuation when searching for exact phrases (while at the same time allowing you to match exact punctuation too), then this is a bug in how the search engine on Stack Exchange is configured.

share|improve this answer
    
I wonder - if Lucene exact search would skip punctuation, would it also throw searching for programming related concepts out too? How'd you search C++, .NET or for (i=0; i<len; i++) then? –  eis Dec 16 at 8:33
    
@eis: Which is why I qualified it as while at the same time allowing you to match exact punctuation too. –  Martijn Pieters Dec 16 at 8:36
    
yes, I wasn't criticizing this answer - was just wondering if there is a way to have a different rules or some other workaround. Sorry, it was somewhat unclear. –  eis Dec 16 at 9:05

You must log in to answer this question.

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