nextcloud / nextcloud/fulltextsearch

Open search result directly

Open
#824 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Dear Community,

unfortunately, the full text search results are not linked with the files directly.

Inside the unified search window other results are linked with the file. So I was modifying /lib/Search/UnifiedSearchProvider.php:

Instead of:
$this->get('link', $unified, $document->getLink()),

I am now using:
$this->get('link', $unified, "/f/".$document->getId()),
(but this fix is not working when using NC in a subdirectory)

How can I change this behaviour in the seperate fulltextsearch result page? And isn't this something what should be considered for general? After closing the file I am also able to locate it.

Thanks!

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 in /lib/Search/UnifiedSearchProvider.php and trace how the separate full-text search results build their file links. Compare that path with the unified search link shown in the issue, then verify direct opening when Nextcloud runs in a subdirectory. Done means full-text results open the corresponding file reliably in both root and subdirectory installations.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.