nextcloud / nextcloud/ios

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

Open
#2,134 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
2.5k
Forks
1k
Avg merge
2d 18h
Merged PRs (30d)
13

Description

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

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 by comparing the iOS app's request to /ocs/v2.php/search/providers/fulltextsearch/search with the working Nextcloud web search, using the reported Fulltextsearch-Files setup and versions. Review the linked files_fulltextsearch issue #190 and the logged search path to determine whether the client request or server provider causes pagination to stop after three results.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.