19

When searching user:674039 -[python] it correctly finds my results that are not tagged Python.

But searching user:674039 [-python], which is what I'd incorrectly guessed the syntax would be, the result shows:

oops

I think it's misleading: it looks like the syntax was correct and there were no results. I only knew that something was off because I was sure there should be some results.

Instead, this page could do something more sensible like:

  • Autocorrect query to -[python] instead of [-python], or
  • Display error message that tag [-python] doesn't exist or is invalid, or
  • Show some sort of "Did you mean -[python]" message.
4
  • 5
    -[-python] produces Results tagged with not not [python]... and matches posts both with and without [python]. Commented Aug 27 at 19:42
  • 1
    the error message is weird, I agree. there seems to be a bug, causing the site to think there's a negation when there is not. the query requests questions with the tag -python, of which there should be none. -- [-python] is a query I'd write if I wanted to find questions with any tag that's not equal to python (i.e. the question must have tags that aren't 'python'), which is different from only questions without the python tag. Commented Aug 27 at 20:24
  • 1
    Bit unrelated, but searching just for [-python] just redirects to /questions, which is also an unexpected behavior (because nonexisting tags would still be shown, just with 0 questions)
    – Lino
    Commented Aug 27 at 20:49
  • 2
    I think the issue is the error message, since it's interpreting the part inside the square brackets according to rules that don't actually apply. Commented Aug 27 at 22:28

0

You must log in to answer this question.

Browse other questions tagged .