nspcc-dev / neofs-api

NeoFS API documentation and proto files declaration
Apache License 2.0
11 stars 15 forks source link

Extended search with attributes returned #306

Open roman-khimov opened 2 months ago

roman-khimov commented 2 months ago

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.

roman-khimov commented 2 months ago

By "FIELD" I mean attribute key, of course.