-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change lucene index path to have sub directories #9887
Conversation
return Path.of(AppDirsFactory.getInstance().getUserDataDir(OS.APP_DIR_APP_NAME, SearchFieldConstants.VERSION, OS.APP_DIR_APP_AUTHOR)); | ||
return Path.of(AppDirsFactory.getInstance() | ||
.getUserDataDir(OS.APP_DIR_APP_NAME, | ||
"lucene" + File.separator + SearchFieldConstants.VERSION, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use private static final String FILE_SEPARATOR = System.getProperty("file.separator");
from OS.java in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the unused variable. I didn't want to be the first one using it. 😇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then use the nio variant: String separator = FileSystems.getDefault().getSeparator();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment
Os class has to be rewritten, unifying access to all filesystem and os variables |
For that we have JabrefDeskop with the sublcaseses |
Yes, so JabrefDesktop needs to be fixed. I don't like calling appdirs or environment vars directly in this class. It should keep the level of abstraction. |
Moved the code to NativeDesktop at |
Your code currently does not meet JabRef's code guidelines. The tool reviewdog already placed comments on GitHub to indicate the places. See the tab "Files" in you PR. Please carefully follow the setup guide for the codestyle. Afterwards, please run checkstyle locally and fix the issues. More information on code quality in JabRef is available at https://devdocs.jabref.org/getting-into-the-code/development-strategy.html. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging now as we have lucene 9.6 ugprade
Follow-up to #9584. Fixes https://github.com/JabRef/jabref-issue-melting-pot/issues/93.
Lucene-Index is now stored in
lucence/<version>
.Thus,
%APPDATA%\..\Local\org.jabref
looks more clean to the userDiscussion was done at #9676.
Upgrade from lucene94 to 95 was done after release of JabRef v5.9 and thus this change does not affect users basing on the release version. They will encounter a re-index in all cases.
Compulsory checks