Search cheat sheet
A search query is an expression made up of a number of selectors. When searching, selectors are matched against each API entity, producing a list of results.
Search results will be filtered by the current visibility settings.
Details of the syntax are currently subject to change.
Crossed out selectors are not yet implemented.
Name selectors
The name selectors are the most simple, comparing against the names of entities.
foo~foo~Selects entities whose name matches foo. Selection is case-insensitive, and based on a fuzzy matching algorithm.
'foo'Selects entities whose name contains the case-sensitive sub-string foo.
"foo"Selects entities whose name is exactly equal to foo.
/foo/Selects entities whose name matches the regular expression /foo/.
*Selects anything.
The name selectors are implemented as string components that match against entity names.
Compound selector
The compound selector divides entity kinds into two categories. Primary entities include classes, enums, and types. Secondary entities include properties, functions, events, callbacks, and enum items.
foo.barSelects only secondary entities whose primary name matches foo and secondary name matches bar.
foo.Selects only primary entities whose name matches foo.
.barSelects only secondary entities whose name matches bar.
Each component is a string component. That is, an expression like
"foo"./bar/ is valid.
Expressions
Multiple selectors can be combined to form complete logical expressions, with AND, OR, and NOT operators.
foo barfoo && barSelects entities matching selector foo and bar. That is, whitespace (and only whitespace) between two selectors is interpreted as an AND operator. For clarity, the
&&operator can be used instead.foo, barfoo || barSelects entities matching selector foo or bar. Either
,or||can be used to indicate an OR operator.!fooSelects entities that do not match selector foo.
(foo, bar) (!fizz, buzz)Parentheses can be used to logically group selectors together.
Precedence
Logical operators have the following precedence:
- NOT
- AND
- OR
Field selectors
Field selectors match against particular fields of an entity. They have the form
field:value. The field part is case-insensitive. The value part depends on
the field, but will usually be a string, number, or
bool component.
Kind
The is: selector can be used to narrow down a search to certain entity kinds.
Kinds are case-insensitive.
is:classSelects only class entities.
is:propertySelects only property entities.
is:functionSelects only function entities.
is:eventSelects only event entities.
is:callbackSelects only callback entities.
is:enumSelects only enum entities.
is:enumitemSelects only enum item entities.
is:typeSelects only data types.
is:primarySelects only class, enum, and type entities.
is:secondarySelects only property, function, event, callback, and enum item entities.
is:memberSelects only property, function, event, and callback entities.
Fields
tag:fooSelects entities that have tag foo. The tag is case-insensitive, but must otherwise match exactly.
removed:yesSelects entities that are not present in the current revision of the API (bool).
superclasses:NSelects class entities where the number of superclasses matches N (number).
subclasses:NSelects class entities where the number of subclasses matches N (number).
members:NSelects class entities where the number of members matches N (number).
superclass:fooSelects class entities with a superclass whose name matches foo (string).
ancestor:NSelects class entities that match the Nth (number) superclass, starting at 0 from the parent superclass. For example,
superclass:GuiObject ancestor:0will only match classes where the parent superclass is “GuiObject”.subclass:fooSelects class entities with a subclass whose name matches foo (string).
memcat:fooSelects class entities where the memory category matches foo (string).
threadsafety:fooSelects member entities where the thread safety matches foo (string).
security:fooSelects function, event, and callback entities where the security matches foo, or property entities where the read or write security matches foo (string).
cansave:yesSelects property entities that can be serialized (bool).
canload:yesMatches property entities that can be deserialized (bool).
readsecurity:fooSelects property entities where the read security matches foo (string).
writesecurity:fooSelects property entities where the write security matches foo (string).
valuetypecat:fooSelects property entities where the category of the value type matches foo (string).
valuetypename:fooSelects property entities where the name of the value type matches foo (string).
category:fooSelects property entities where the category matches foo (string).
default:fooSelects property entities where the default value matches foo (number or string).
returns:NSelects function and callback entities where the number of return values matches N (number).
parameters:NSelects function, event, and callback entities where the number of parameters matches N (number).
returntypecat:fooSelects function and callback entities where the category of a return type matches foo (string).
returntypename:fooSelects function and callback entities where the name of a return type matches foo (string).
returntypeopt:yesSelects function and callback entities where a return type is optional (bool).
paramtypecat:fooSelects function, event, and callback entities where the category of a parameter type matches foo (string).
paramtypename:fooSelects function, event, and callback entities where the name of a parameter type matches foo (string).
paramtypeopt:yesSelects function, event, and callback entities where a parameter is optional. (bool).
paramname:fooSelects function, event, and callback entities where the name of a parameter matches foo (string).
paramdefault:fooSelects property entities where the default value of a parameter matches foo (number or string).
enumitems:NSelects enum entities where the number of enum items matches N (number).
itemvalue:NSelects enum item entities where the item value matches N (number).
legacynames:NSelects enum item entities where the number of legacy names matches N (number).
legacyname:fooSelects enum item entities where a legacy name matches foo (string).
typecat:fooSelects type entities where the category matches foo (string).
primary:fooSelects entities where the primary name matches foo (string).
secondary:fooSelects secondary entities where the secondary name matches foo (string).
List selector
List selectors cause the values of entity fields to be selected instead of the entities themselves.
List selectors are excluded from the logic of the expression. They do not determine whether entities match or do not match, but instead alter how the search results are displayed.
foo:Lists aggregated values corresponding to field foo for entities matching the rest of the query. That is, while the field selector
foo:valuewill select entities where field foo matches value, the list selectorfoo:will select all possible values of field foo.*:Lists all possible fields for entities matching the rest of the query. Each result can be used as the field part of a field selector. That is, if
*:returnsfoo, thenfoo:will return all values of field foo, andfoo:valuewill match specific values.
The score of each value result is the sum of scores of the aggregated entity results for that value.
If the remaining query is empty (that is, the entire query is just list selectors), then all entities are selected.
Result selectors
Result selectors are used to control search results. They have the form
/name:value. The entire selector is case-insensitive.
Result selectors are excluded from the logic of the expression. They do not determine whether entities match or do not match, but instead alter how the search results are displayed.
/limit:NSets the maximum number of results that will be displayed to N, which must be a positive integer. Defaults to 50.
/sort:field: Sorts search results according to value field. Values are case-insensitive. Defaults to
/sort:score. The following values are valid:score: Sort by score. Defaults to descending.name: Sort by entity name. Defaults to ascending.random: Shuffle the results randomly.
/sort:field<Force field to sort ascending.
/sort:field>Force field to sort descending.
/go:locationIf included, when the search is submitted (when the enter key is pressed) the page will redirect to the page at location corresponding to the first search result. Locations are case-insensitive. The following locations are valid:
here: Redirects to the page on this website (default).docs: Redirects to the corresponding Creator Hub documentation page.git: Redirects to the corresponding file in the creator-docs Git repository.
Components
These are not selectors themselves, but form components of more specific selectors.
String
Compares against string-like values.
text~text~Matches text against strings using a fuzzy-matching algorithm. Case-insensitive.
'text'Matches strings that contain text as a sub-string. Case-sensitive.
"text"Matches strings that are exactly equal to text. Case-sensitive.
/text/Matches strings that match the regular expression /text/. The syntax is expected match a JavaScript RegExp literal. The only difference is that every
/character embedded within the regular expression must be escaped with a\character. That is, while the expression/[^/]/may be valid in JavaScript, as a selector, it must be escaped as/[^\/]/. Thei,m,s,u, andvflags are allowed.
Also includes the anything component.
The sub-string and exact-string selectors use \ for escaping certain
characters. The following escape sequences are transformed:
\\: Single escape character.\': Sub-string delimiter.\": Exact-string delimiter.\t: Tab character.\n: Newline character.\r: Carriage return character.\␊: A literal newline is tranformed into no character.\xXX: Escapes a byte with the hex code XX.\uXXXX: Escapes a unicode character code U+XXXX.\UXXXXXXXX: Escapes a unicode code point U+XXXXXXXX. Only codes under 0x110000 are valid.
Other instances of \ are interpreted as-is.
Number
Compares against numeric values.
NMatches numbers that are equal to N.
<NMatches numbers that are less than N.
<=NMatches numbers that are less than or equal to N.
>NMatches numbers that are greater than N.
>=NMatches numbers that are greater than or equal to N.
N..MMatches numbers that are greater than or equal to N and less than or equal to M.
Also includes the anything component.
Bool
Compares against boolean values.
0nofalseMatches values that are false.
1yestrueMatches values that are true.
Also includes the anything component.
Anything
Whitespace
Whitespace between selectors can contain any unicode space characters, including newlines. Whitespace may also contain comments:
#{comment}#Indicates an arbitrary block-comment. Is considered whitespace.