Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Sorting By int ot date field, filter results #2686
I am using dgraph 1.0.9
Prepare the data:
Query for all books, order by title ->
Result - all boos are return:
Query for all books, order by price->
Result - Query without price are filtered!!!
Please also take a read https://discuss.dgraph.io/t/orderasc-desc-by-object-that-is-missing-the-field-data/3389/12
To get around this you should add U$ 0 to the price. The "price" predicate can not be empty. Because empty predicates by logic are not part of the index. So, not sortable for now.