ios icon indicating copy to clipboard operation
ios copied to clipboard

App 4.4.x returns only 3 search results if Fulltextsearch-Files is enabled on the server

Open jacotec opened this issue 3 years ago • 6 comments

Steps to reproduce

  1. Have Fulltextsearch-Files installed and enabled on the server
  2. Search for a term which appears in many files, giving 10+ search results, using App version 4.4.x

Expected behaviour

All results should be found. Currently the app shows the first 5 with a "load more" link which loads the next 5 etc.

Actual behaviour

When Fulltextsearch-Files is enabled on the server, the app only shows 3 results. There is no link displayed to load more results - so the search in the app is basically unusable.

Using Nextcloud-web for the search, it works and the error message below does not occur. The app seems to do something different, triggering the issue which breaks the search.

Logs

[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

Reasoning or why should it be changed/implemented?

It breaks the search in the app.

I'm not sure what the app does different than NC web, because it works using the web interface.

Yes, the root issue might be in the FF-App on the server, but what does the client different to trigger the issue? It needs a speedy fix at least somewhere, as search is essential.

I've also raised an issue in the FF app: https://github.com/nextcloud/files_fulltextsearch/issues/190 As this is in the nextcloud Github repo maybe @marinofaggiana can trigger the right team member to fix it there in case the app does nothing wrong.

Environment data

iOS version: e.g. iOS 14.4.1

15.6.1

Nextcloud iOS app version: see More > Settings

4.4.2.0

Server operating system:

Ubuntu 20.04 LTS

Web server: Apache, nginx

Apache

Database:

MariaDB

PHP version:

8.0

Nextcloud version: see Nextcloud admin page

24.0.4

jacotec avatar Aug 23 '22 11:08 jacotec

hi @jacotec Hi, can you send me a test account ?

marinofaggiana avatar Aug 23 '22 13:08 marinofaggiana

@marinofaggiana The one I gave you two weeks ago is still active ;-)

jacotec avatar Aug 23 '22 13:08 jacotec

I look if I have yet it

marinofaggiana avatar Aug 23 '22 13:08 marinofaggiana

@marinofaggiana I've resent it to you via mail.

jacotec avatar Aug 23 '22 14:08 jacotec

@jacotec Can you create a test on my account in your server so I cant read the results ?

marinofaggiana avatar Aug 24 '22 09:08 marinofaggiana

@marinofaggiana I've created 10 test PDF's (Testbook page 1 ... Testbook page 10) and shared them to you. I have no idea if that works in your account as well as it seems you have changed the password, so I can't double check.

The good thing: Because of your request I found an important dependency, which I've posted in the issue in the Files-Fulltextsearch repo: The issue happens only if at least some files delivered in the search are living in an external storage connected to the 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!

I've moved these "Testbook" files into my external storage and shared them with you. Please check if you can reproduce the issue.

The issue does not occur if you have all files in your main Nextcloud storage!

jacotec avatar Aug 24 '22 12:08 jacotec

@marinofaggiana Any update here?

jacotec avatar Oct 10 '22 08:10 jacotec

Hi @jacotec you must move this issue in Server side because is not a client competence

marinofaggiana avatar Oct 17 '22 10:10 marinofaggiana