Re: #couchdb #fabric-chaincode #fabric-sdk-java #couchdb #fabric-chaincode #fabric-sdk-java

Senthil Nathan


On Fri, May 1, 2020 at 10:44 PM <info@...> wrote:

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:

I'm not able to get the index to be created while deploying the chaincode on the peer. 
I cannot see any log entry like "[couchdb] CreateIndex ->" when checking peer logs.

I’m trying to create a simple index, it’s stored in the following path: `root-dir/src/main/resources/META-INF/statedb/couchdb/indexes`

with the filename `pocServicesIdx.json` and content:

{ "index": { "fields": [ "projectId", "data_type" ] }, "ddoc": "pocServicesDoc", "name": "pocServicesIdx", "type": "json" }

I’m able to create an index manually doing it from the Fauxton admin console so the syntax should be valid. 

The problem is that I’m not even getting any error logs related to creating indexes when deploying the chaincode when running the peer with flag FABRIC_LOGGING_SPEC

Using Fabric 2.0.0 version. 

Can anybody help or give some suggestions?

Join to automatically receive all group messages.