mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-12 20:43:18 +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>
|
* <P>
|
||||||
* Because the DB migration may be initialized by commandline or any one of
|
* 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
|
* the many DSpace webapps, this checks for the existence of a temporary
|
||||||
* file to know when Discovery/Solr needs reindexing.
|
* file, and the discovery.autoReindex setting to know when
|
||||||
*
|
* Discovery/Solr needs reindexing.
|
||||||
* @return whether reindex flag is true/false
|
* @return whether reindexing should happen.
|
||||||
*/
|
*/
|
||||||
public static boolean getReindexDiscovery() {
|
public static boolean getReindexDiscovery() {
|
||||||
// Simply check if the flag file exists
|
boolean autoReindex = DSpaceServicesFactory.getInstance()
|
||||||
File reindexFlag = new File(reindexDiscoveryFilePath);
|
.getConfigurationService()
|
||||||
return reindexFlag.exists();
|
.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.
|
* Internal class to actually perform re-indexing in a separate thread.
|
||||||
* (See checkReindexDiscovery() method)>
|
* (See checkReindexDiscovery() method).
|
||||||
*/
|
*/
|
||||||
private static class ReindexerThread extends Thread {
|
private static class ReindexerThread extends Thread {
|
||||||
private final IndexingService indexer;
|
private final IndexingService indexer;
|
||||||
|
@@ -18,6 +18,15 @@ discovery.search.server = ${solr.server}/search
|
|||||||
# discovery.index.ignore-authority = false
|
# discovery.index.ignore-authority = false
|
||||||
discovery.index.projection=dc.title,dc.contributor.*,dc.date.issued
|
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
|
# Value used for the namedresourcetype facet used by the mydspace
|
||||||
# <sort-value>\n|||\n<display-value>###<authority-value>
|
# <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
|
||||||
|
Reference in New Issue
Block a user