Skip to content

Commit

Permalink
object: Require 1st filter and attribute equality in SearchV2
Browse files Browse the repository at this point in the history
Without this, it makes almost impossible to make proper inter-node
merge-sort and continuation. Since not all matchers allow understanding
the primary attribute's value, compliance with the presented requirement
is in demand.

Refs #306.

Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
cthulhu-rider committed Feb 18, 2025
1 parent 819d651 commit b5fdf47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions object/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ message SearchV2Request {
uint32 version = 2;

// List of search expressions. Limited to 8. If additional attributes are
// requested (see attributes below) then the search expression MUST use
// requested (see attributes below) then the first filter's key MUST be
// the first requested attribute. '$Object:containerID' and
// '$Object:objectID' filters are prohibited.
repeated SearchFilter filters = 3;
Expand All @@ -566,8 +566,9 @@ message SearchV2Request {
// List of attribute names (including special ones as defined by
// SearchFilter key) to include into the reply. Limited to 8, these
// attributes also affect result ordering (result is ordered by attributes
// and then by OID). '$Object:containerID' and '$Object:objectID'
// attributes are prohibited.
// and then by OID). If additional attributes are requested, then the first
// filter's key (see filters above) MUST be the first requested attribute.
// '$Object:containerID' and '$Object:objectID' attributes are prohibited.
repeated string attributes = 6;
}
// Body of search object request message.
Expand Down
4 changes: 2 additions & 2 deletions proto-docs/object.md
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,10 @@ Object Search request body
| ----- | ---- | ----- | ----------- |
| container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Container where the search is being performed. |
| version | [uint32](#uint32) | | Version of the Query Language used. |
| filters | [SearchFilter](#neo.fs.v2.object.SearchFilter) | repeated | List of search expressions. Limited to 8. If additional attributes are requested (see attributes below) then the search expression MUST use the first requested attribute. '$Object:containerID' and '$Object:objectID' filters are prohibited. |
| filters | [SearchFilter](#neo.fs.v2.object.SearchFilter) | repeated | List of search expressions. Limited to 8. If additional attributes are requested (see attributes below) then the first filter's key MUST be the first requested attribute. '$Object:containerID' and '$Object:objectID' filters are prohibited. |
| cursor | [string](#string) | | Cursor to continue search. Can be omitted or empty for the new search. |
| count | [uint32](#uint32) | | Limits the number of responses to the specified number. Can't be more than 1000. |
| attributes | [string](#string) | repeated | List of attribute names (including special ones as defined by SearchFilter key) to include into the reply. Limited to 8, these attributes also affect result ordering (result is ordered by attributes and then by OID). '$Object:containerID' and '$Object:objectID' attributes are prohibited. |
| attributes | [string](#string) | repeated | List of attribute names (including special ones as defined by SearchFilter key) to include into the reply. Limited to 8, these attributes also affect result ordering (result is ordered by attributes and then by OID). If additional attributes are requested, then the first filter key (see filters above) MUST be the first requested attribute. '$Object:containerID' and '$Object:objectID' attributes are prohibited. |


<a name="neo.fs.v2.object.SearchV2Response"></a>
Expand Down

0 comments on commit b5fdf47

Please sign in to comment.