nextcloud / nextcloud/fulltextsearch

Constantly getting warning message Exception while improving searchresult

Open
#806 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
234
Forks
64
Avg merge
6h 18m
Merged PRs (30d)
10

Description

Hi! I am constantly getting the warning message "Exception while improving searchresult" with the trace log:

[files_fulltextsearch] Warning: Exception while improving searchresult:  - trace: [{"file":"\/var\/www\/html\/nextcloud\/apps\/files_fulltextsearch\/lib\/Service\/SearchService.php","line":272,"function":"getFileFromId","class":"OCA\\Files_FullTextSearch\\Service\\FilesService","type":"->"},{"file":"\/var\/www\/html\/nextcloud\/apps\/files_fulltextsearch\/lib\/Service\/SearchService.php","line":232,"function":"setDocumentInfo","class":"OCA\\Files_FullTextSearch\\Service\\SearchService","type":"->"},{"file":"\/var\/www\/html\/nextcloud\/apps\/files_fulltextsearch\/lib\/Provider\/FilesProvider.php","line":359,"function":"improveSearchResult","class":"OCA\\Files_FullTextSearch\\Service\\SearchService","type":"->"},{"file":"\/var\/www\/html\/nextcloud\/apps\/fulltextsearch\/lib\/Service\/SearchService.php","line":203,"function":"improveSearchResult","class":"OCA\\Files_FullTextSearch\\Provider\\FilesProvider","type":"->"},{"file":"\/var\/www\/html\/nextcloud\/apps\/fulltextsearch\/lib\/Service\/SearchService.php","line":166,"function":"searchFromProviders","class":"OCA\\FullTextSearch\\Service\\SearchService","type":"->"},{"file":"\/var\/www\/html\/nextcloud\/apps\/fulltextsearch\/lib\/Search\/UnifiedSearchProvider.php","line":139,"function":"search","class":"OCA\\FullTextSearch\\Service\\SearchService","type":"->"},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Search\/SearchComposer.php","line":159,"function":"search","class":"OCA\\FullTextSearch\\Search\\UnifiedSearchProvider","type":"->"},{"file":"\/var\/www\/html\/nextcloud\/core\/Controller\/UnifiedSearchController.php","line":101,"function":"search","class":"OC\\Search\\SearchComposer","type":"->"},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":230,"function":"search","class":"OC\\Core\\Controller\\UnifiedSearchController","type":"->"},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/AppFramework\/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/var\/www\/html\/nextcloud\/lib\/private\/Route\/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"\/var\/www\/html\/nextcloud\/ocs\/v1.php","line":64,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"\/var\/www\/html\/nextcloud\/ocs\/v2.php","line":23,"args":["\/var\/www\/html\/nextcloud\/ocs\/v1.php"],"function":"require_once"}]

GET /ocs/v2.php/search/providers/fulltextsearch/search?term=test&from=%2Fapps%2Ffiles%2Ffiles%3Fdir%3D%2FDocuments%26fileid%3D674

NC 27.1.4 Ubuntu 22.04
PHP-FPM 8.2
Using ElasticSearch 8.8.2 in docker (https://github.com/R0Wi/elasticsearch-nextcloud-docker/) with the basic authentication enabled and self-signed certificate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with apps/files_fulltextsearch/lib/Service/SearchService.php at lines 232 and 272, then follow the call from apps/files_fulltextsearch/lib/Provider/FilesProvider.php line 359. Reproduce the reported GET request against the described Nextcloud and Elasticsearch setup and determine why improving the result raises the exception. Done means the warning is no longer produced for this search.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, php
Domain
backend, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.