We are using Spring Data Couchbase project and when trying to execute a existing view in production running into the below error
HTTP Status 500 - org.springframework.dao.InvalidDataAccessResourceUsageException:
Could not load view "fooCount" for design doc "_design/foo";
nested exception is com.couchbase.client.protocol.views.InvalidViewException:
Could not load view "fooCount" for design doc "_design/foo"
Below is our Spring Data Repository Definition
public interface FooRepository extends CrudRepository<Foo,String>{
@View(designDocument="_design/foo",viewName="fooCount")
public Long fooCount();
}
Can anyone provide an example of executing query using couchbase views? The documentation seems to be missing an example of doing it.