Examples of dropIndex()


Examples of com.mongodb.DBCollection.dropIndex()

    private void dropObsoleteChangeSetExecutionIndices() {
        String indexName = "type_changeSetExecution_file_1_changeId_1_author_1_resourcePath_1";
        DBCollection collection = getMongeezCollection();
        for (DBObject dbObject : collection.getIndexInfo()) {
            if (indexName.equals(dbObject.get("name"))) {
                collection.dropIndex(indexName);
            }
        }
    }

    private void ensureChangeSetExecutionIndex() {
View Full Code Here

Examples of com.orientechnologies.orient.core.index.OIndexManager.dropIndex()

        "fOne", OType.INTEGER), new int[] { database.getClusterIdByName(CLASS_NAME) }, null, null);

    assertNotNull(indexManager.getIndex("anotherproperty"));
    assertNotNull(indexManager.getClassIndex(CLASS_NAME, "anotherproperty"));

    indexManager.dropIndex("anotherproperty");

    assertNull(indexManager.getIndex("anotherproperty"));
    assertNull(indexManager.getClassIndex(CLASS_NAME, "anotherproperty"));
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.index.OIndexManager.dropIndex()

    indexManager.createIndex("simplekeytwo", OClass.INDEX_TYPE.UNIQUE.toString(), new OSimpleKeyIndexDefinition(OType.INTEGER),
        null, null, null);

    assertNotNull(indexManager.getIndex("simplekeytwo"));

    indexManager.dropIndex("simplekeytwo");

    assertNull(indexManager.getIndex("simplekeytwo"));
  }

  @Test
View Full Code Here

Examples of com.orientechnologies.orient.core.index.OIndexManager.dropIndex()

    indexManager.createIndex("nullkeytwo", OClass.INDEX_TYPE.UNIQUE.toString(), null, null, null, null);

    assertNotNull(indexManager.getIndex("nullkeytwo"));

    indexManager.dropIndex("nullkeytwo");

    assertNull(indexManager.getIndex("nullkeytwo"));
  }

  @Test
View Full Code Here

Examples of com.orientechnologies.orient.core.index.OIndexManager.dropIndex()

        "indexManagerTestClassTwo", "fOne", OType.INTEGER), new int[] { database.getClusterIdByName("indexManagerTestClassTwo") },
        null, null);

    assertFalse(indexManager.getClassIndexes("indexManagerTestClassTwo").isEmpty());

    indexManager.dropIndex("twoclassproperty");

    assertTrue(indexManager.getClassIndexes("indexManagerTestClassTwo").isEmpty());
  }

  @Test(dependsOnMethods = "testDropAllClassIndexes")
View Full Code Here

Examples of com.orientechnologies.orient.core.index.OIndexManager.dropIndex()

  @Test(dependsOnMethods = "testDropAllClassIndexes")
  public void testDropNonExistingClassIndex() {
    final OIndexManager indexManager = database.getMetadata().getIndexManager();

    indexManager.dropIndex("twoclassproperty");
  }

  @Test(dependsOnMethods = { "createCompositeIndexTestWithListener", "createCompositeIndexTestWithoutListener",
      "testCreateOnePropertyIndexTest" })
  public void testGetClassIndex() {
View Full Code Here

Examples of com.orientechnologies.orient.core.index.OIndexManager.dropIndex()

            final ODocument metadata = indexToRecreate.getMetadata();
            final List<String> fields = indexMetadata.getIndexDefinition().getFields();
            final String[] fieldsToIndex = fields.toArray(new String[fields.size()]);

            indexManager.dropIndex(indexMetadata.getName());
            owner.createIndex(indexMetadata.getName(), indexMetadata.getType(), null, metadata, indexMetadata.getAlgorithm(),
                fieldsToIndex);
          }
        }
      }
View Full Code Here

Examples of com.orientechnologies.orient.core.index.OIndexManager.dropIndex()

          synchronized (manualIndexLock) {
            final OIndexManager indexManager = getRawGraph().getMetadata().getIndexManager();
            final OIndex index = indexManager.getIndex(indexName);
            final String recordMapIndexName = index.getConfiguration().field(OrientIndex.CONFIG_RECORD_MAP_NAME);

            indexManager.dropIndex(indexName);
            if (recordMapIndexName != null)
              getRawGraph().getMetadata().getIndexManager().dropIndex(recordMapIndexName);

            saveIndexConfiguration();
            return null;
View Full Code Here

Examples of com.orientechnologies.orient.core.index.OIndexManager.dropIndex()

  private void dropClassIndexes(final OClass cls) {
    final ODatabaseRecord database = getDatabase();
    final OIndexManager indexManager = database.getMetadata().getIndexManager();

    for (final OIndex<?> index : indexManager.getClassIndexes(cls.getName()))
      indexManager.dropIndex(index.getName());
  }

  private OClass cascadeCreate(final Class<?> javaClass) {
    final OClassImpl cls = (OClassImpl) createClass(javaClass.getSimpleName());
View Full Code Here

Examples of com.orientechnologies.orient.core.index.OIndexManagerProxy.dropIndex()

      // drop automatically created indexes
      if (!indexName.equalsIgnoreCase(EXPORT_IMPORT_MAP_NAME)) {
        listener.onMessage("\n- Index '" + indexName + "'...");

        indexManager.dropIndex(indexName);
        indexesToRebuild.remove(indexName.toLowerCase());

        int[] clusterIdsToIndex = new int[clustersToIndex.size()];

        int i = 0;
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.