Hi All,
We intentionally removed the primary index on our development to prevent unexpected full scans and we’ve planned to promote the same to prod once dev environments react positively. Initially, we removed the primary index in the dev system, and when raised a PR some of the existing functional test cases have started to fail in Jenkins with the below errors, though the below errors signals some expected indexes are missing in some queries but unable to find which queries are failing to run because of index missing. I’m new to CouchBase and understood every query needs an index and also I guess these queries are dynamic queries. Can someone help me to understand what indexes are needed here on the removal of PI, and how those queries can be identified? Almost in all the functional test cases, I get the below error without any information of which query is failing.
Any help is appreciated to find the query which is in need of an index that replaces the removed primary index.
org.springframework.data.couchbase.core.CouchbaseQueryExecutionException: {“msg”:"No index available on keyspace PG_Apps that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online.",“code”:4000}
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_202]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_202]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_202]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_202]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_202]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_202]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_202]
at java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:479) ~[na:1.8.0_202]
at com.yapstone.rest.framework.couchbase.ExtendedCouchbaseTemplate.queryN1QL(ExtendedCouchbaseTemplate.java:223) ~[com.yapstone.rest.framework-couchbase-common-9.6.0.jar!/:9.6.0]
at org.springframework.data.couchbase.core.CouchbaseTemplate.findByN1QL(CouchbaseTemplate.java:440) ~[org.springframework.data-spring-data-couchbase-3.1.2.RELEASE.jar!/:3.1.2.RELEASE]
Thanks,