fulltextsearch icon indicating copy to clipboard operation
fulltextsearch copied to clipboard

Files are not removed from the index when deleting the directory in which these files were located

Open sergii1 opened this issue 3 years ago • 0 comments

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:

  1. Run occ fulltextsearch:live
  2. I create a directory dir
  3. I add files "1.txt" and "2.txt" to it with the content "test"
  4. 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"
  5. I delete the "dir" directory
  6. 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.

sergii1 avatar Jul 28 '22 09:07 sergii1