Skip to content
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

Set default value for fulltext indexing to false #9516

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/org/jabref/gui/search/GlobalSearchBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ private void initSearchModifierButtons() {
fulltextButton.setSelected(searchPreferences.isFulltext());
fulltextButton.setTooltip(new Tooltip(Localization.lang("Fulltext search")));
initSearchModifierButton(fulltextButton);
fulltextButton.disableProperty().bind(preferencesService.getFilePreferences().fulltextIndexLinkedFilesProperty().not());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still Needs to be bound to the UI button state and maybe we can bind managed (completely removed from the UI) to the fulltextIndexLinkedFilesProperty property

fulltextButton.setOnAction(event -> {
searchPreferences.setSearchFlag(SearchRules.SearchFlags.FULLTEXT, fulltextButton.isSelected());
performSearch();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/jabref/preferences/JabRefPreferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ private JabRefPreferences() {
defaults.put(SEARCH_DISPLAY_MODE, SearchDisplayMode.FILTER.toString());
defaults.put(SEARCH_CASE_SENSITIVE, Boolean.FALSE);
defaults.put(SEARCH_REG_EXP, Boolean.FALSE);
defaults.put(SEARCH_FULLTEXT, Boolean.TRUE);
defaults.put(SEARCH_FULLTEXT, Boolean.FALSE);
defaults.put(SEARCH_KEEP_SEARCH_STRING, Boolean.FALSE);
defaults.put(SEARCH_KEEP_GLOBAL_WINDOW_ON_TOP, Boolean.TRUE);

Expand Down Expand Up @@ -692,7 +692,7 @@ private JabRefPreferences() {
// Download files by default
defaults.put(DOWNLOAD_LINKED_FILES, true);
// Create Fulltext-Index by default
defaults.put(FULLTEXT_INDEX_LINKED_FILES, true);
defaults.put(FULLTEXT_INDEX_LINKED_FILES, false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I would leave this as true and only the search button deactivated for the moment

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's what we literally discussed yesterday and decided againstindexing fulltext by default.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally changed my mind after the meeting.

If indexing is disabled, users will try to use file search, but it will not work. Users will not know that they first have to enable indexing for file search to work. They will report that file search is broken. Disable indexing only, once users are somehow notified that file search can only be used, if indexing is enabled.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we discussed also that this is not to be implemented as the lucene search pr of @btut changes so many things with the search that there should not be made any major changes in behaviour, GUI or logic, since all this work would be thrown away when or have to be undone before merging the lucene PR.
Decisions were made for a reason yesterday. Don't start rediscussing what we already decided yesterday.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yesterdays discussion notes: #9491 (comment)


String defaultExpression = "**/.*[citationkey].*\\\\.[extension]";
defaults.put(AUTOLINK_REG_EXP_SEARCH_EXPRESSION_KEY, defaultExpression);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public EnumSet<SearchFlags> getSearchFlags() {
return EnumSet.copyOf(searchFlags);
}

protected ObservableSet<SearchFlags> getObservableSearchFlags() {
public ObservableSet<SearchFlags> getObservableSearchFlags() {
return searchFlags;
}

Expand Down