Package com.dotcms.content.elasticsearch.business

Examples of com.dotcms.content.elasticsearch.business.ESIndexAPI


      WorkflowImportExportUtil.getInstance().exportWorkflows(file);
     
      IndiciesInfo info=APILocator.getIndiciesAPI().loadIndicies();

      file = new File(backupTempFilePath + "/index_working.json");
      new ESIndexAPI().backupIndex(info.working, file);
      
     
      file = new File(backupTempFilePath + "/index_live.json");
      new ESIndexAPI().backupIndex(info.live, file);


     
     
     
View Full Code Here


            config.setHosts( hosts);

            // reuse or create new indexes as needed
            String indexAlias = dataMap.getString("indexAlias");
            ESIndexAPI iapi=new ESIndexAPI();
            Map<String,String> aliasMap=iapi.getAliasToIndexMap(APILocator.getSiteSearchAPI().listIndices());

            if(counter==1){
              if(indexAlias.equals(APILocator.getIndiciesAPI().loadIndicies().site_search)){
                Logger.info(this, "Index Alias is DEFAULT");
                  indexName = APILocator.getIndiciesAPI().loadIndicies().site_search;
View Full Code Here



    public boolean deleteIndex(String indexName){
      validateUser();
      ESIndexAPI esapi= new ESIndexAPI();

      return  APILocator.getContentletIndexAPI().delete(indexName);
    }
View Full Code Here

            }
        }
       
        String indexName=null;
        if(indexAlias!=null) {
            ESIndexAPI iapi=new ESIndexAPI();
            indexName=iapi.getAliasToIndexMap(siteSearchAPI.listIndices()).get(indexAlias);
            if(indexName==null) {
                results.setError("Index Alias not found: "+indexAlias);
                return results;
          }
        }
View Full Code Here

       
        AdminLogger.log(ESIndexResource.class, "deactivateIndex", "Index deactivated: " + indexName);
    }
   
    public static long indexDocumentCount(String indexName) {
        ESIndexAPI esapi = APILocator.getESIndexAPI();
        Map<String, IndexStatus> indexInfo = esapi.getIndicesAndStatus();
        IndexStatus status = indexInfo.get(indexName);
        return (status !=null && status.getDocs() != null) ? status.getDocs().getNumDocs(): 0;
    }
View Full Code Here

TOP

Related Classes of com.dotcms.content.elasticsearch.business.ESIndexAPI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.