mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Merge pull request #2392 from mwoodiupui/DS-3658
[DS-3658] Configure ReindexerThread disable reindex
This commit is contained in:
@@ -1190,14 +1190,15 @@ public class DatabaseUtils {
|
||||
* <P>
|
||||
* Because the DB migration may be initialized by commandline or any one of
|
||||
* the many DSpace webapps, this checks for the existence of a temporary
|
||||
* file to know when Discovery/Solr needs reindexing.
|
||||
*
|
||||
* @return whether reindex flag is true/false
|
||||
* file, and the discovery.autoReindex setting to know when
|
||||
* Discovery/Solr needs reindexing.
|
||||
* @return whether reindexing should happen.
|
||||
*/
|
||||
public static boolean getReindexDiscovery() {
|
||||
// Simply check if the flag file exists
|
||||
File reindexFlag = new File(reindexDiscoveryFilePath);
|
||||
return reindexFlag.exists();
|
||||
boolean autoReindex = DSpaceServicesFactory.getInstance()
|
||||
.getConfigurationService()
|
||||
.getBooleanProperty("discovery.autoReindex", true);
|
||||
return (autoReindex && new File(reindexDiscoveryFilePath).exists());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1222,7 +1223,7 @@ public class DatabaseUtils {
|
||||
|
||||
/**
|
||||
* Internal class to actually perform re-indexing in a separate thread.
|
||||
* (See checkReindexDiscovery() method)>
|
||||
* (See checkReindexDiscovery() method).
|
||||
*/
|
||||
private static class ReindexerThread extends Thread {
|
||||
private final IndexingService indexer;
|
||||
|
@@ -18,11 +18,20 @@ discovery.search.server = ${solr.server}/search
|
||||
# discovery.index.ignore-authority = false
|
||||
discovery.index.projection=dc.title,dc.contributor.*,dc.date.issued
|
||||
|
||||
# Allow auto-reindexing.
|
||||
# If any database migrations are applied to your database (via Flyway), then a
|
||||
# reindex flag is always written to '[dspace]/solr/search/conf/reindex.flag'.
|
||||
# Whenever the DSpace webapp is (re)started, it checks whether the autoReindex
|
||||
# property is enabled AND that such a file exists. If the two conditions are
|
||||
# satisfied, a background reindex of all content is triggered in Discovery.
|
||||
# Defaults to true: auto-reindexing is enabled.
|
||||
#discovery.autoReindex = true
|
||||
|
||||
# Value used for the namedresourcetype facet used by the mydspace
|
||||
# <sort-value>\n|||\n<display-value>###<authority-value>
|
||||
# the separator between the sort-value and the display-value \n|||\n must
|
||||
# the separator between the sort-value and the display-value \n|||\n must
|
||||
# match the value of the discovery.solr.facets.split.char defined above
|
||||
# the sort-value can be used to force a fixed order for the facet if it is
|
||||
# the sort-value can be used to force a fixed order for the facet if it is
|
||||
# configured in the discovery.xml to be sorted by value
|
||||
discovery.facet.namedtype.item = 000item\n|||\nArchived###item
|
||||
discovery.facet.namedtype.workspace = 001workspace\n|||\nWorkspace###workspace
|
||||
|
Reference in New Issue
Block a user