mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-06 02:24:30 +00:00
Added a dialog to ask user whether they want to upgrade index
This commit is contained in:
@@ -313,3 +313,6 @@ GlobalEditListPanel.keywordDupesSkipped.text={0} keyword was already in the list
|
||||
GlobalEditListPanel.keywordDupesSkippedPlural.text={0} keywords were already in the list.
|
||||
GlobalEditListPanel.keywordErrors.text={0} keyword could not be parsed. Please review and try again.
|
||||
GlobalEditListPanel.keywordErrorsPlural.text={0} keywords could not be parsed. Please review and try again.
|
||||
SolrSearchService.IndexUpgradeDialog.title=Index Upgrade Required In Order To Open Case
|
||||
SolrSearchService.IndexUpgradeDialog.msg=<html>Index upgrade can be a very lengthy operation. <br />Upon upgrade you will be able to see existing key word search results and perform literal key word searches on the existing index.<br />However, you will not be able to add new text to the index or performing regex searches.<br /> You must re-run Keyword Search Ingest Module if you want to index new text or performing regex searches.<br /> Do you wish to proceed with the index upgrade?.</html>
|
||||
SolrSearchService.IndexUpgradeDialog.upgradeDeclinedMsg=Index upgrade was declined by user
|
||||
@@ -96,6 +96,7 @@ class IndexHandling {
|
||||
}
|
||||
}
|
||||
|
||||
// ELTODO This is NTH:
|
||||
static void createReferenceConfigSetCopy(String indexPath) throws AutopsyService.AutopsyServiceException {
|
||||
File pathToConfigSet = new File("");
|
||||
Logger logger = Logger.getLogger(IndexHandling.class.getName()); // ELTODO REMOVE
|
||||
|
||||
@@ -166,9 +166,11 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService
|
||||
if (RuntimeProperties.coreComponentsAreActive()) {
|
||||
//pop up a message box to indicate the restrictions on adding additional
|
||||
//text and performing regex searches and give the user the option to decline the upgrade
|
||||
boolean upgradeDeclined = false;
|
||||
if (upgradeDeclined) {
|
||||
throw new AutopsyServiceException("ELTODO");
|
||||
if (!KeywordSearchUtil.displayConfirmDialog(NbBundle.getMessage(this.getClass(), "SolrSearchService.IndexUpgradeDialog.title"),
|
||||
NbBundle.getMessage(this.getClass(), "SolrSearchService.IndexUpgradeDialog.msg"),
|
||||
KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN)) {
|
||||
// upgrade declined - throw exception
|
||||
throw new AutopsyServiceException(NbBundle.getMessage(this.getClass(), "SolrSearchService.IndexUpgradeDialog.upgradeDeclinedMsg"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,8 +197,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService
|
||||
success = true; // ELTODO remove
|
||||
if (!success) {
|
||||
// delete the new directories
|
||||
|
||||
// close the upgraded index?
|
||||
new File(newIndexDir).delete();
|
||||
throw new AutopsyServiceException("ELTODO");
|
||||
}
|
||||
|
||||
@@ -207,12 +208,13 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService
|
||||
success = true; // ELTODO remove
|
||||
if (!success) {
|
||||
// delete the new directories
|
||||
|
||||
// close the upgraded index?
|
||||
new File(newIndexDir).delete();
|
||||
// ELTODO close the upgraded index?
|
||||
throw new AutopsyServiceException("ELTODO");
|
||||
}
|
||||
|
||||
// currentVersionIndexDir = upgraded index dir
|
||||
// set the upgraded reference index as the index to be used for this case
|
||||
currentVersionIndexDir = newIndexDir;
|
||||
}
|
||||
|
||||
// open currentVersionIndexDir index
|
||||
|
||||
Reference in New Issue
Block a user