master
Yes
Just populate cluster with this data
虓https://github.com/dgraph-io/dgraph/blob/master/query/common_test.go#L269
and run the this query
{
q(func:has(name), orderdesc: name, first:5) {
name
}
}
actual result
{
"data": {
"q": [
{
"name": ""
},
{
"name": ""
},
{
"name": "Badger"
},
{
"name": "name"
},
{
"name": "expand"
}
]
},
"extensions": {
"server_latency": {
"parsing_ns": 14640,
"processing_ns": 375499571,
"encoding_ns": 28760,
"assign_timestamp_ns": 503321
},
"txn": {
"start_ts": 98
}
}
}
Expected everything to be sorted
Hi!
I have a similar behaviour at Dgraph 1.1.0. I have data that contains values for name@de and name@ru predicates.
If I try to order these name string predicates with a language tag (orderasc:name@ru) I get different results from each time (its not determined behaviour). Sometimes its sorted correctly, by "ru", and sometimes not! If its not correctly sorted, it's sorted by name@de.
Check it out with following data and queries. Simply query, and the results differ from time to time.
The name and category_type predicates are indexed in schema.
Sample data:
{
set {
_:1 <name@de> "Hello World" .
_:1 <name@ru> "袩褉懈胁械褌!" .
_:1 <category_type> "Test" .
_:2 <name@de> "ZZZ A little test" .
_:2 <name@ru> "袗胁懈褟泻芯屑锌邪薪懈褟" .
_:2 <category_type> "Test" .
_:3 <name@de> "Xylophon" .
_:3 <name@ru> "袣薪懈谐邪" .
_:3 <category_type> "Test" .
}
}
My query:
{
q(func:eq(category_type, "Test"),orderasc:name@ru) {
name@ru
name@de
}
}
Are there any updates to this issue? It's for me a critical point in my production system and I would continue to use Dgraph.
There are two PRs related to this issue. One is merged and other one is under review. I have linked both of them to this issue.
There are two PRs related to this issue. One is merged and other one is under review. I have linked both of them to this issue.
Thanks for the linked PR's!