Commit Graph
24731 Commits
Author SHA1 Message Date
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 3b2ecae465 feat(kql): geo.distance, geo.bbox and geo.polygon predicates
Extends the KQL grammar with geo function values on any field, e.g.
location:geo.distance(lat, lon, 5km). Parses into GeoDistance/GeoBoundingBox/
GeoPolygon AST nodes; radius units (km/m/mi) are normalised to meters.
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
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
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
Viktor Scharf c77ba9ce0f test: commit the composer.lock files of the PHP test dependencies (#4198)
* test: commit the composer.lock files of the PHP test dependencies

The PHP dependencies of the acceptance tests were installed without lock
files: .gitignore excluded them, and the Makefile deleted a lock file
whenever its composer.json changed. So every run resolved the newest
versions allowed by the composer.json files, and the tests depended on
whatever was released upstream that day.

Commit the lock files of the root, vendor-bin/behat and
vendor-bin/opencloud-codestyle, and install exactly what they pin.
Before installing, `composer validate` fails if a composer.json was
changed without updating its lock file.

The vendor-bin namespaces don't inherit config.platform of the root
composer.json, so they now set it themselves, to PHP 8.4.1 like the CI
images (PHPUnit 13.3 needs at least 8.4.1). The lock files no longer
depend on the PHP version of whoever updates them.

Dependabot now updates the lock files weekly.

Fixes #4190

Assisted-by: Claude Code:claude-opus-5-5

* test: don't chmod the composer.lock files after the docker test run

The lock files are committed now and the container no longer creates
them, so there is no need to make them writable for everyone. The
chmod 777 set their executable bit, which git reports as a mode change
of the committed files.

Assisted-by: Claude Code:claude-opus-5-5
2026-12-04 08:32:24 +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 d651d72514 Merge pull request #4213 from opencloud-eu/fix/search-service-test-build
fix(search): repair the unit test build on main
2026-12-03 19:15:19 +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
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 9fbe650e1a Merge pull request #3272 from opencloud-eu/feat/search-geohash-aggregation
feat(search): geohash aggregation
2026-12-03 16:11:13 +01:00
Alex Ababii db6f2e37dc fix(search): bump reva 2026-12-03 15:56:50 +01:00
Alex 19d64d9d46 fix(devtools): allow Collabora in connect-src of the CSP (#4202)
Assisted-by: Claude Code:claude-opus-5-5
2026-12-03 14:18:09 +00: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
Alex Ababii fda7232556 fix(activitylog): fall back to the version key when the stream info cannot be read 2026-12-03 13:01:45 +01:00
Dominik Schmidt dfb14c3e84 feat(webdav)!: drop the built-in audio and GeoGebra extractors
Tika extracts audio cover art and GeoGebra thumbnails, so webdav no longer parses these files in-process. Without Tika they get no preview, and they are no longer announced by default.
2026-12-03 12:46:30 +01:00