nextcloud / nextcloud/fulltextsearch
Files are not removed from the index when deleting the directory in which these files were located
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 234
- Forks
- 64
- Avg merge
- 6h 18m
- Merged PRs (30d)
- 10
Description
HI, i use nextcloud 15.0.14, Full text search 1.2.10, Full text search - Elasticsearch Platform 1.2.6, Full text search - Files 1.2.10, elasticsearch 6.8.23.
This problem also occurs when using nextcloud 20.0.4, Full text search 20.0.2, Full text search - Elasticsearch Platform 20.0.3, Full text search - Files 20.0.4 , elasticsearch 6.8.23, Haven't looked at other versions.
I noticed that after searching in the line with the number of results, a larger number is displayed than the actual number of files.
After that, I found that these files were not removed from the oc_fulltextsearch_indexes table. And remained in elastic.
The error is reproduced as follows:
- Run occ fulltextsearch:live
- I create a directory dir
- I add files "1.txt" and "2.txt" to it with the content "test"
- I enter the search query "test", the result displays the inscription "the search in Files for 'test' returned 2 results in 15 ms." and two files "1.txt" and "2.txt"
- I delete the "dir" directory
- I enter the search query "test", as a result, the inscription "the search in Files for 'test ' returned 2 results in 14 ms." is displayed, but the files found are not displayed, because they are removed.
The problem is that it is displayed that 2 results were found, although in fact there are no results.
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 by running occ fulltextsearch:live and reproduce the directory deletion sequence, then trace how deleted directories are handled in the oc_fulltextsearch_indexes table and Elasticsearch. Done means deleting a directory removes its indexed files so a search for their content reports zero results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, php
- Domain
- search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100