Search - Stream

+1 vote
Hello

Here is my use case and would be great to hear any suggestion:

I have a json with multiple tags and i want to store various versions of it on a stream.I can hex the json and store that as a metadata within the stream as supported currently.can use custom fields to store values for every insert/write/publish into the stream.

is there a way i can search through the stream not only the key i had used to store but the actual values within each tag of the json. We are constantly facing the need to search for a value within the tags.
asked Oct 24, 2016 by 06arnab

1 Answer

0 votes

I'm afraid this is not currently possible, but there is a workaround, to manually create an index inside the stream itself, or in a separate stream. For example if your JSON item is {"key1":"value1","key2":"value2"} then you could create two extra stream items with keys idx_value1 and idx_value2, whose value is the original stream item txid, then retrieve use those keys.

answered Oct 25, 2016 by MultiChain
...