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

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


        String eventGazMapping = new Gson().toJson(new AssociationFeaturePojoIndexMap.Mapping(), AssociationFeaturePojoIndexMap.Mapping.class)
        ElasticSearchManager eventIndex = IndexManager.createIndex(AssociationFeaturePojoIndexMap.indexName_, null, false, null, eventGazMapping, localSettingsEvent);
        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
View Full Code Here


        String gazMapping = new Gson().toJson(new EntityFeaturePojoIndexMap.Mapping(), EntityFeaturePojoIndexMap.Mapping.class)
        ElasticSearchManager entityIndex = IndexManager.createIndex(EntityFeaturePojoIndexMap.indexName_, null, false, null, gazMapping, localSettingsGaz);
        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);
        }
      }
View Full Code Here

        }
        else {
          docIndex = IndexManager.getIndex(sGroupIndex);
        }
        if (null != docIndex) { // should always be true
          docIndex.createAlias(sAliasIndex);
          docIndex.closeIndex();
        }
      }
      else if (!bParentsOnly) { // A sub-index of a parent      
       
View Full Code Here

//              ElasticSearchManager docIndex2 = IndexManager.getIndex(sGroupIndex);
//              docIndex2.deleteMe();
//            }
//          }
       
          docIndex.createAlias(sGroupIndex); // for indexing
            // (this is going to be tricky when the functionality is fully implemented
            //  because it will need to handle the parent index splitting)
          docIndex.createAlias(sAliasIndex); // for queries
          docIndex.closeIndex();
          // (do nothing on delete - that will be handled at the parent index level)
View Full Code Here

//          }
       
          docIndex.createAlias(sGroupIndex); // for indexing
            // (this is going to be tricky when the functionality is fully implemented
            //  because it will need to handle the parent index splitting)
          docIndex.createAlias(sAliasIndex); // for queries
          docIndex.closeIndex();
          // (do nothing on delete - that will be handled at the parent index level)
        }
      }
      //TESTED (parents, children, and personal + docs_ aliases)
View Full Code Here

      if (null == dummyGroupIndex) {
        dummyGroupIndex = IndexManager.getIndex(DocumentPojoIndexMap.dummyDocumentIndex_);
      }     
     
      // Just create an alias, so that queries work arbitrarily:
      dummyGroupIndex.createAlias(sGroupIndex); // (at some point we should delete the sGroupIndex alias, but leave it in for bw compatibility for now)
      dummyGroupIndex.createAlias(sAliasIndex); // (never index dummy indices so only need query index)
      // (do nothing on delete since don't have any docs in here anyway)
    }
  }
  //TESTED (including new docs_ alias)
View Full Code Here

        dummyGroupIndex = IndexManager.getIndex(DocumentPojoIndexMap.dummyDocumentIndex_);
      }     
     
      // Just create an alias, so that queries work arbitrarily:
      dummyGroupIndex.createAlias(sGroupIndex); // (at some point we should delete the sGroupIndex alias, but leave it in for bw compatibility for now)
      dummyGroupIndex.createAlias(sAliasIndex); // (never index dummy indices so only need query index)
      // (do nothing on delete since don't have any docs in here anyway)
    }
  }
  //TESTED (including new docs_ alias)
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.