Commit Graph
5613 Commits
Author SHA1 Message Date
Pascal Bleser eff9e447f3 Merge pull request #4203 from pbleser-oc/fix/4200-cleanup-time-zone
fix: say which time zone the revision cleanup uses
2026-12-04 12:25:31 +01:00
Andre Duffeck f69513e29f Merge pull request #4208 from junkerderprovinz/fix-purge-trash-bin-errors
fix(storage-users): keep purging the trash-bin when one item fails
2026-12-04 11:52:44 +01:00
Dominik Schmidt 7d58b79b35 feat(kql): let a geo predicate take the field of its group 2026-12-04 11:01:26 +01:00
Dominik Schmidt 69cc8e13ce refactor(kql): read a geo predicate without its field as free text 2026-12-04 11:01:26 +01:00
Dominik Schmidt 7b72225934 fix(kql): reject geo predicates no engine can answer as a bad request 2026-12-04 11:01:26 +01:00
Dominik Schmidt ca8bc37589 refactor(search): drop the unreachable group key fallback for geo predicates 2026-12-04 11:01:26 +01:00
Dominik Schmidt 787e06147a fix(search): reject a geo predicate on a non-geo field when parsing the query
The engines get the parsed query now and treat a compile error as
internal, so a geo predicate on a field that is not a geopoint answered
with an internal error instead of a bad request. The parser cannot tell,
it does not know the index fields; ParseQuery checks the geo keys against
the field type table after parsing.
2026-12-04 11:01:26 +01:00
Dominik Schmidt 00f85c5496 refactor(search): resolve KQL keys next to the field type table
The field facts lived in two packages: search had the field type table,
query had the key resolution and a second copy of the field types. Key
resolution and the geopoint check move to search, next to FieldType, and
query reads them from there. query stays the lowering pass for the
engines; search can now check a parsed query against the fields without
an import cycle.
2026-12-04 11:01:26 +01:00
Dominik Schmidt 5e9e52459b refactor(search): read geopoint fields from the shared field type table
The geo predicates kept their own table of geopoint fields and resolved the
key themselves, and each engine had its own copy of the lookup. They now go
the way of every other field: the normalizer resolves the key of a geo node,
FieldIsGeopoint asks the field type table that FieldIsNumeric and
FieldIsDatetime read, and both engines get the sibling name from
GeopointField. A key in another spelling is covered by GEO-11.
2026-12-04 11:01:26 +01:00
Dominik Schmidt 76f3a677ab docs(search): add a KQL Extensions section documenting the geo predicates 2026-12-04 11:01:26 +01:00
Dominik Schmidt 0e55a8ea85 test(search): drop the bleve-only geo test, the parity suite covers it 2026-12-04 11:01:26 +01:00
Dominik Schmidt a0b0e5a47e test(search): pin the geo predicates in the parity suite 2026-12-04 11:01:26 +01:00
Dominik Schmidt 5614c44653 docs(search): document geo KQL predicates in the search README 2026-12-04 11:01:26 +01:00
Dominik Schmidt c6cc01750a fix(kql): normalise geo.bbox latitude order for backend-consistent behaviour
Sorts the two latitudes in the KQL layer so MinLat <= MaxLat. Only bleve
strictly requires it (it errors on an inverted box; OpenSearch tolerates it),
but doing it centrally keeps behaviour consistent across backends and the AST
easy to reason about. Longitude order is preserved so an antimeridian-crossing
box (minLon > maxLon) still works, which both backends handle identically.
2026-12-04 11:01:26 +01:00
Dominik Schmidt 45db329379 refactor(search): resolve geo fields via mapping overrides, reject non-geo fields
Replaces the ad-hoc key+"_geopoint" concatenation with a proper lookup
(query.ResolveGeoField) derived from the TypeGeopoint field overrides, so it
works for any geopoint field, not just location. Geo predicates on non-geopoint
fields now error instead of querying a nonexistent field.
2026-12-04 11:01:26 +01:00
Dominik Schmidt 13b00b9f8a feat(search): transpile geo KQL predicates for opensearch
Adds geo_distance/geo_bounding_box query builders plus a geo_shape polygon
query (relation intersects, the modern replacement for the deprecated
geo_polygon, still valid against geo_point). Wires the geo AST nodes through
the KQL transpiler onto the <field>_geopoint sibling.
2026-12-04 11:01:26 +01:00
Dominik Schmidt e1fb59232d feat(search): compile geo KQL predicates for bleve
Translates the geo AST nodes to bleve GeoDistance/GeoBoundingBox/
GeoBoundingPolygon queries over the indexed <field>_geopoint sibling.
2026-12-04 11:01:26 +01:00
Dominik Schmidt fb2b1a15f8 Merge pull request #4210 from opencloud-eu/fix/kql-group-key-needs-operator
fix(kql): tell operators, words and group keys apart
2026-12-04 11:01:22 +01:00
Pascal Bleser 85031fab71 fix: 4200: say which time zone the revision cleanup uses
Midnight for "D" and "W" and the days, weeks and hours of "auto" are in
the local time zone of the server, set with TZ or by the system, and UTC
without either (opencloud-eu/reva#1097 moves the slots of "auto" from UTC
to the local time zone). The description of the strategy, the README of
the service and the help of the cleanup command now say so, how to get
UTC, and that the command must run with the same time zone as the server,
otherwise it decides differently.

https://github.com/opencloud-eu/opencloud/issues/4200

Assisted-by: Claude Code:claude-opus-5-5
2026-12-04 10:59:15 +01:00
Jörn Friedrich Dreyer 4154dcd71f Merge pull request #4192 from pbleser-oc/fix/881-generic-search-errors
fix(webdav): don't pass internal search errors on to clients
2026-12-04 10:26:35 +01:00
Junker der Provinz ced4256a9f fix(storage-users): cap the errors collected while purging the trash-bin
When the storage provider is down, the gateway answers PurgeRecycle with
a failed status instead of a transport error, so every expired item adds
an error. Keep the first ten and count the rest.
2026-12-04 10:07:41 +01:00
Jörn Friedrich Dreyer c24f9dbe72 Merge pull request #4199 from opencloud-eu/feat/thumbnails-drop-builtin-extractors
feat(webdav)!: drop the built-in audio and GeoGebra extractors
2026-12-04 09:52:15 +01:00
opencloudeu 208b772beb [tx] updated from transifex 2026-12-03 23:16:30 +00:00
Dominik Schmidt 46b508446f Merge pull request #3298 from opencloud-eu/feat/search-sort-properties
feat(search): sort results via sortProperties / order_by
2026-12-03 20:21:53 +01:00
Dominik Schmidt 5c4fe27f4c fix(kql): read AND, OR and NOT as operators only where the word ends 2026-12-03 19:22:54 +01:00
Dominik Schmidt a780f85357 test(search): pin keyed groups and a word in front of a group in the parity suite 2026-12-03 19:22:54 +01:00
Dominik Schmidt 6ea914f59a fix(kql): do not read a word or operator in front of a group as its key 2026-12-03 19:22:54 +01:00
Dominik Schmidt 7c7517e685 fix(search): adapt the tika outage tests to the two-value NewService 2026-12-03 18:52:30 +01:00
Alex Ababii 5e2328c68a Merge pull request #4195 from maki5/fix/stale_search_index
fix(search): retry indexing a space with a delay when tika is unreachable
2026-12-03 18:11:18 +01:00
Alex Ababii 380783baff fix(search): added comment for TrashItem event processing 2026-12-03 17:33:47 +01:00
Dominik Schmidt e63b1a2008 test(search): hold both engines to the same order in the parity suite
A Sorting section runs every case against bleve and OpenSearch and compares the order of the matches: size, modification time, track length, year with a second key, the date a photo was taken, a file without the sort value, names in code point order, and the fields that are not sortable. Its rows keep the order of the answer in the README, and the fixtures list the values that are sorted by.
2026-12-03 17:24:17 +01:00
Dominik Schmidt 875f82bdcc feat(search): native order_by sorting in the opensearch backend
Name is analyzed (lowercaseKeyword) and therefore a text field, which
OpenSearch refuses to sort on without fielddata; enable it in the index
template. The keyword tokenizer emits one term per document, so the
fielddata cache stays small. The schema version has not shipped yet, so
no reindex is needed.

(cherry picked from commit f1d0e7b773b170b119dbd59fa176d656237bed96)
2026-12-03 17:23:01 +01:00
Dominik Schmidt a36f74edef feat(search): native order_by sorting in the bleve backend
(cherry picked from commit 66a0755ad69a6a1af07e0b8335b08d63793777ce)
2026-12-03 17:23:01 +01:00
Dominik Schmidt 01bca083a6 feat(search): merge per-space results in order_by order
The fan-out passes order_by through to each engine query; the merge
re-sorts the combined matches with CompareMatches and keeps the score
as tiebreaker (and as the sole criterion when no order_by is given).

(cherry picked from commit 66af40fc34fd9daffc028ab06f83f7ade8a360d1)
2026-12-03 17:23:01 +01:00
Dominik Schmidt c867efb2b7 feat(search): allow sorting by any scalar hit field
Sortable is every field that is indexed as a scalar and carried on the
match entity: name, size, lastModifiedDateTime, mimeType and the scalar
facet fields (photo.*, audio.*, image.*, location.*, ...). Both sets
are derived by reflection, so new facet fields become sortable
automatically. Multivalued fields (tags), bare facets and internal
index fields are rejected with invalidRequest at the graph layer.
CompareMatches provides the merge comparator for the service layer.

(cherry picked from commit bd32795194cf3945e8416ede496a147ce8d6cb5c)
2026-12-03 17:23:01 +01:00
Dominik Schmidt 7982c06794 feat(graph): accept sortProperties on search requests
Validated against the sortable-field whitelist (name, size,
lastModifiedDateTime, photo.takenDateTime) and forwarded to the search
service as order_by. Also fixes the stub search service's IndexSpace
signature (streaming response) so the suite builds again.

(cherry picked from commit 9aa6a3492de3468da7a8480a3b9ef5748cee1f5d)
(cherry picked from commit 35a6cad8ea6a7890bdc0bc98c7ac97bdcbf477cc)
2026-12-03 17:23:01 +01:00
Dominik Schmidt 01e4c21b29 feat(search): add sortProperties plumbing (libregraph model, proto order_by)
(cherry picked from commit 1b748fb757e2dde5b3cd1beaa543be4266342590)
2026-12-03 17:23:01 +01:00
Dominik Schmidt 2e8fc06b50 Merge pull request #4206 from opencloud-eu/feat/search-geohash-filter-token
feat(search): geohash cells as aggregation filter tokens
2026-12-03 16:19:45 +00:00
Dominik Schmidt 9c34cea0d3 test(search): cover the cell filter parsing and the OpenSearch cell query 2026-12-03 16:35:54 +01:00
Junker der Provinz 4db5963734 fix(storage-users): keep purging the trash-bin when one item fails
PurgeTrashBin returned on the first item PurgeRecycle could not delete,
so a single broken trash-bin item stopped the purge for every later item
and space of that type. Skip items the storage reports an error for and
return their errors together at the end. A transport error still ends
the run, since every later call would fail the same way.

That transport error also panicked, because the status of the nil
response was read before the error.

https://github.com/opencloud-eu/opencloud/issues/4207
2026-12-03 16:20:54 +01:00
Andre Duffeck ecb9fbde41 Merge pull request #4154 from opencloud-eu/fix/tags-listing-aggregation
fix(graph): list tags through a terms aggregation
2026-12-03 16:18:26 +01:00
Dominik Schmidt ac41685a58 docs(search): name Lucene as the source of the cell edge rule 2026-12-03 16:11:19 +01:00
Dominik Schmidt 793cf6ad3a test(search): cover the cell edges at 0, 90 and 180 2026-12-03 16:11:19 +01:00
Dominik Schmidt c09c02e2fb feat(search): geohash cells as aggregation filter tokens 2026-12-03 16:11:19 +01:00
Dominik Schmidt 19e332f579 fix(graph): answer geohash cells without a filter token 2026-12-03 14:45:45 +01:00
Dominik Schmidt b928dc8342 feat(search): geohash aggregation
A geohash_grid aggregation over a geopoint field, requested with
@libre.graph.geohashDefinition {precision}. OpenSearch answers it with
geohash_grid on the geopoint field, bleve folds the doc values of the
geohash sibling field. size limits the buckets to the top cells by count.
2026-12-03 14:45:45 +01:00
Dominik Schmidt 921bbb1450 Merge pull request #4201 from opencloud-eu/fix/bleve-geo-verify-test-build
test(search): build the bleve geo test against the new backend signature
2026-12-03 14:15:36 +01:00
Alex Ababii f5252449c5 Merge pull request #4115 from maki5/fix/activitylog_nats_ttl
fix(activitylog): expire old activities with the configured store TTL
2026-12-03 14:01:36 +01:00
Dominik Schmidt 318db96f1d test(search): build the bleve geo test against the new backend signature 2026-12-03 13:56:06 +01:00
Dominik Schmidt 314287ab2a Merge pull request #3519 from opencloud-eu/feat/search-bleve-geohash-sibling
feat(search): geohash support in bleve
2026-12-03 13:19:58 +01:00