Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some adjustments of SearchV2 behavior after initial implementation #321

Merged
merged 2 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions object/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,9 @@ 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
// the first requested attribute.
// 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;

// Cursor to continue search. Can be omitted or empty for the new search.
Expand All @@ -565,7 +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).
// 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
11 changes: 7 additions & 4 deletions object/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ enum MatchType {
//
// * $Object:version \
// version
// * $Object:objectID \
// object_id
// * $Object:containerID \
// container_id
// * $Object:ownerID \
// owner_id
// * $Object:creationEpoch \
Expand Down Expand Up @@ -121,6 +117,13 @@ enum MatchType {
// Returns only objects physically stored in the system. This filter is
// activated if the `key` exists, disregarding the value and matcher type.
//
// Following filters are deprecated:
//
// * $Object:objectID \
// object_id
// * $Object:containerID \
// container_id
//
// Note: using filters with a key with prefix `$Object:` and match type
// `NOT_PRESENT `is not recommended since this is not a cross-version approach.
// Behavior when processing this kind of filters is undefined.
Expand Down
15 changes: 9 additions & 6 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. |
| 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). |
| 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 Expand Up @@ -1025,10 +1025,6 @@ prefix to the name. Here is the list of fields available via this prefix:

* $Object:version \
version
* $Object:objectID \
object_id
* $Object:containerID \
container_id
* $Object:ownerID \
owner_id
* $Object:creationEpoch \
Expand Down Expand Up @@ -1064,6 +1060,13 @@ properties:
Returns only objects physically stored in the system. This filter is
activated if the `key` exists, disregarding the value and matcher type.

Following filters are deprecated:

* $Object:objectID \
object_id
* $Object:containerID \
container_id

Note: using filters with a key with prefix `$Object:` and match type
`NOT_PRESENT `is not recommended since this is not a cross-version approach.
Behavior when processing this kind of filters is undefined.
Expand Down