liststreamqueryitems behavior

+2 votes
I published 2 items on a stream one with key: "key1" and the other is with keys: "key5" and "key6". By using liststreamqueryitems with the 3 keys (key1, key5 and key5), I got nothing. The expected behavior is to get all items which contain any of mentioned keys. liststreamqueryitems uses "AND" between keys not "OR" as even the second item couldn't be retrieved. How can we query items with multiple keys and we can get all items that contain one of those keys?
asked Jun 1, 2020 by mina

1 Answer

+1 vote

I'm afraid that by design, liststreamqueryitems performs an AND operation. If you want to do an OR search, you should use multiple liststreamkeyitems or liststreamqueryitems requests for each of the conditions and combine them together in the application.

answered Jun 2, 2020 by MultiChain
...