DATACOUCH-169 - Automatic index creation

Main indexes (ie indexes that can be used by repositories to retrieve ALL the documents of a particular entity type) are covered.

Repository interfaces can be annotated with an annotation for each type of main index that can be automatically created.

The IndexManager is responsible for creating said indexes (potentially skipping creation if an index is already in place, or if the IndexManager has been configured to skip it, see constructor).
Since IndexManager is created as a bean (either in JavaConfig or xml), there can be a different instance eg. in Prod vs Dev.

Added doc and integration test.

Renamed package core.view to core.query since it now contains various non-view related annotations and classes.
This commit is contained in:
Simon Baslé
2015-10-23 15:50:06 +02:00
parent 8ed7d7e336
commit 40d131aab0
51 changed files with 902 additions and 67 deletions

View File

@@ -20,7 +20,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.data.couchbase.config.AbstractCouchbaseConfiguration;
import org.springframework.data.couchbase.core.CouchbaseTemplate;
import org.springframework.data.couchbase.core.WriteResultChecking;
import org.springframework.data.couchbase.core.view.Consistency;
import org.springframework.data.couchbase.core.query.Consistency;
@Configuration
public class UnitTestApplicationConfig extends AbstractCouchbaseConfiguration {