I have tried to search a customer ID through a column using the executeSearchQuery() Nodejs SDK method. But, it returns an empty value. I already have the Customer ID in the Customer Catalyst Datastore table. How to resolve this issue? I have attached a code snippet which I have tried to search through a column.
app.get("/search", async (req, res) => {
var CatalystApp = catalyst.initialize(req);
var searchQuery = {
search: "10090",
search_table_columns: {
Customer: ["Customer_ID"],
Customer: ["Order_customer"],
},
};
//search query
CatalystApp.search()
.executeSearchQuery(searchQuery)
.then((resp) => {
console.log("resp :", resp);
res.status(200).send(resp);
})
.catch((err) => {
console.log(err);
res.status(500).send(err);
});
});```
The output is [](https://i.sstatic.net/BHnNc0jz.png)
You can check on the Datastore table schema view [](https://i.sstatic.net/pzWhTZ6f.png)