13

Sometimes when I search on Stack Overflow, I use the following technique: [swift*]. This allows me to filter questions whose tags begin with "swift". I like to think of it as an alias or wildcard tag.

I've come across a few issues with the UI, however.


Issue 1:

When I make the search, the wildcard tag [swift*] gets expanded inside the search box to:

[swift] or [swift3] or [swiftui] or [swift2] or [swift4] or [swift5] or [swiftmailer] or [swift-playground] or [swifty-json] or [swift-protocols] or [swift4.2] or [swift-package-manager] or [swiftui-list] or [swift-extensions] or [swiftui-navigationlink] or [swift4.1] or [swiftui-bug] or [swiftlint] or [swift3.2] or [swift-dictionary]

This makes it rather annoying if I want to slightly change my next search.


Issue 2:

It also gives me this clunky URL:

https://stackoverflow.com/questions/tagged/swift+or+swift3+or+swiftui+or+swift2+or+swift4+or+swift5+or+swiftmailer+or+swift-playground+or+swifty-json+or+swift-protocols+or+swift4.2+or+swift-package-manager+or+swiftui-list+or+swift-extensions+or+swiftui-navigationlink+or+swift4.1+or+swiftui-bug+or+swiftlint+or+swift3.2+or+swift-dictionary

I'm wondering why it doesn't look like this instead:

https://stackoverflow.com/questions/tagged/swift*

Both URL's work, and give you the same results: (lengthy URL / shorter URL)


Please unify searching:

It turns out that when searching for -[swift*], this UI issue disappears.

https://stackoverflow.com/search?q=-%5Bswift*%5D

And it also doesn't annoyingly expand it in the search box! It stays -[swift*] as expected. For other searches this doesn't always work! It's very unreliable.

It would be highly appreciated if the Stack Overflow team could iron out this UI to make it unobtrusive and reliable.


Interesting note: searching for [*git*] [*git*] [*git*] [*git*] [*git*] [*git*] [*git*] will trigger a bad request (Because the URL is so massive). Try it out.

Now we can play a game and figure out what it is the smallest search that will trigger the error until they fix it. My record is 36 characters

8
  • 1
    I'm curious as to what the limitations of this are- searching for [*j*], for example, doesn't trigger a wildcard search and instead simply searches [j].
    – zcoop98
    Commented Oct 27, 2020 at 14:54
  • 1
    Also looks like wildcard * searching works in the tag browser/ tab too.
    – zcoop98
    Commented Oct 27, 2020 at 14:55
  • 1
    @zcoop98 Wildcard tags must include at least 3 regular characters (With the exception of the tag browser). Ex: [c++*] will work, but [c*] will not.
    – 0-1
    Commented Oct 27, 2020 at 14:56
  • 1
    Your "challenge" got me interested... it looks like, from experimenting, that the length limit for SO urls is 1,988 characters. Any tag search that generates a url length greater than this appears to trigger a Bad Request error.
    – zcoop98
    Commented Oct 27, 2020 at 15:13
  • 1
    +1 for the last sentence. Commented Aug 22, 2021 at 3:46
  • Dang, I can't even get the error! Commented Aug 22, 2021 at 4:24
  • Simple code golf. You win! Commented Aug 22, 2021 at 4:24
  • @Someone_who_likes_SE It looks like the error has been fixed (I think?)
    – 0-1
    Commented Aug 22, 2021 at 19:57

0

You must log in to answer this question.