Server-issued aggregationFilterToken on buckets, consumed verbatim via searchRequest.aggregationFilters. The graph layer decodes a filter into its buckets (a term, a range, or an or(...) of them), the proto carries them as AggregationFilter, and the engines match them natively: a key as the exact value of the field, a range from-inclusive and to-exclusive, so a drilldown returns exactly the matches the bucket counted. Filters are validated like aggregations, in both layers. Range tokens use the MS Graph spelling (range(min, 1980), range(2010, max, to="le")). AGG-22 to AGG-33, 36, 38 and 45 in the parity suite.
Sub-aggregations on both engines: bleve folds child buckets below their parent through the same collector, OpenSearch nests them natively, so a request stays one search per space. The proto gains sub_aggregations on the option and on the bucket; merge, finalize, validation and the bucket limit walk every level, results are positional at every level, a metric has no buckets to nest in. AGG-10 to AGG-15, 20, 35, 40 and 44 in the parity suite, AGG-14 as a known OpenSearch divergence.
sum/min/max/avg over a numeric field: bleve folds the accumulators from doc values, OpenSearch reads them from a stats aggregation, the service layer reduces them to the value of the kind after the cross-space merge. The proto gains MetricDefinition, MetricKind and Metric, which travels as accumulators (sum, count, min, max) so the merge works whatever the kind; value is set after the merge and absent for a metric without a single value. A metric is only valid on a numeric field, and only one of bucketDefinition and metricDefinition at a time. AGG-06, 18 and 21 in the parity suite.
Numeric and date ranges on both engines: bleve folds them from doc values, OpenSearch uses range and date_range aggregations. The proto gains BucketRange and bucketDefinition.ranges, the aggregation package the range parser (bounds are numbers or RFC3339 dates, one kind per aggregation, anything else is rejected), the kind of an option and the validation of ranges against the field type. Every requested range is answered in request order, an empty one with a count of zero, with no space answering too; size does not cut ranges, keyAsNumber sorts them by their lower bound. Range keys read from..to. AGG-04, 05 and 07 to 09 in the parity suite.
Term buckets on both engines: bleve folds them from doc values (its facets read numbers as prefix-coded terms), OpenSearch uses terms aggregations. A request gets every bucket, up to 65535 per space (the OpenSearch default for search.max_buckets, held on bleve as well); beyond that it is refused. The proto gains AggregationOption, BucketDefinition (sort, minimum count), AggregationResult and Bucket. The new aggregation package merges the per-space results by position, so several aggregations on one field stay apart, and shapes them per BucketDefinition (minimum count, sort, size). It also validates aggregations against the index mapping (a field the index knows and a client may name, of a type whose values are buckets; the mapping overrides mark the internal fields): the search service relies on it, the graph endpoint asks it first to save the round trip, next to its own checks against the spec, and with the field names of the request so an error reads like the request. A request names a field like the driveItem property, exactly so. A number is keyed as it is, a bool as true or false on both engines, an empty value is no bucket. Pinned in the parity suite as AGG-01 to 03, 17, 34, 37 and 39; the paging rows AGG-41 to 43 pin the first commit through the same matrix machinery, which also shortens long answer lists in the README.
convert.copyFacet rebuilt every facet by hand on the way into the index; mapping.ToProto is the generic counterpart of the FromProto the graph endpoint uses, so both directions share one bridge.
MS Graph style search endpoint: searchRequest with KQL queryString, from/size pagination (values outside the spec's bounds are rejected), entityTypes validated to driveItem, hits as driveItems with webUrl, parentReference, remoteItem for shares, the facets and @libre.graph.permissions.actions.allowedValues, which the search service now projects onto the Entity from the same permission set as the WebDAV report. Properties the endpoint does not evaluate yet (aggregations, aggregationFilters, sortProperties) answer 501 instead of being ignored, an unknown $expand answers 400, and a failing search service keeps its status. Hits reuse what the drive item listing has, which moves a little: the thumbnails helper is named for the drive item it fills (setDriveItemThumbnailsByID, it served shares only), the web URL of an id gets a helper (webURLForID), and the facets come out of the proto through one generic mapping.FromProto instead of a copy per facet.
The search service takes a `from` offset next to the page size and applies it after the cross-space merge; every space answers the full prefix up to from+size, since an offset cannot be distributed. Pages are stable: both engines and the merge break score ties by id, and OpenSearch counts every match (track_total_hits). No engine pages beyond the first 10000 matches, the OpenSearch result window, so a from and size reaching beyond it are rejected on both engines. `page_size` becomes optional on the wire: absent is the default of 200, 0 asks for no matches, -1 for all; WebDAV and the tags listing set it accordingly, and the WebDAV report's `<oc:offset>`, parsed since the report exists and never read, now pages the merged list. The gRPC wrapper passes the request through and keys its cache by the whole request.
The byte-based truncation cut through the two-byte UTF-8 sequence of
Motörhead's ö, committing invalid UTF-8 into the parity README. Shared
rune-based ellipsize helper; matrix regenerated.
First tagged release carrying the merged search spec: the search query
endpoint with aggregations (metricDefinition/searchMetric,
geohashDefinition, aggregationFilterToken), sortProperty and the
auth-guest additions.
Point the go-micro.dev/v4 replace at the latest main-v4 maintenance
branch commit in butonic/go-micro (cd412c15) instead of the v4.11.3
tag. The new base is upstream v4.11.1 plus the registry cache
node-TTL fixes (upstream #2715, #2736, #2740), the concurrent map
access fix (upstream #2794), plus further dependency updates and test
fixes on the maintenance branch.
The branch also modernizes go-micro's own go.mod (go 1.26, lego,
dario.cat/mergo v1, x/deque v2, ...), and MVS pulls the aligned
versions into this module: lego v4.35.2 -> lego/v5 v5.5.2,
go-jose/go-jose/v4 -> v4.1.5, gofrs/flock -> v0.13.1,
mattn/go-isatty -> v0.0.24, go.uber.org/zap -> v1.28.0, x/net ->
0.59.0, miekg/dns -> 1.1.73, moby api/client, ProtonMail/go-crypto
-> 1.5.2, klauspost/compress -> 1.20.1, gorilla/handlers -> 1.5.2,
gobwas/ws -> 1.4.0, nxadm/tail -> 1.4.11, ...
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
The AfterScenario hook only asserted that the clean command returned
200, but cleaning sessions happens asynchronously in the daemon. Poll
the session list until it is empty (60s deadline) so leftover sessions
do not leak into the next scenario.
The uploads sessions command builds a posix driver with async file
uploads enabled, which makes it join the "dcfs" JetStream queue group.
Clean/restart/resume events published by the command itself can then be
routed to the CLI's own short-lived consumer; the nats client auto-acks
them and they are lost when the process exits, leaving stale upload
sessions behind.
Disable asyncfileuploads for the CLI driver instance so it only lists
sessions and publishes events. Also emit [] instead of null when the
session list is empty so the JSON output stays parseable.
A trashed folder keeps its path in the index, so a new folder can take
the same one. The descendant lookup behind move, delete, restore and
purge matched on space and path only: purging the trashed folder took
the live folder and its descendants out of the index, and moving the
live folder carried the trashed tree along.
Both engines now also match the root's trash state; purge with
onlyDeleted keeps matching the trashed ones only.
Ported from owncloud/ocis#11693. The uploads clean command now emits an events.CleanUpload event via the event stream rather than calling Purge directly. Requires the corresponding reva bump (vendor changes pulled in separately).
cleanup and fix the upload id
tweak error messages
(cherry picked from commit f7e53bb94698875efd092abaa6f38b6608dad4d4)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>