I have long been using the answers:1
filter to limit search results to questions with answers, but it seems that it does not always work as described.
For example, this SO search returns 18 hits, with the topmost 3 having 4, 2, and 1 answers respectively, but those answers are not indicated on the search results:
And sure enough, when I add answers:1
(this search), those questions are not included in the results.
Is it a bug?
How do I search for questions that have answers without excluding those?
Edit:
Thanks to Shadow The Spring Wizard's answer, I understand that the first query finds both questions and answers containing the search terms, while the second finds only questions.
So the question remains: what is the syntax to search for both answers and questions with answers? I tried AllowShortEnumsOnASingleLine (answers:1 or is:question)
but it did not work.
answer:n
andisanswered:yes
return only questions, andis:answer
returns only answers. Trying to combine them leads to the post type of the second condition to be ignored, so ` isanswered:yes is:answer` or ` answers:1 is:answer` return only questions. This actually is a bug in the interface, which for the second query says "Search options answers only not deleted answers>= 1" which is not true because it is not "answers only", it is "questions only". Probably this is already reported somewhere, I'll check.