2462 fix deprecation tags on old delete method for index

This commit is contained in:
William Schaefer 2017-03-30 10:48:39 -04:00
parent f6cb425445
commit 072815cb8e
3 changed files with 5 additions and 4 deletions

View File

@ -685,7 +685,7 @@ public class Case {
for (KeywordSearchService searchService : Lookup.getDefault().lookupAll(KeywordSearchService.class
)) {
searchService.deleteCores(metadata.getTextIndexName(), metadata.getCaseDirectory());
searchService.deleteCore(metadata.getTextIndexName(), metadata.getCaseDirectory());
}
if (CaseType.MULTI_USER_CASE == metadata.getCaseType()) {

View File

@ -55,9 +55,10 @@ public interface KeywordSearchService extends Closeable {
* @param textIndexName The text index name.
*
* @throws KeywordSearchServiceException if unable to delete.
* @deprecated deleteCore(String textIndexName, String caseDirectory) should be used instead to support newer solr cores
*/
public void deleteTextIndex(String textIndexName) throws KeywordSearchServiceException;
public void deleteCores(String textIndexName, String caseDirectory) throws KeywordSearchServiceException;
public void deleteCore(String textIndexName, String caseDirectory) throws KeywordSearchServiceException;
}

View File

@ -148,8 +148,8 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService {
* Deletes Solr core for a case.
*
* @param coreName The core name.
* @deprecated deleteCore(String textIndexName, String caseDirectory) should be used instead to support newer solr cores
*/
@Deprecated
@Override
public void deleteTextIndex(String coreName) throws KeywordSearchServiceException {
//If this was called with the metadata.textIndexName then this will only work on solr 4 cores
@ -393,7 +393,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService {
* @throws KeywordSearchServiceException
*/
@Override
public void deleteCores(String textIndexName, String caseDirectory) throws KeywordSearchServiceException {
public void deleteCore(String textIndexName, String caseDirectory) throws KeywordSearchServiceException {
String coreName = textIndexName;
if (!caseDirectory.isEmpty()) {
IndexMetadata indexMetadata;