parentCommunityId = getRootCommunity(parentCommunityId);
if (null != parentCommunityId) {
String sParentGroupIndex = new StringBuffer("doc_").append(parentCommunityId.toString()).toString();
ElasticSearchManager docIndex = IndexManager.getIndex(sParentGroupIndex);
docIndex.removeAlias(sGroupIndex);
docIndex.removeAlias(sAliasIndex);
docIndex.closeIndex();
}
}
else {
ElasticSearchManager docIndex = IndexManager.getIndex(sGroupIndex);