Package com.ikanow.infinit.e.data_model.index

Examples of com.ikanow.infinit.e.data_model.index.ElasticSearchManager.deleteMe()


        if (null == eventIndex) { // (if has been previously referenced in this process space)
          eventIndex = IndexManager.getIndex(AssociationFeaturePojoIndexMap.indexName_);
        }
        eventIndex.createAlias(AssociationFeaturePojoIndexMap.indexCollectionName_);
        if (bDeleteEventFeature) {
          eventIndex.deleteMe();
          eventIndex = IndexManager.createIndex(AssociationFeaturePojoIndexMap.indexName_, null, false, null, eventGazMapping, localSettingsEvent);
        }
        //entity feature
        String gazMapping = new Gson().toJson(new EntityFeaturePojoIndexMap.Mapping(), EntityFeaturePojoIndexMap.Mapping.class)
        ElasticSearchManager entityIndex = IndexManager.createIndex(EntityFeaturePojoIndexMap.indexName_, null, false, null, gazMapping, localSettingsGaz);
View Full Code Here


        if (null == entityIndex) { // (if has been previously referenced in this process space)
          entityIndex = IndexManager.getIndex(EntityFeaturePojoIndexMap.indexName_);
        }
        entityIndex.createAlias(EntityFeaturePojoIndexMap.indexCollectionName_);
        if (bDeleteEntityFeature) {
          entityIndex.deleteMe();
          entityIndex = IndexManager.createIndex(EntityFeaturePojoIndexMap.indexName_, null, false, null, gazMapping, localSettingsGaz);
        }
      }
     
      //DOCS - much more complicated than anything else
View Full Code Here

        ElasticSearchManager docIndex = IndexManager.createIndex(sGroupIndex, DocumentPojoIndexMap.documentType_, false, null, docMapping, localSettingsGroupIndex);
        if (null == docIndex) { // index has already been referenced, hence createIndex returns null
          docIndex = IndexManager.getIndex(sGroupIndex);
        }
        if (bClearIndex) {
          docIndex.deleteMe();
          docIndex = IndexManager.createIndex(sGroupIndex, DocumentPojoIndexMap.documentType_, false, null, docMapping, localSettingsGroupIndex);
        }
        if (null != docIndex) {
          try {
            docIndex.pingIndex(); // (wait until it's created itself)
View Full Code Here

        docIndex.closeIndex();
      }   
    }
    else {
      ElasticSearchManager docIndex = IndexManager.getIndex(sGroupIndex);
      docIndex.deleteMe();     
    }
    //TESTED (parent, children, and personal)
   
    // Also need to delete any records indexes:
    // It's a bit more complex because we're not exactly sure which indexes exist:
View Full Code Here

      if (true) {
       
        // (delete the index)
        System.out.println("Deleting index...");
        elasticManager = ElasticSearchManager.getIndex(indexName, sElasticHost + ":" + sElasticPort);
        elasticManager.deleteMe();
        //(also deletes the child index - same index, different type)

        // Create the index if necessary
        String sMapping = new Gson().toJson(new DocumentPojoIndexMap.Mapping(), DocumentPojoIndexMap.Mapping.class);
View Full Code Here

      if ((now - then) > periodInMs*ageOutTime) {
        //DEBUG
        //System.out.println("DELETE INDEX: " + (now - then)/(periodInMs*ageOutTime));
       
        ElasticSearchManager recordsIndex = IndexManager.getIndex(index);
        recordsIndex.deleteMe();     
      }//TESTED
    }
  }//TESTED
}
View Full Code Here

      System.out.print("****** FAILED: ");
      System.out.println(result.buildFailureMessage());
    }
   
    //Delete index (once testing complete)
    indexManager.deleteMe();
   
   
       
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.