This page explains how to query segments by QA issues with the search API.
Introduction
To get started, simply add a qa node in the query’s languages node:
{
"query": {
"languages": [
{
"locs": ["en"],
"qa": { }
...
An empty node like the above will filter segments that have 1 or more issues in the language.
Filters
The qa node has these options:
|
qa |
When empty then the default filter applies: It will return all segments/texts that have 1 or more active issues. Dismissed issues (like false positives) are not considered active.
|
Optional, object |
|
qa.dismissed |
Optional boolean.
Example
|
Optional, bool? |
|
qa.severity |
Optional list of severity levels to filter.
Example
|
Optional, int[]? |
|
qa.rules |
Optional list of QA rule IDs to filter.
Example
|
Optional, int[]? |
Search results
The search results include on text level (node txt) the QA issue details in child node qa:
...
"txt": {
"val": "Hello world how are you",
"st": 0,
...
"qa": {
"dt": "0001-01-01T00:00:00Z",
"active": false,
"issues": [
{
"s": 2,
"d": "Grammatical error",
"r": 10,
"c": "For your info"
},
{
"s": 1,
"d": "The translation contains double spaces which are not present in the source text",
"r": 20
}
]
}
If there a no issues at all then qa will be null:
...
"txt": {
"val": "Hello world how are you",
"st": 0,
...
"qa": null
The properties of qa are:
|
s |
Severity: 0 = Information, 1 = Warning, 2 = error |
int |
|
d |
Description of issue. |
string |
|
r |
QA rule ID. See above for the different numerical values. |
int |
|
x |
Issue dismissed yes/no. If property is missing then consider dismissed being false. |
int, Optional |
|
c |
Optional comments. If there are no comments then this property will not be output. |
string, Optional |