Skip to content

Commit a5a1f32

Browse files
authored
Merge pull request #330 from nspcc-dev/searchv2/local
2 parents 875e52f + e589c58 commit a5a1f32

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

object/service.proto

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,8 @@ message SearchV2Request {
568568
// and then by OID). If additional attributes are requested, then the first
569569
// filter's key (see filters above) MUST be the first requested attribute.
570570
// '$Object:containerID' and '$Object:objectID' attributes are prohibited.
571+
// If meta_header.ttl = 1 and the first filter is not STRING_EQUAL,
572+
// values of the first filtered attribute are requested automatically.
571573
repeated string attributes = 6;
572574
}
573575
// Body of search object request message.
@@ -590,7 +592,9 @@ message SearchV2Response {
590592
// Object ID that matches search criteria.
591593
neo.fs.v2.refs.ObjectID id = 1;
592594
// List of attribute data from the respective object, fields
593-
// strictly follow requested ones.
595+
// strictly follow requested ones. The only exception are attribute-less
596+
// requests with TTL = 1 and the first non-STRING_EQUAL filter: this field
597+
// carry value of the first filtered attribute.
594598
repeated string attributes = 2;
595599
}
596600

proto-docs/object.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ Object Search request body
837837
| 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. Numeric filters' values MUST be in range [-MaxUint256, MaxUint256]. |
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 the 1st one 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. |
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 the 1st one 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. If meta_header.ttl = 1 and the first filter is not STRING_EQUAL, values of the first filtered attribute are requested automatically. |
841841

842842

843843
<a name="neo.fs.v2.object.SearchV2Response"></a>
@@ -874,7 +874,7 @@ OID with additional requested metadata.
874874
| Field | Type | Label | Description |
875875
| ----- | ---- | ----- | ----------- |
876876
| id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | Object ID that matches search criteria. |
877-
| attributes | [string](#string) | repeated | List of attribute data from the respective object, fields strictly follow requested ones. |
877+
| attributes | [string](#string) | repeated | List of attribute data from the respective object, fields strictly follow requested ones. The only exception are attribute-less requests with TTL = 1 and the first non-STRING_EQUAL filter: this field carry value of the first filtered attribute. |
878878

879879
<!-- end messages -->
880880

0 commit comments

Comments
 (0)