List of usage examples for org.springframework.data.mongodb.core MongoOperations indexOps
IndexOperations indexOps(Class<?> entityClass);
From source file:org.tylproject.data.mongo.MongoModelConfig.java
public static void createIndexes(MongoOperations mongoOps) { mongoOps.indexOps(Party.class).ensureIndex(new Index().on("code", Sort.Direction.ASC)); mongoOps.indexOps(Party.class) .ensureIndex(new Index().on("partyIdentifier.identifier", Sort.Direction.ASC)); }