nextcloud / nextcloud/fulltextsearch
Exception while improving searchresult
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 234
- Forks
- 64
- Avg merge
- 6h 18m
- Merged PRs (30d)
- 10
Description
Hi! I use Meilisearch as a provider of the fulltext search. I have updated my test NC instance from 33 to 34. In the logs I see the warning message Exception while improving searchresult with the details:
{"reqId":"3vGmDmKknEiIa1D2728F","level":2,"time":"2026-08-09T13:59:35+03:00","remoteAddr":"*****","user":"username","app":"files_fulltextsearch","method":"GET","url":"/ocs/v2.php/search/providers/fulltextsearch/search?term=%D0%94%D0%BE%D0%BD%D0%B5%D1%86%D1%8C%D0%BA&from=%2Fapps%2Ffiles%2Ffiles","scriptName":"/ocs/v2.php","message":"Exception while improving searchresult","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36","version":"34.0.2.1","exception":{"Exception":"OCA\\Files_FullTextSearch\\Exceptions\\FilesNotFoundException","Message":"","Code":0,"Trace":[{"file":"/www/html/nextcloud-dev-34/apps/files_fulltextsearch/lib/Service/SearchService.php","line":151,"function":"getFileFromId","class":"OCA\\Files_FullTextSearch\\Service\\FilesService","type":"->"},{"file":"/www/html/nextcloud-dev-34/apps/files_fulltextsearch/lib/Service/SearchService.php","line":117,"function":"setDocumentInfo","class":"OCA\\Files_FullTextSearch\\Service\\SearchService","type":"->"},{"file":"/www/html/nextcloud-dev-34/apps/files_fulltextsearch/lib/Provider/FilesProvider.php","line":291,"function":"improveSearchResult","class":"OCA\\Files_FullTextSearch\\Service\\SearchService","type":"->"},{"file":"/www/html/nextcloud-dev-34/apps/fulltextsearch/lib/Service/SearchService.php","line":121,"function":"improveSearchResult","class":"OCA\\Files_FullTextSearch\\Provider\\FilesProvider","type":"->"},{"file":"/www/html/nextcloud-dev-34/apps/fulltextsearch/lib/Service/SearchService.php","line":81,"function":"searchFromProviders","class":"OCA\\FullTextSearch\\Service\\SearchService","type":"->"},{"file":"/www/html/nextcloud-dev-34/apps/fulltextsearch/lib/Search/UnifiedSearchProvider.php","line":80,"function":"search","class":"OCA\\FullTextSearch\\Service\\SearchService","type":"->"},{"file":"/www/html/nextcloud-dev-34/lib/private/Search/SearchComposer.php","line":365,"function":"search","class":"OCA\\FullTextSearch\\Search\\UnifiedSearchProvider","type":"->"},{"file":"/www/html/nextcloud-dev-34/core/Controller/UnifiedSearchController.php","line":117,"function":"search","class":"OC\\Search\\SearchComposer","type":"->"},{"file":"/www/html/nextcloud-dev-34/lib/private/AppFramework/Http/Dispatcher.php","line":165,"function":"search","class":"OC\\Core\\Controller\\UnifiedSearchController","type":"->"},{"file":"/www/html/nextcloud-dev-34/lib/private/AppFramework/Http/Dispatcher.php","line":78,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/www/html/nextcloud-dev-34/lib/private/AppFramework/App.php","line":137,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/www/html/nextcloud-dev-34/lib/private/Route/Router.php","line":324,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/www/html/nextcloud-dev-34/ocs/v1.php","line":78,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/www/html/nextcloud-dev-34/ocs/v2.php","line":10,"args":["/www/html/nextcloud-dev-34/ocs/v1.php"],"function":"require_once"}],"File":"/www/html/nextcloud-dev-34/apps/files_fulltextsearch/lib/Service/FilesService.php","Line":433,"message":"Exception while improving searchresult","exception":"{\"class\":\"OCA\\Files_FullTextSearch\\Exceptions\\FilesNotFoundException\",\"message\":\"\",\"code\":0,\"file\":\"/www/html/nextcloud-dev-34/apps/files_fulltextsearch/lib/Service/FilesService.php:433\",\"trace\":\"#0 /www/html/nextcloud-dev-34/apps/files_fulltextsearch/lib/Service/SearchService.php(151): OCA\\Files_FullTextSearch\\Service\\FilesService->getFileFromId()\\n#1 /www/html/nextcloud-dev-34/apps/files_fulltextsearch/lib/Service/SearchService.php(117): OCA\\Files_FullTextSearch\\Service\\SearchService->setDocumentInfo()\\n#2 /www/html/nextcloud-dev-34/apps/files_fulltextsearch/lib/Provider/FilesProvider.php(291): OCA\\Files_FullTextSearch\\Service\\SearchService->improveSearchResult()\\n#3 /www/html/nextcloud-dev-34/apps/fulltextsearch/lib/Service/SearchService.php(121): OCA\\Files_FullTextSearch\\Provider\\FilesProvider->improveSearchResult()\\n#4 /www/html/nextcloud-dev-34/apps/fulltextsearch/lib/Service/SearchService.php(81): OCA\\FullTextSearch\\Service\\SearchService->searchFromProviders()\\n#5 /www/html/nextcloud-dev-34/apps/fulltextsearch/lib/Search/UnifiedSearchProvider.php(80): OCA\\FullTextSearch\\Service\\SearchService->search()\\n#6 /www/html/nextcloud-dev-34/lib/private/Search/SearchComposer.php(365): OCA\\FullTextSearch\\Search\\UnifiedSearchProvider->search()\\n#7 /www/html/nextcloud-dev-34/core/Controller/UnifiedSearchController.php(117): OC\\Search\\SearchComposer->search()\\n#8 /www/html/nextcloud-dev-34/lib/private/AppFramework/Http/Dispatcher.php(165): OC\\Core\\Controller\\UnifiedSearchController->search()\\n#9 /www/html/nextcloud-dev-34/lib/private/AppFramework/Http/Dispatcher.php(78): OC\\AppFramework\\Http\\Dispatcher->executeController()\\n#10 /www/html/nextcloud-dev-34/lib/private/AppFramework/App.php(137): OC\\AppFramework\\Http\\Dispatcher->dispatch()\\n#11 /www/html/nextcloud-dev-34/lib/private/Route/Router.php(324): OC\\AppFramework\\App::main()\\n#12 /www/html/nextcloud-dev-34/ocs/v1.php(78): OC\\Route\\Router->match()\\n#13 /www/html/nextcloud-dev-34/ocs/v2.php(10): require_once('...')\\n#14 {main}\"}","CustomMessage":"Exception while improving searchresult"},"id":"6a785da56e622"}
NC 34.0.2, bare metal.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/files_fulltextsearch/lib/Service/FilesService.php at line 433 and trace the call from SearchService.php lines 117 and 151 through FilesProvider.php line 291. Reproduce a full-text search against the reported Nextcloud 34 setup and inspect how a missing file reaches improveSearchResult. Done means the search no longer emits this warning for the reported case while preserving valid results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100