2

If searching for a [tag], the results show only questions. The help page gives the options

is:question, is:answer, is:article

but I would like to see both questions and answers. I tried

[tag] is:question or is:answer

but this shows only answers

Search options answers only not deleted

So how to search for a tag with both questions and answers in the search results?

I mean, if I don’t specify post type at all, articles are also included. I want to exclude articles from search results while showing answers and questions.

5
  • You could just add an empty string to the search "" (i.e. show all posts that contain an empty string, thus any post). Example (searches for [java] ""). Not sure if that is the goto way though
    – Lino
    Commented Feb 8, 2023 at 9:16
  • or only works for tag searches, not any other search terms. So you can do [a] or [b].
    – VLAZ
    Commented Feb 8, 2023 at 9:26
  • There’s no way to do this right now, you can as well make a feature-request
    – nicael
    Commented Feb 8, 2023 at 9:30
  • 1
    It seems if you put some invalid option after is: it just displays both questions and answers. So you could use something like is:any Commented Feb 8, 2023 at 9:30
  • @nicael Concerning your edit of the question: if the post type is not specified at all, only questions are shown. That's why I'm asking. I wouldn't mind too much about articles included, but basically I want to search for a tag - search results show matching questions and answers
    – Corrl
    Commented Feb 8, 2023 at 9:56

1 Answer 1

4

As of current, there is no way to search for questions and answers excluding articles. However, since the amount of articles are considerably small compared to Q&A, it is possible to search for all posts instead:

  • Use empty string "" or "
    • [tag] ""
    • [tag] "
  • Fill the search operator with invalid value, thus resulting in being ignored (e.g. is:all, views:a)
    • [tag] is:all
    • [tag] views:a
8
  • I believe the actual question is how to exclude articles from search results
    – nicael
    Commented Feb 8, 2023 at 9:32
  • @nicael that's fair, but Articles are really few/non-existent compared to the amount of Q&A that one can just manually ignore them.
    – Andrew T.
    Commented Feb 8, 2023 at 9:36
  • 1
    Yeah but still, author clearly mentions 3 post types and would like to search only among 2 post types, though there’re not really many articles right now, it’s still a valid concern
    – nicael
    Commented Feb 8, 2023 at 9:39
  • In this question is:(q|a) is mentioned (short for is:(question|answer) which seems to be working and would exclude the articles, so do exactly what I want. I didn't find it officially documented but maybe you still want to add it to your answer...
    – Corrl
    Commented Feb 8, 2023 at 9:49
  • 2
    @Corrl no, that doesn't work either. It's considered invalid and still returns Articles. (Also, that answer was posted back when there were no Collectives and Articles)
    – Andrew T.
    Commented Feb 8, 2023 at 9:56
  • @AndrewT. I see, thanks for clarifying. I'll leave this question open then since the currently possible ways always include the articles
    – Corrl
    Commented Feb 8, 2023 at 10:02
  • @Corrl actually, that answer explained that is:q or is:a could be used on the (now-defunct) mobile apps, but not that the literal is:(q|a) worked.
    – Andrew T.
    Commented Feb 8, 2023 at 10:03
  • @AndrewT. I saw it, I tried it and it seemed to be working. As commented above an invalid option seems to be setting the options to not deleted so showing everything, that's why it seemed to be working
    – Corrl
    Commented Feb 8, 2023 at 10:11

You must log in to answer this question.

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