Is there an api method to get transactions by metadata?

+1 vote
We have a specific requirement to search for transactions containing some specific metadata. As of now I'm using listwallettransactions method to retrieve the recent 5000 records and then search for the metadata in each transaction in the array. But when the chain size got bigger (let's say 50000 blocks), calling the listwallettransaction with the parameter as 50000, I noticed that the multichaind process in the node crashed. But I'm not sure if this is the reason it crashed.

So instead of risking using the same technique again, I'd like to know if there is a direct method to search all transactions for the metadata.
asked Apr 6, 2016 by Cypher

1 Answer

+1 vote
 
Best answer
Not yet, but we're aware of this as a potential feature to add in future. For now you would need to build a separate database of transaction metadata and search there.

To help us think about this, can you tell me anything about your use case in a broader context?
answered Apr 6, 2016 by MultiChain
selected Apr 21, 2016 by Cypher
As of now I could not disclose the exact application. But to put it in a simple way, we are using an user interface to get input data and we store it directly in the blockchain by using "sendwithmetadata". There is another UI where we can verify the existence of a metadata in the blockchain.
OK, in which case you might find this new docs page interesting:

http://www.multichain.com/developers/creating-data-streams/

Although you probably worked all that out already. What kind of searching do you want to do? By metadata prefix? Any binary substring? Text search?
Thank you. The metadata will be the sha1 hash of a plain text. As of now we're looking for both substring search and precise match.
...