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:
@@ -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 {
|
||||
|
||||
@@ -17,8 +17,11 @@
|
||||
|
||||
<!-- You can use these logger configurations to log more details:
|
||||
- log the Couchbase queries produced by the framework
|
||||
- log details of the parsing of SpEL in N1QL inline queries-->
|
||||
- log details of the parsing of SpEL in N1QL inline queries
|
||||
- log additional debug info during automatic index creation
|
||||
-->
|
||||
<logger name="org.springframework.data.couchbase.repository.query" level="debug"/>
|
||||
<logger name="org.springframework.data.couchbase.repository.query.StringN1qlBasedQuery" level="trace"/>
|
||||
<logger name="org.springframework.data.couchbase.repository.support.IndexManager" level="debug"/>
|
||||
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user