Workspace search bar does not match types

I’m trying to search for say “Script”, however, it only shows objects with “script” in their name, not type
image
Showing ServerScriptService is empty
image
When there is clearly scripts
image

Expected behavior

It to show actual scripts, like what’s mentioned here

1 Like

If you weren’t already aware, a temporary workaround to this is to instead enter “ClassName=Script”. Still a bug nonetheless!

2 Likes

You can also type is:Script if you have the beta installed.

4 Likes

This should be #bug-reports:documentation-issues because that page shows wrong information now. Search was changed, so they should change the documentation.

and also c:Script

This specifically is an unfortunate regression, but after some thought and discussions I am going to regard this as intentional behavior, and ask that the documentation be updated. Here’s a bit of a technical ramble as to why.

I don’t remember exactly how old search worked in this regard (I know it did something, just forget if it was partial/exact), but the issue is that searching Script intuitively should show ModuleScript and LocalScript, that is what I expect. To get that to work, we can make name searches without something explicit like Name= do a partial class name search too. That’ll be somewhat less performant, but I suspect not actually problematic technically.

However, now a lot of legitimate searches, especially short ones, are going to show a bunch of junk alongside it. Mode will show all models, Human with Humanoid, etc. A naive attempt might even show Chat when you search Hat!

We could split this up into words, such that “ModuleScript” is split into “Module”, “Script”, and we search based off that, but not only am I a little uneasy about adding that kind of burden to the most common searches (just names), but also I’m also not in love with Value showing every single ValueBase, or Part showing every single Part there is. Plus, in order to avoid realistic searches like Human getting random instances, we would have to make it an exact match, which we try not to do in the explorer search, especially not without some form of autocomplete, both to make search as fast to use as possible, and because it makes it more intuitive.

I’m not too happy about the alternatives here either…if you truly just want Scripts, c:Script or is:Script will both work and even provide autocomplete. That is fine, but if you, like me, want every script-like object, then is:LuaSourceContainer is what you want, which is a pretty unfortunate mouthful. Something akin to like:Script was proposed at one point but we didn’t go with it because it isn’t exactly obvious what it’ll do for many other instances, like layouts.

Let me know if you have any questions.