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 | - resolved - text | - true and false .- Value is a manual input after an operator is selected. |
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 | - Value is a manual input after an operator is selected. - Queries for this component are case-insensitive when used with the CONTAINS operator. |
inputLength | Numeric value. |
inputLength.ID | The value is the input length’s ID. |
textarea | - Value is a manual input after an operator is selected. - Queries for this component are case-insensitive when used with the CONTAINS operator. |
textareaLength | Numeric value. |
number | Value is a manual input after an operator is selected. |
slider | - Value is a manual input after an operator is selected. - If the slider is a Range slider , then the > and => operators will consider the higher value, and the < and <= operators will consider the lower value. In this case, the = , != IN , and NOT IN operators can't be used. |
radio | - All radio options will be auto-suggested after entering this parameter. - If you include a component’s ID in the query, only options belonging to that ID will be shown. - Value can either be a selected option, or a manual input. |
checkbox | - All checkbox options will be auto-suggested after entering this parameter. - If you include a component’s ID in the query, only options belonging to that ID will be shown. - Value can either be a selected option, or a manual input. |
rating | Value is a manual input after an operator is selected. |
voting | true , false , and null . |
select | - All select options will be auto-suggested after entering this parameter. - If you include a component’s ID in the query, only options belonging to that ID will be shown. - Value can either be a selected option, or a manual input. |
datetime | The value is a date with this format YYYY-MM-DD . |
code | - Value is a manual input. - Queries for this component are case-insensitive when used with the CONTAINS operator. |
codeLength | Numeric value. |
paragraph | - Value is a manual input after an operator is selected. - Queries for this component are case-insensitive when used with the CONTAINS operator. |
paragraphLength | Numeric value. |
markdown | - Value is a manual input after an operator is selected. - Queries for this component are case-insensitive when used with the CONTAINS operator. |
markdownLength | Numeric value. |
csv | - Value is a manual input. - Queries for this component are case-insensitive when used with the CONTAINS operator.- When querying with the = or != operators, you must use the exact expression that’s used in the JSON file. For example: “cell1_text,cell2_text,,\r\n,,,\r\n,,,\r\n,,,” |
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'. | rating >= 3 AND voting = true |
To search for items that have a rating of 3 stars or higher and whose completion is voted true. In this case, the rating component's ID is prompt , and the voting component's ID is completion . | rating.prompt >= 3 AND voting.completion = true |
To search for items that are marked 'Complete' for model 1 and 'Incomplete' for model 2. In this case, there are two radio components with the model1 and model2 IDs. | radio.model1 = Complete AND radio.model2 = Incomplete |
To search for items whose completion contains the word 'software' and correction contains SaaS .In this case, there are two textarea components with the completion and correction IDs. | textarea.completion CONTAINS software AND textarea.correction CONTAINS SaaS |
To search for items that have a slider value of less than 10. | slider < 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 groupsWhen 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 exampleSay 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 2 months ago