@madsteer
Show me a screenshot of your DB (or make an example-DB if data is secret).
Set at this part of code a ->log–>
.then((results)=>{console.log(results.items)
let items = results.items......
-You checked your DB?(DB has values?)
-You test in on LIVE or PREVIEW? (DBs are synced?)
-If testing on LIVE, setted-up all needed DB-permissions?
-All entered IDs are right?
You can also create more console-checkpoints, like …
functionsearchIndex(VALUE){console.log("Searchfunction started.")
…or…
if(items.length >0){console.log("Length ok, data found.")
…or…
....}else{console.log("No data found.").......
…and so on.
Investigate and analyse your own code and than you will be able to get your code running.