In the following example, the result set changes depending on whether the predicate is indexed or not:
<isAssetFolder>: string @index(exact) .
Query:
{
getAssets(func: eq(xid, "ee6a27c5-0232-4ff3-aa5d-1ddd75adc14e")) {
uid
assets: parent_of (orderasc: isAssetFolder, orderasc: name)
{
name
isAsset
isAssetFolder
}
}
}
Result with index on isAssetFolder:
"data": {
"getAssets": [
{
"uid": "0x492e1b"
}
]
}
Result after dropping the index on isAssetFolder:
"data": {
"getAssets": [
{
"uid": "0x492e1b",
"assets": [
{
"name": "A+A15_JV5067jpg",
"isAsset": "",
"uid": "0x43fe08"
},
{
"name": "A+A15_JV4981jpg",
"isAsset": "",
"uid": "0x4a6653"
},
{
"name": "A+A15_JV5491jpg",
"isAsset": "",
"uid": "0x4f214b"
}
]
}
]
}
The latter result was the expected. But why does an indexed field lead to the suppression of the other results when sorting?