aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache/QuerySearchHelper.php
Commit message (Collapse)AuthorAgeFilesLines
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-1/+1
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix: make joining on tags in search queries work with shardingRobin Appelman2024-07-171-1/+0
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: add base class for extending the query builderRobin Appelman2024-07-121-3/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: Add SPDX headerAndy Scherzinger2024-05-241-23/+2
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* migrate metadata to lazy appconfigMaxence Lange2024-02-141-6/+1
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* ignore metadata if table is emptyMaxence Lange2023-11-141-1/+12
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* moving metadataqueryMaxence Lange2023-11-131-1/+1
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* feat(files): Allow advanced search for filesBenjamin Gaussorgues2023-11-101-0/+8
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Support getting and setting metadata in DAV requestsLouis Chemineau2023-11-081-16/+4
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* IFilesMetadataMaxence Lange2023-11-071-32/+38
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* Merge pull request #37969 from nextcloud/poc/noid/systemtags-perf-tag-endpointJulius Härtl2023-06-281-22/+43
|\
| * fix: include invisible tags for adminsArthur Schiwon2023-06-211-31/+29
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * fix: favorites view and universal search against tagsArthur Schiwon2023-06-211-17/+30
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * fix: change if with conditionless else to switch; and a parameter valueArthur Schiwon2023-06-211-19/+24
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * use efficient tag retrieval on DAV report requestArthur Schiwon2023-06-211-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - uses DAV search approach against valid files joined by systemtag selector - reduced table join for tag/systemtag search - supports pagination - no changes to the output formats or similar Example request body: <?xml version="1.0"?> <oc:filter-files xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns" xmlns:ocs="http://open-collaboration-services.org/ns"> <d:prop> <d:getcontentlength/> <d:getcontenttype/> <d:getetag/> <d:getlastmodified/> <d:resourcetype/> <nc:face-detections/> <nc:file-metadata-size/> <nc:has-preview/> <nc:realpath/> <oc:favorite/> <oc:fileid/> <oc:permissions/> <nc:nbItems/> </d:prop> <oc:filter-rules> <oc:systemtag>32</oc:systemtag> </oc:filter-rules> <d:limit> <d:nresults>50</d:nresults> <nc:firstresult>0</nc:firstresult> </d:limit> </oc:filter-files> Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | refactor: declare getMount() and getMountsIn() at IRootFolderArthur Schiwon2023-06-211-8/+3
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | chore: ugly type jugglingArthur Schiwon2023-06-211-4/+14
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | fix: expect interface, not a specific implementationArthur Schiwon2023-06-211-3/+2
|/ | | | | | | - fixes a regression when deleting folders while music app was enabled, for a LazyRoot was passed to this method. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* refactor: remove where specification from SELECT getterArthur Schiwon2023-05-101-2/+0
| | | | | | | | - search constraints are now fully in control of SystemTagsInFilesDetector::detectAssignedSystemTagsIn(), avoids duplication of a WHERE statement Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* refactor: remove SystemTag logic from Folder into QuerySearchHelperArthur Schiwon2023-05-091-0/+39
| | | | | | | - adds OC\SystemTag\SystemTagsInFilesDetector where the search logic is moved to Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* feat: specify media type via url path: systemtags-current/$mediaTypeArthur Schiwon2023-05-091-0/+4
| | | | | | | | | | - only the media part of the mime type can be search, but not the full mime type. It can be added, should it become necessary. - thus fixes previously hardcoded selector for image/ types - also fixes a return type hint - adds a return type hint Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* PoC: SystemTags endpoint to return tags used by a user with meta dataArthur Schiwon2023-05-091-21/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Target case is photos app: when visiting the tags category, all systemtags of the whole cloud are retrieved. In subequent steps the next tag is requested until the browser view is filled with tag tiles (i.e. previews are requested just as well). With this approach, we incorpoate the dav search and look for user related tags that are used by them, and already returns the statistics (number of files tagged with the respective tag) as well as a file id for the purpose to load the preview. This defaults to the file with the highest id. Call: curl -s -u 'user:password' \ 'https://my.nc.srv/remote.php/dav/systemtags-current' \ -X PROPFIND -H 'Accept: text/plain' \ -H 'Accept-Language: en-US,en;q=0.5' -H 'Depth: 1' \ -H 'Content-Type: text/plain;charset=UTF-8' \ --data @/home/doe/request-systemtag-props.xml With request-systemtag-props.xml: <?xml version="1.0" encoding="UTF-8"?> <d:propfind xmlns:d="DAV:"> <d:prop xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"> <oc:id/> <oc:display-name/> <oc:user-visible/> <oc:user-assignable/> <oc:can-assign/> <nc:files-assigned/> <nc:reference-fileid/> </d:prop> </d:propfind> Example output: … <d:response> <d:href>/master/remote.php/dav/systemtags/84</d:href> <d:propstat> <d:prop> <oc:id>84</oc:id> <oc:display-name>Computer</oc:display-name> <oc:user-visible>true</oc:user-visible> <oc:user-assignable>true</oc:user-assignable> <oc:can-assign>true</oc:can-assign> <nc:files-assigned>42</nc:files-assigned> <nc:reference-fileid>924022</nc:reference-fileid> </d:prop> <d:status>HTTP/1.1 200 OK</d:status> </d:propstat> </d:response> <d:response> <d:href>/remote.php/dav/systemtags/97</d:href> <d:propstat> <d:prop> <oc:id>97</oc:id> <oc:display-name>Bear</oc:display-name> <oc:user-visible>true</oc:user-visible> <oc:user-assignable>true</oc:user-assignable> <oc:can-assign>true</oc:can-assign> <nc:files-assigned>1</nc:files-assigned> <nc:reference-fileid>923422</nc:reference-fileid> </d:prop> <d:status>HTTP/1.1 200 OK</d:status> </d:propstat> </d:response> … Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix typos in lib/private subdirectoryluz paz2022-07-271-1/+1
| | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/private` Signed-off-by: luz paz <luzpaz@github.com>
* Search without join on filecache_extendedCarl Schwan2022-06-231-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Files: Extend search to also cover tagsMarcel Klehr2022-05-171-5/+14
| | | | | | fixes #326 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet2022-03-241-4/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* generate a better optimized query for path prefix search filtersRobin Appelman2021-08-261-7/+14
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* inject SearchBuilderRobin Appelman2021-06-141-2/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* split of query building bits from searchhelperRobin Appelman2021-06-141-196/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* update tests and fix some edge cases around new searchRobin Appelman2021-06-141-1/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* some cleanup and documentationRobin Appelman2021-06-141-4/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* perform file search in a single queryRobin Appelman2021-06-141-7/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* use searchoperation for storage filter instead of db expressionRobin Appelman2021-06-141-11/+13
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* rework search api to allow searching on multiple caches at onceRobin Appelman2021-06-141-6/+113
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-2/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #25136 from nextcloud/cachejail-search-filterVincent Petry2021-03-151-0/+5
|\ | | | | do cachejail search filtering in sql
| * fix cachjail searching for rootRobin Appelman2021-01-261-0/+3
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * do cachejail search filtering in sqlRobin Appelman2021-01-261-0/+2
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-1/+1
|/ | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headers for 19Christoph Wurst2020-04-291-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code according to PSR2Christoph Wurst2020-04-101-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all properties and move static keywordChristoph Wurst2020-04-101-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-101-7/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headers for 18Christoph Wurst2019-12-201-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #18314 from nextcloud/fixFileIdSearchRoeland Jago Douma2019-12-101-0/+2
|\ | | | | Fix ambigious fileID on search
| * fix https://github.com/nextcloud/server/issues/18313tobiasKaminsky2019-12-101-0/+2
| | | | | | | | Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
* | Update license headersChristoph Wurst2019-12-051-1/+2
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | remove old 'owner' filterRobin Appelman2019-12-031-5/+0
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>