Multimodal Queries
When you’re in the Explore tab, you'll see a query search bar above your items. This bar takes JSON queries that'll allow you to search for items in your project that match any given criteria. The query language and examples on this page are unique to the Multimodal project type.
Metadata
These parameters can be found under the metadata
field.
Parameter | Value |
---|---|
name | The value is the item's name. |
status | NotStarted , InProgress , QualityCheck , Returned , Completed , and Skipped . |
approvalStatus | true , false , and null . |
annotatorEmail | The value is an email address. Use null for unassigned items. |
qaEmail | The value is an email address. Use null for unassigned items. |
lastAction.email | The value is an email address. |
lastAction.timestamp | The value is a date with this format YYYY-MM-DD . |
priority | Numeric value. |
category | The value is the category name. |
Other fields
Field | Parameter | Value |
---|---|---|
comment |
|
|
commentCount | Numeric value. | |
folderName | The value is the folder's name. | |
folderStatus | The value is the folder's status. | |
subsetName | The value is the subset’s name. | |
random | Numeric value. |
Component fields
Parameter | Value |
---|---|
input |
|
inputLength | Numeric value. |
inputLength.ID | The value is the input length’s ID. |
textarea |
|
textareaLength | Numeric value. |
number | Value is a manual input after an operator is selected. |
slider |
|
radio |
|
checkbox |
|
rating | Value is a manual input after an operator is selected. |
voting |
|
select |
|
datetime | The value is a date with this format |
code |
|
codeLength | Numeric value. |
paragraph |
|
paragraphLength | Numeric value. |
markdown |
|
markdownLength | Numeric value. |
csv |
|
If you want to query components that don’t have a value entered or selected, you can use the value of none
.
Here are some example queries that you can try:
Example | Query |
---|---|
To search for items that have a rating of 3 stars or higher and are voted 'Approved'. |
|
To search for items that have a rating of 3 stars or higher and whose completion is voted true. |
|
To search for items that are marked 'Complete' for model 1 and 'Incomplete' for model 2. |
|
To search for items whose completion contains the word 'software' and correction contains |
|
To search for items that have a slider value of less than 10. |
|
Group field
The Group
field filters all Group components used in the project by their unique IDs or any component types that exist within a group in the project. The query can also contain additional, more particular conditions to narrow down your search.
group.GROUP_ID.(CHILD_COMPONENT_TYPE.CHILD_COMPONENT_ID)
### Querying groups
When querying groups, you can specify a group component by its ID, and the types and IDs of its child components. For instance, say you have a group with the ID
firstGroup
, and within that group you have a Text Input component with the IDAnswerInput
. Let's assume you want to find the components that contain the wordRed
. Your query should look something like this:
group.firstGroup(input.AnswerInput CONTAINS Red)
You may use the
AND
operator to include multiple parameters at a time. For example, you have a Checkbox component you want to include, with theCheckboxResponse
ID. In this case, you're looking for a group component that has both a Text Input component whose value contains the wordRed
, and a Checkbox component whose value equals toOption 1
. Your query should look something like this:
group.firstGroup(input.AnswerInput CONTAINS Red AND checkbox.CheckboxResponse = Option 1)
To search for a group that contains either of these components, you can use the
OR
operator instead.
groupCount
To query your items by the number of group repetitions, you can use the groupCount
query.
To search for items where the group is repeated over 3 times (in this case, the group component ID is Answer
): groupCount.Answer > 3
To search for items where groups with a rating of 5 are repeated more than 3 times (in this case, the group component ID is Answer
and it has a rating component within it): groupCount.Answer(rating=5) > 3
Sort by query
With the use of the query bar, you can manually specify the data you want to order your item by. You can do so by using orderBy
. After typing it in the bar, you must then select one of the following parameters to specify the ordering.
Entity | Description |
---|---|
metadata.name | To order your items by name. |
metadata.status | To order your items by status. |
metadata.lastAction.date | To order your items by the date of the last action taken on an item. |
metadata.priority | To order your items by priority score. |
You can read about the functionality of the orderBy
query for other project types here.
### Query example
Say you want to sort the items that haven't been worked on by name, in ascending order. You can use the following query:
metadata(status = NotStarted) orderBy metadata.name ASC
Another example is to sort the items that have been marked for Quality Check based on the date of the last action taken, in descending order:
metadata(status = QualityCheck) orderBy metadata.lastAction.date DESC
You can't use orderBy as a sole query
Please note that you can't use the
orderBy
query on its own (e.g.orderBy metadata.status ASC
). Think of it as a secondary attachment to the overall query; it must follow a general query, such asmetadata
orcommentCount
, so that you can add an additional parameter to sort your items with.
Updated about 16 hours ago