nextcloud / nextcloud/fulltextsearch

Elasticsearch - Searchbox - Within current directory

Open
#547 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hey,

searching in the root directory doesn't give any result when using "within current directory". A searchquery is started but no results are shown.

I think the problem could come from this part of the code:
private function searchQueryWithinDir(ISearchRequest $request) {
$currentDir = $request->getOption('files_within_dir');
if ($currentDir === '') {
return;
}

Tested in files_fulltextsearch 1.2.5 and 1.2.8 on Nextcloud 15.0.4.

regards

chris

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 the searchQueryWithinDir(ISearchRequest $request) function and inspect how an empty files_within_dir value is handled for searches from the root directory. Reproduce the issue with “within current directory” enabled, then verify that a root-directory search returns results without breaking searches in other directories.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, php
Domain
backend, 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.