-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-7834] Add couchdb index to marbles02 sample
Add sample couchdb index to marbles02 chaincode to support the chaincode queries. Also update the go chaincode instructions with index instructions, and fix the examples to indicate that chaincodeid should not be included in queries or indexes as of 1.1. Change-Id: I4a3b0dbeb83c6a2cf40c73fcee5aed20427acfca Signed-off-by: David Enyeart <enyeart@us.ibm.com>
- Loading branch information
Showing
3 changed files
with
42 additions
and
15 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
chaincode/marbles02/go/META-INF/statedb/couchdb/indexes/indexOwner.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"index":{"fields":["data.docType","data.owner"]},"ddoc":"indexOwnerDoc", "name":"indexOwner","type":"json"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
chaincode/marbles02/node/META-INF/statedb/couchdb/indexes/indexOwner.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"index":{"fields":["data.docType","data.owner"]},"ddoc":"indexOwnerDoc", "name":"indexOwner","type":"json"} |
dd12f88
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, I make a test following the rule
when creating marble index, but failed.
I remove the
data
incurl -i -X ...
and run, it can give result when I runpeer chaincode query...
, so I write this for confirmation.dd12f88
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! this is a read-only mirror. please read the contribution guide.
Thanks for the contribution! However, this is a read-only mirror. please read the contribution guide. Also, feel free to join us on chat!
dd12f88
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryjones Thanks for your reply, great!