Package io.goobi.viewer.controller
Class IndexerTools
java.lang.Object
io.goobi.viewer.controller.IndexerTools
Utility class for Solr indexer interactions (indexing, deleting, etc.).
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
deleteRecord
(String pi, boolean createTraceDocument, Path hotfolderPath) deleteRecord.static boolean
reIndexCMSPage
(CMSPage page, Collection<? extends IndexAugmenter> augmenters) static boolean
reIndexPage
(String pi, int page) reIndexPage.static boolean
reIndexPage
(String pi, int page, Collection<? extends IndexAugmenter> augmenters) reIndexPage.static boolean
reIndexRecord
(String pi) Writes the record into the hotfolder for re-indexing.static boolean
reIndexRecord
(String pi, Collection<? extends IndexAugmenter> augmenters) Writes the record into the hotfolder for re-indexing.static void
triggerReIndexCMSPage
(CMSPage page, List<? extends IndexAugmenter> augmenters) static void
Re-index in background thread to significantly decrease saving times.static void
triggerReIndexRecord
(String pi, List<? extends IndexAugmenter> augmenters)
-
Field Details
-
SUFFIX_FULLTEXT_CROWDSOURCING
ConstantSUFFIX_FULLTEXT_CROWDSOURCING="_txtcrowd"
- See Also:
-
SUFFIX_ALTO_CROWDSOURCING
ConstantSUFFIX_ALTO_CROWDSOURCING="_altocrowd"
- See Also:
-
SUFFIX_USER_GENERATED_CONTENT
ConstantSUFFIX_USER_GENERATED_CONTENT="_ugc"
- See Also:
-
SUFFIX_CMS
ConstantSUFFIX_CMS="_cms"
- See Also:
-
-
Method Details
-
triggerReIndexRecord
Re-index in background thread to significantly decrease saving times.- Parameters:
pi
- aString
object.
-
triggerReIndexRecord
-
triggerReIndexCMSPage
- Parameters:
page
-augmenters
-
-
reIndexRecord
Writes the record into the hotfolder for re-indexing. Modules can contribute data for re-indexing. Execution of method can take a while, so if performance is of importance, usetriggerReIndexRecord
instead.- Parameters:
pi
- aString
object.- Returns:
- a boolean.
- Throws:
DAOException
- if any.RecordNotFoundException
- if any.
-
reIndexRecord
public static boolean reIndexRecord(String pi, Collection<? extends IndexAugmenter> augmenters) throws DAOException, RecordNotFoundException Writes the record into the hotfolder for re-indexing. Modules can contribute data for re-indexing. Execution of method can take a while, so if performance is of importance, usetriggerReIndexRecord
instead.- Parameters:
pi
- aString
object.augmenters
-- Returns:
- true if export for reindexing successful; false otherwise
- Throws:
DAOException
- if any.RecordNotFoundException
- if any.
-
reIndexPage
public static boolean reIndexPage(String pi, int page) throws DAOException, PresentationException, IndexUnreachableException, IOException reIndexPage.
- Parameters:
pi
- aString
object.page
- a int.- Returns:
- a boolean.
- Throws:
DAOException
- if any.PresentationException
- if any.IndexUnreachableException
- if any.IOException
- if any.
-
reIndexPage
public static boolean reIndexPage(String pi, int page, Collection<? extends IndexAugmenter> augmenters) throws PresentationException, IndexUnreachableException, IOException reIndexPage.
- Parameters:
pi
- aString
object.page
- a int.augmenters
-- Returns:
- true if export for reindexing successful; false otherwise
- Throws:
DAOException
- if any.PresentationException
- if any.IndexUnreachableException
- if any.IOException
- if any.
-
deleteRecord
public static boolean deleteRecord(String pi, boolean createTraceDocument, Path hotfolderPath) throws IOException deleteRecord.
- Parameters:
pi
- aString
object.createTraceDocument
- a boolean.hotfolderPath
- aPath
object.- Returns:
- a boolean.
- Throws:
IOException
- if any.
-
reIndexCMSPage
- Parameters:
page
-augmenters
-- Returns:
- true if export for reindexing successful; false otherwise
-