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
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleandeleteRecord(String pi, boolean createTraceDocument, Path hotfolderPath) deleteRecord.static booleanreIndexCMSPage(CMSPage page, Collection<? extends IndexAugmenter> augmenters) static booleanreIndexPage(String pi, int page) reIndexPage.static booleanreIndexPage(String pi, int page, Collection<? extends IndexAugmenter> augmenters) reIndexPage.static booleanreIndexRecord(String pi) Writes the record into the hotfolder for re-indexing.static booleanreIndexRecord(String pi, Collection<? extends IndexAugmenter> augmenters) Writes the record into the hotfolder for re-indexing.static voidtriggerReIndexCMSPage(CMSPage page, List<? extends IndexAugmenter> augmenters) static voidRe-index in background thread to significantly decrease saving times.static voidtriggerReIndexRecord(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- aStringobject.
-
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, usetriggerReIndexRecordinstead.- Parameters:
pi- aStringobject.- 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, usetriggerReIndexRecordinstead.- Parameters:
pi- aStringobject.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- aStringobject.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- aStringobject.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- aStringobject.createTraceDocument- a boolean.hotfolderPath- aPathobject.- Returns:
- a boolean.
- Throws:
IOException- if any.
-
reIndexCMSPage
- Parameters:
page-augmenters-- Returns:
- true if export for reindexing successful; false otherwise
-