How to query note field using Indexer?

Hi everyone,

I push data to store in the note field of my transaction

const enc = new TextEncoder();
let note = enc.encode('[{"_id":"60c9dc007b9206a8a641f2e8"]}]'); // this my data to store in the note field
let txn = algosdk.makePaymentTxnWithSuggestedParams(sender, receiver, amount, undefined, note, params);
let signedTxn = txn.signTxn(recoveredAccount1.sk);
let xtx = (await algodClient.sendRawTransaction(signedTxn).do());

and I want to query “60c9dc007b9206a8a641f2e8” value to find my transaction but I’ve received the result of many transactions but not mine.

const enc = new TextEncoder();
let note = enc.encode('[{"_id":"60c9dc007b9206a8a641f2e8"]}]');
let transactionInfo = await indexerClient.searchForTransactions()
    .notePrefix(note).do();

Please help me. Thanks!

Can you try this on the search? This worked for me. A new line has been added after setting the note. let s = Buffer.from(note).toString("base64");

    const enc = new TextEncoder();
    let note = enc.encode('[{"_id":"60c9dc007b9206a8a641f2e8"]}]');   
    let s = Buffer.from(note).toString("base64");
    let transactionInfo = await indexerClient.searchForTransactions()
        .minRound(14837730)
        .notePrefix(s).do();

Thanks for your response. I wanna query with note prefix only because I don’t know the min round value.