Class CollectionUtils

java.lang.Object
nl.andrewl.concord_server.util.CollectionUtils

public class CollectionUtils extends Object
  • Constructor Details

    • CollectionUtils

      public CollectionUtils()
  • Method Details

    • ensureIndexes

      public static void ensureIndexes(org.dizitart.no2.NitriteCollection collection, Map<String,org.dizitart.no2.IndexType> indexMap)
      Ensures that the given nitrite collection has exactly the given set of indexes. It will remove any non-conforming indexes, and create new ones as necessary.
      Parameters:
      collection - The collection to operate on.
      indexMap - A mapping containing keys referring to fields, and values that represent the type of index that should be on that field.