individual node can't sort objects, it doesn't know the criteria
even if it's to know the criteria we can't merge results from different nodes
Describe the solution you'd like
We can extend search result with attributes if they're requested. It can be different from "ORDER BY", something like "WITH FIELD", but the result would be []{oid, []attributeValue} (ordered by requested attributes) instead of []oid. Then the request originator can do anything it wants with these fields including ordering or choosing the most appropriate version of an object (REST).
Is your feature request related to a problem? Please describe.
I'm always frustrated when we can't have something like
ORDER BY
in our searches. It'd simplify https://github.com/nspcc-dev/neo-go/issues/3496 greatly, but:Describe the solution you'd like
We can extend search result with attributes if they're requested. It can be different from "ORDER BY", something like "WITH FIELD", but the result would be
[]{oid, []attributeValue}
(ordered by requested attributes) instead of[]oid
. Then the request originator can do anything it wants with these fields including ordering or choosing the most appropriate version of an object (REST).Describe alternatives you've considered
Dunno. Currently it's just an idea.