Queries
When you’re in the Explore tab, you will see a query search bar above your items. This bar takes JSON queries that will allow you to search for items in your project that match any given criteria. Here are some example queries you can try out:
Function | Query |
---|---|
To search for items that have the In Progress status and are have Smart Prediction applied. | metadata(isPredicted = true AND status = InProgress ) |
To search for items that have instances that are polygons and are assigned to the classes car or pedestrian . | instance(type = polygon AND className IN [Car, Pedestrian]) |
To search for items that have unresolved comments. | comment(resolved = false) |
To search for items that contain Bounding Boxes. | instance(type = bbox) |
To search for items that contain instances with the class Car . | instance(className = Car) |
To search for items that have the Completed status and are located in Folder1 . | metadata(status = Completed) AND folder = Folder1 |
To search for items that contain more than 3 instances with the class Car and the attribute Black . | instanceCount(className = Car AND attributes.name = Black) > 3 |
To search for pinned items. | metadata(pinned = true) |
Operators
You will need to use operators to define your queries and values.
Operator | Description |
---|---|
= | Equal. |
!= | Not equal. |
> | Greater than. |
< | Less than. |
>= | Greater than or equal to. |
<= | Less than or equal to. |
() | Query parentheses. |
[] | Array. |
AND | Returns True if both statements are true. |
OR | Returns True if either statement is true. |
IN | Set of values to consider. |
NOT IN | Set of values to not consider. |
CONTAINS | Used to search for a substring and returns the results containing that substring. |
When the attribute has a numeric type, the following operators will be supported for
attributes.name
: > < =< !=
Instance
These parameters can be found under the instance
field.
Parameter | Value | Text | Image | Video |
---|---|---|---|---|
type | bbox , polygon , polyline , point , ellipse , cuboid , rbbox , tag and relationship . | ![]() | ![]() | ![]() |
className | The value is a class's name. | ![]() | ![]() | ![]() |
probability | Numeric value. | ![]() | ![]() | ![]() |
attribute.name | The value is an attribute's name. | ![]() | ![]() | ![]() |
attribute.groupName | The value is an attribute group's name. | ![]() | ![]() | ![]() |
error | true , false or null . | ![]() | ![]() | ![]() |
createdBy.email | The value is an email address. | ![]() | ![]() | ![]() |
createdBy.role | Annotator , QA or Admin . | ![]() | ![]() | ![]() |
creationType | Manual , Preannotation or Prediction . | ![]() | ![]() | ![]() |
updatedBy.email | The value is an email address. | ![]() | ![]() | ![]() |
updatedBy.role | Annotator , QA or Admin . | ![]() | ![]() | ![]() |
createdAt | The value is a date with this format YYYY-MM-DD. | ![]() | ![]() | ![]() |
updatedAt | The value is a date with this format YYYY-MM-DD. | ![]() | ![]() | ![]() |
measure.bbox | area , width and height . |
About class names
If the class name contains an operator (and, or, in, not in, contains), the query will handle them as operators, not as words in class names. For example, if the class name is
Cars and pedestrians
, the query will handle the wordcars
and the wordpedestrians
separately. Instead, you can use symbols, such as underscores, to separate the words. SoCars and pedestrians
would be changed tocars_and_pedestrians
.
Metadata
These parameters can be found under the metadata
field.
Parameter | Value | Text | Image | Video |
---|---|---|---|---|
status | NotStarted , InProgress , QualityCheck , Returned , Completed , and Skipped . | ![]() | ![]() | ![]() |
approvalStatus | true , false and null . | ![]() | ![]() | ![]() |
lastAction.email | The value is an email address. | ![]() | ![]() | ![]() |
lastAction.timestamp | The value is a date with this format YYYY-MM-DD. | ![]() | ![]() | ![]() |
width | Numeric value. | ![]() | ![]() | ![]() |
height | Numeric value. | ![]() | ![]() | ![]() |
name | The value is the item's name. | ![]() | ![]() | ![]() |
isPredicted | true and false . | ![]() | ![]() | ![]() |
annotatorEmail | The value is an email address. | ![]() | ![]() | ![]() |
qaEmail | The value is an email address. | ![]() | ![]() | ![]() |
pinned | true and false . | ![]() | ![]() | ![]() |
priority | Numeric value. | ![]() | ![]() | ![]() |
Other fields
Field | Parameter | Value | Text | Image | Video |
---|---|---|---|---|---|
comment | resolved | true and false . | ![]() | ![]() | ![]() |
commentCount | - | Numeric value. | ![]() | ![]() | ![]() |
tag | - | tag [operator] [tag name] | ![]() | ![]() | ![]() |
folderName | - | The value is the folder's name. | ![]() | ![]() | ![]() |
folderStatus | - | The value is the folder's status. | ![]() | ![]() | ![]() |
freeText | - | freeText [operator] text | ![]() | ![]() | ![]() |
random | - | Numeric value. | ![]() | ![]() | ![]() |
customMetadata | - | Depending on the field type. Please check this page for more information. | ![]() | ![]() | ![]() |
Generate query
First, make sure that your dataset is synced. You can do so by pressing the Sync data button.
To generate a query:
- In the Explore tab, click the query input bar.
- Choose the suggested fields and operators or type the query yourself.
- To run the query, press
Enter
on the keyboard.
Save query
To save a query:
- Type a query in the query bar.
- Click on the star on the right side of the query bar.
- In the popup, type a query name.
- Click Save.
The maximum number of characters for a query is 60.
You can save up to 50 queries.
Rename query
To rename a query:
- Click on the star in the query bar.
- Click the three dots
⋮
next to the query you want to rename. - Select Rename.
- Type a new query name.
- Click Rename.
Delete query
To delete a query:
- Click on the star in the query bar.
- Click the three dots
⋮
next to the query you want to delete. - Select Delete.
Updated 16 days ago