#couchdb #fabric-chaincode #fabric-sdk-java #fabric-sdk-java #fabric-chaincode #couchdb


Marek Malik
 

I'm trying to create a CouchDB index while deploying the Java-based chain code.
I was following the documentation from there:
https://hyperledger-fabric.readthedocs.io/en/release-2.0/couchdb_tutorial.html#verify-index-was-deployed

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 fabric@lists.hyperledger.org to automatically receive all group messages.