Skip to content

Commit c273a01

Browse files
authored
Merge pull request #321 from nspcc-dev/searchv2/post-impl
2 parents 00bfea0 + b5fdf47 commit c273a01

File tree

3 files changed

+22
-13
lines changed

3 files changed

+22
-13
lines changed

object/service.proto

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,8 +551,9 @@ message SearchV2Request {
551551
uint32 version = 2;
552552

553553
// List of search expressions. Limited to 8. If additional attributes are
554-
// requested (see attributes below) then the search expression MUST use
555-
// the first requested attribute.
554+
// requested (see attributes below) then the first filter's key MUST be
555+
// the first requested attribute. '$Object:containerID' and
556+
// '$Object:objectID' filters are prohibited.
556557
repeated SearchFilter filters = 3;
557558

558559
// Cursor to continue search. Can be omitted or empty for the new search.
@@ -565,7 +566,9 @@ message SearchV2Request {
565566
// List of attribute names (including special ones as defined by
566567
// SearchFilter key) to include into the reply. Limited to 8, these
567568
// attributes also affect result ordering (result is ordered by attributes
568-
// and then by OID).
569+
// and then by OID). If additional attributes are requested, then the first
570+
// filter's key (see filters above) MUST be the first requested attribute.
571+
// '$Object:containerID' and '$Object:objectID' attributes are prohibited.
569572
repeated string attributes = 6;
570573
}
571574
// Body of search object request message.

object/types.proto

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ enum MatchType {
8282
//
8383
// * $Object:version \
8484
// version
85-
// * $Object:objectID \
86-
// object_id
87-
// * $Object:containerID \
88-
// container_id
8985
// * $Object:ownerID \
9086
// owner_id
9187
// * $Object:creationEpoch \
@@ -121,6 +117,13 @@ enum MatchType {
121117
// Returns only objects physically stored in the system. This filter is
122118
// activated if the `key` exists, disregarding the value and matcher type.
123119
//
120+
// Following filters are deprecated:
121+
//
122+
// * $Object:objectID \
123+
// object_id
124+
// * $Object:containerID \
125+
// container_id
126+
//
124127
// Note: using filters with a key with prefix `$Object:` and match type
125128
// `NOT_PRESENT `is not recommended since this is not a cross-version approach.
126129
// Behavior when processing this kind of filters is undefined.

proto-docs/object.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -834,10 +834,10 @@ Object Search request body
834834
| ----- | ---- | ----- | ----------- |
835835
| container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Container where the search is being performed. |
836836
| version | [uint32](#uint32) | | Version of the Query Language used. |
837-
| 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. |
837+
| 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. |
838838
| cursor | [string](#string) | | Cursor to continue search. Can be omitted or empty for the new search. |
839839
| count | [uint32](#uint32) | | Limits the number of responses to the specified number. Can't be more than 1000. |
840-
| 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). |
840+
| 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. |
841841

842842

843843
<a name="neo.fs.v2.object.SearchV2Response"></a>
@@ -1025,10 +1025,6 @@ prefix to the name. Here is the list of fields available via this prefix:
10251025

10261026
* $Object:version \
10271027
version
1028-
* $Object:objectID \
1029-
object_id
1030-
* $Object:containerID \
1031-
container_id
10321028
* $Object:ownerID \
10331029
owner_id
10341030
* $Object:creationEpoch \
@@ -1064,6 +1060,13 @@ properties:
10641060
Returns only objects physically stored in the system. This filter is
10651061
activated if the `key` exists, disregarding the value and matcher type.
10661062

1063+
Following filters are deprecated:
1064+
1065+
* $Object:objectID \
1066+
object_id
1067+
* $Object:containerID \
1068+
container_id
1069+
10671070
Note: using filters with a key with prefix `$Object:` and match type
10681071
`NOT_PRESENT `is not recommended since this is not a cross-version approach.
10691072
Behavior when processing this kind of filters is undefined.

0 commit comments

Comments
 (0)