Commit Graph

14 Commits

Author SHA1 Message Date
Dominik Schmidt
365bd94418 refactor(search): use map[string]struct{} for lowercaseFields set
Bring the membership lookup in line with the existing repo convention
for set types (see services/thumbnails/pkg/thumbnail/mimetypes.go for
the same pattern). Storing struct{} values instead of bool makes the
set semantics explicit and rules out accidental false entries.
2026-04-22 10:01:02 +02:00
Dominik Schmidt
796e5fd373 fix(search): tighten lowercaseFields comment
Copilot review pointed out that the comment claimed pre-lowercasing
makes non-analyzed query types (wildcard, fuzzy) match for every
allowlisted field. That is true for Name/Tags/Favorites, whose
lowercaseKeyword analyzer emits a single lowercased token, but the
Content analyzer also stems terms — so the guarantee doesn't hold
there. Drop the specific claim and keep the comment to the intent:
stay consistent with the field's analyzer.
2026-04-22 09:50:19 +02:00
Dominik Schmidt
538c82787c fix(search): preserve value case for non-lowercased bleve fields
The bleve compiler lowercased every query value (except Hidden)
before handing it to the engine. This matched the index tokens
for fields whose analyzer folds case — Name, Tags, Favorites,
Content — but silently broke matching for every other field,
whose default keyword analyzer preserves case. A query like
Title:"Some Title" parsed fine, lowercased to "some title", and
missed the indexed token "Some Title".

Replace the blanket lowercasing with an allowlist of the four
fields whose index mapping actually uses a lowercasing analyzer.
Every other field now passes through unchanged, which keeps
values like "deadmau5" or "Motörhead" intact instead of
normalising them to a case the tag writer didn't choose.
2026-04-22 09:50:19 +02:00
André Duffeck
ce5ec1b3dc Add support for favorites to the search service 2026-03-13 09:38:28 +01:00
Jörn Friedrich Dreyer
b07b5a1149 use plain pkg module
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 16:42:19 +01:00
Jörn Friedrich Dreyer
8e028f17e9 change module name
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2025-01-13 09:58:18 +01:00
jkoberg
7a819412c2 feat(ocis): move ast and kql pkg to ocis-pkg
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-06-24 16:23:55 +02:00
Christian Richter
1cdd839fc7 add form mime type
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-11-22 11:37:53 +01:00
Roman Perekhod
7175316292 fix the tgz mime type, bump reva 2023-11-21 17:33:52 +01:00
Roman Perekhod
7ab553e23b add file type filter chip (#7602)
* add file type filter chip

* changed the keyword

* use reva issue-7432-replace

* changed the filter name. fix types

* rework mapBinary

---------

Co-authored-by: Roman Perekhod <rperekhod@owncloud.com>
2023-11-13 18:04:17 +01:00
Roman Perekhod
911ea1c0f6 fix kql-bleve search. wildcards are excluded 2023-09-15 17:14:59 +02:00
Roman Perekhod
158f91b398 fix unary in the beginning 2023-09-07 14:38:26 +02:00
Florian Schade
844783b6f9 [full-ci] - use KQL as default search query language (#7212)
* enhancement: use kql as default search query language

* enhancement: add support for unicode search queries

* fix: escape bleve field query whitespace

* fix: search related acceptance tests

* enhancement: remove legacy search query language

* enhancement: add support for kql dateTime restriction node types

* chore: bump web to v8.0.0-alpha.2

* fix: failing search api test

* enhancement: search bleve query compiler use DateRangeQuery as DateTimeNode counterpart

* enhancement: support for colon operators in dateTime kql queries
2023-09-07 11:13:33 +02:00
Florian Schade
ed0dbce978 enhancement: Keyword Query Language (KQL) search syntax support (#7043)
* feat(search): introduce search query package

With the increasing complexity of how we organize our resources, the search must also be able to find them using entity properties.

The query package provides the necessary functionality to do this.

This makes it possible to search for resources via KQL, the microsoft spec is largely covered and can be used for this.

In the current state, the legacy query language is still used, in a future update this will be deprecated and KQL will become the standard
2023-08-28 16:41:36 +02:00