files_fulltextsearch
files_fulltextsearch copied to clipboard
FF breaks new IOS app unified search with "Exception while improving searchresult" when some files are on external storage
The IOS app 4.4.x now features unified search, which is perfect (and what I was waiting for a long time). Unfortunately the search breaks when Files-Fulltextsearch is enabled on the server.
With FF disableld, the IOS app returns 5 search results with a "load more" link where you can load the next 5 results - pretty the same as the unified search in the Nextcloud web interface.
Once Files-Fulltextsearch is enabled, the IOS app always returns only 3 results - and no link to load more. So, in fact the search in the new app version is fully broken when FF is enabled.
FF throws this error in the server log when a search is done in the IOS app 4.4.x:
[files_fulltextsearch] Warnung: Exception while improving searchresult: - trace: [{"file":"\/var\/www\/nextcloud\/apps\/files_fulltextsearch\/lib\/Service\/SearchService.php","line":275,"function":"getFileFromId","class":"OCA\\Files_FullTextSearch\\Service\\FilesService","type":"->"},{"file":"\/var\/www\/nextcloud\/apps\/files_fulltextsearch\/lib\/Service\/SearchService.php","line":235,"function":"setDocumentInfo","class":"OCA\\Files_FullTextSearch\\Service\\SearchService","type":"->"},{"file":"\/var\/www\/nextcloud\/apps\/files_fulltextsearch\/lib\/Provider\/FilesProvider.php","line":362,"function":"improveSearchResult","class":"OCA\\Files_FullTextSearch\\Service\\SearchService","type":"->"},{"file":"\/var\/www\/nextcloud\/apps\/fulltextsearch\/lib\/Service\/SearchService.php","line":203,"function":"improveSearchResult","class":"OCA\\Files_FullTextSearch\\Provider\\FilesProvider","type":"->"},{"file":"\/var\/www\/nextcloud\/apps\/fulltextsearch\/lib\/Service\/SearchService.php","line":166,"function":"searchFromProviders","class":"OCA\\FullTextSearch\\Service\\SearchService","type":"->"},{"file":"\/var\/www\/nextcloud\/apps\/fulltextsearch\/lib\/Search\/UnifiedSearchProvider.php","line":139,"function":"search","class":"OCA\\FullTextSearch\\Service\\SearchService","type":"->"},{"file":"\/var\/www\/nextcloud\/lib\/private\/Search\/SearchComposer.php","line":160,"function":"search","class":"OCA\\FullTextSearch\\Search\\UnifiedSearchProvider","type":"->"},{"file":"\/var\/www\/nextcloud\/core\/Controller\/UnifiedSearchController.php","line":115,"function":"search","class":"OC\\Search\\SearchComposer","type":"->"},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":225,"function":"search","class":"OC\\Core\\Controller\\UnifiedSearchController","type":"->"},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/var\/www\/nextcloud\/lib\/private\/Route\/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"\/var\/www\/nextcloud\/ocs\/v1.php","line":62,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"\/var\/www\/nextcloud\/ocs\/v2.php","line":23,"args":["\/var\/www\/nextcloud\/ocs\/v1.php"],"function":"require_once"}]
GET /ocs/v2.php/search/providers/fulltextsearch/search?format=json&term=Saturn
from xx.xx.xx.xx by marco at 2022-08-23T13:18:37+02:00
A quick hotfix would be appreciated.
After some testing I found some new information: The issue does only happen if some of the files in the search result live in an external storage which is connected to Nextcloud! In my case the "external storage" is on the same server, so no latency issues involved. It's just some directories from my document management server which are synced via Syncthing to the Nextcloud VM, so they can be found and accessed in Nextcloud as well!
same behavior here, Nextcloud running docker, mounting local volumes into the container and therefore being "external"
Fulltextsearch seems to work nonetheless
{"reqId":"1nL4OFLhtIi0WhTfHqra","level":2,"time":"2022-11-08T19:07:55+00:00","remoteAddr":"1.2.3.4","user":"<SOME_USER>","app":"files_fulltextsearch","method":"GET","url":"/ocs/v2.php/search/providers/fulltextsearch/search?term=face+re&from=%2Fsettings%2Fapps%2Fenabled","message":"Exception while improving searchresult: - trace: [{\"file\":\"\\/config\\/www\\/nextcloud\\/apps\\/files_fulltextsearch\\/lib\\/Service\\/SearchService.php\",\"line\":275,\"function\":\"getFileFromId\",\"class\":\"OCA\\\\Files_FullTextSearch\\\\Service\\\\FilesService\",\"type\":\"->\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/apps\\/files_fulltextsearch\\/lib\\/Service\\/SearchService.php\",\"line\":235,\"function\":\"setDocumentInfo\",\"class\":\"OCA\\\\Files_FullTextSearch\\\\Service\\\\SearchService\",\"type\":\"->\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/apps\\/files_fulltextsearch\\/lib\\/Provider\\/FilesProvider.php\",\"line\":362,\"function\":\"improveSearchResult\",\"class\":\"OCA\\\\Files_FullTextSearch\\\\Service\\\\SearchService\",\"type\":\"->\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/apps\\/fulltextsearch\\/lib\\/Service\\/SearchService.php\",\"line\":203,\"function\":\"improveSearchResult\",\"class\":\"OCA\\\\Files_FullTextSearch\\\\Provider\\\\FilesProvider\",\"type\":\"->\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/apps\\/fulltextsearch\\/lib\\/Service\\/SearchService.php\",\"line\":166,\"function\":\"searchFromProviders\",\"class\":\"OCA\\\\FullTextSearch\\\\Service\\\\SearchService\",\"type\":\"->\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/apps\\/fulltextsearch\\/lib\\/Search\\/UnifiedSearchProvider.php\",\"line\":139,\"function\":\"search\",\"class\":\"OCA\\\\FullTextSearch\\\\Service\\\\SearchService\",\"type\":\"->\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/lib\\/private\\/Search\\/SearchComposer.php\",\"line\":160,\"function\":\"search\",\"class\":\"OCA\\\\FullTextSearch\\\\Search\\\\UnifiedSearchProvider\",\"type\":\"->\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/core\\/Controller\\/UnifiedSearchController.php\",\"line\":115,\"function\":\"search\",\"class\":\"OC\\\\Search\\\\SearchComposer\",\"type\":\"->\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php\",\"line\":225,\"function\":\"search\",\"class\":\"OC\\\\Core\\\\Controller\\\\UnifiedSearchController\",\"type\":\"->\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php\",\"line\":133,\"function\":\"executeController\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/lib\\/private\\/AppFramework\\/App.php\",\"line\":172,\"function\":\"dispatch\",\"class\":\"OC\\\\AppFramework\\\\Http\\\\Dispatcher\",\"type\":\"->\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/lib\\/private\\/Route\\/Router.php\",\"line\":298,\"function\":\"main\",\"class\":\"OC\\\\AppFramework\\\\App\",\"type\":\"::\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/ocs\\/v1.php\",\"line\":62,\"function\":\"match\",\"class\":\"OC\\\\Route\\\\Router\",\"type\":\"->\"},{\"file\":\"\\/config\\/www\\/nextcloud\\/ocs\\/v2.php\",\"line\":23,\"args\":[\"\\/config\\/www\\/nextcloud\\/ocs\\/v1.php\"],\"function\":\"require_once\"}]","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36","version":"24.0.7.1","data":{"app":"files_fulltextsearch","level":"2"},"id":"636ff16a89266"}