jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Number of indexed files grows after reindexing action

Open InAnYan opened this issue 1 year ago • 1 comments

JabRef version

5.13 (latest release)

Operating system

Windows

Details on version and operating system

No response

Checked with the latest development build (copy version output from About dialog)

  • [X] I made a backup of my libraries before testing the latest development version.
  • [X] I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Look at the background tasks. There will be status of full-text indexing. In this status you will see "N of M files were added to the index".
  2. Perform "Rebuild full-text search indexing" action (through main menu -> Tools -> "Rebuild full-text search indexing")
  3. Now, the N number will be zeroed, but M will be greater than it was.

As I understand, M should stay either constant or get bigger or smaller if the user added or removed entry from library.

Appendix

I don't have a big library with linked files to test it thoroughly.

But I found this bug, when I was implementing my own "linked file processing" logic. I was copy-pasting (not exactly true) from PdfIndexer code (and other classes), and I have found that the variable numOfIndexedFiles in IndexingTaskManager class was never decremented or unchanged when calling the rebuildIndex method.

InAnYan avatar Jun 17 '24 08:06 InAnYan

Will be fixed in https://github.com/JabRef/jabref/pull/11542

koppor avatar Jun 17 '24 18:06 koppor