Commit Graph
5598 Commits
Author SHA1 Message Date
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
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
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
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
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
Florian Schade f999523c49 Merge pull request #4137 from opencloud-eu/fix/mention-share-jail-id
fix(graph): resolve share jail ids in activity notifications
2026-12-03 11:30:21 +01:00
opencloudeu 3f1d8b01e7 [tx] updated from transifex 2026-12-02 23:16:37 +00:00
Alex Ababii b639ac7fa9 feat(search): make the retry delay and the number of runs for unreachable tika configurable 2026-12-02 17:36:23 +01:00
Dominik Schmidt a059ae8179 test(webdav): drop the newTika helper again
It only saved the preset argument, the other three still vary per call,
and the calls changed anyway, so the diff got larger rather than smaller.
2026-12-02 16:47:28 +01:00
Dominik Schmidt 0ac1ea8e30 fix(webdav): trim the Tika thumbnail preset once in Sanitize
The check trimmed the preset but the URL took it untrimmed, so " thumbnail"
started fine and then answered 404 for /unpack/preset/%20thumbnail. Sanitize
trims it now and Validate only compares against "". The tests build their
Tika through a helper that sets the default preset.
2026-12-02 16:43:53 +01:00
Pascal Bleser 21626d7d2d fix(webdav): don't pass internal search errors on to clients
When the search service failed with anything but a bad request, a search
REPORT answered with the error message of the service, which can carry
internal details such as paths in the storage. Answer with a generic
message instead: the error itself is still logged.

Assisted-by: Claude Code:claude-opus-5-5
2026-12-02 16:31:14 +01:00
Dominik Schmidt 17a9874be2 feat(webdav): make the Tika thumbnail preset configurable
OC_TIKA_THUMBNAIL_PRESET (WEBDAV_TIKA_THUMBNAIL_PRESET) names the catalog
preset webdav unpacks thumbnails with, "thumbnail" by default. A preset of
your own has to bring the same filter, only the raster images Tika marks as
THUMBNAIL or RENDERING, since webdav takes the first image in the answer.
An empty preset fails at startup.

Changing the preset needs the thumbnail cache emptied, as a Tika upgrade
does.
2026-12-02 16:22:19 +01:00
Alex Ababii 948e97d6d5 fix(search): nack an indexing event only when tika is unreachable 2026-12-02 15:45:56 +01:00
Alex Ababii 1ff61a5369 fix(search): drop the unused tripped flag of the unreachable extractions 2026-12-02 15:14:10 +01:00
Dominik Schmidt e6acfb721d Merge pull request #3332 from opencloud-eu/feat/thumbnails-raw-embedded-preview
feat(webdav): extract thumbnails through Tika
2026-12-02 12:13:30 +01:00
Alex Ababii 38ccf9869a fix(search): redeliver events with a delay and give up after 5 runs when tika is unreachable
Assisted-by: opencode:claude-sonnet-5.5
2026-12-02 12:02:28 +01:00
Ralf Haferkamp 3f25437ae5 Merge pull request #3477 from zerox80/codex/oidc-session-logout
fix(proxy): reject tokens covered by a backchannel logout
2026-12-02 09:21:54 +01:00
Alex Ababii 61ea17c14a fix(search): on processing events debouncer checks for tika error and if any then not acknowledging the event 2026-12-02 09:15:12 +01:00