nextcloud / nextcloud/fulltextsearch
Elasticsearch - Searchbox - Within current directory
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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