skip to Main Content

How to use aws-sdk-v3 to search in opensearch with nodejs

I have a nodejs lambda function that needs to search into an opensearch DB. I want to use the aws-sdk-v3. I found the doc here for OpenSearchClient: https://github.com/aws/aws-sdk-js-v3/tree/246d6534c53dcf9bd2eb6a620cb5b6c04b27451a/clients/client-opensearch But as you see, there is almost nothing explained there. For example,…

VIEW QUESTION

Mongodb – Cannot close mongoose connection

const mongoose = require("mongoose"); mongoose.connect("mongodb://localhost:27017/fruitsDB", {useNewUrlParser: true}); const fruitSchema = new mongoose.Schema ({ name: String, rating: Number, review: String }); const Fruit = mongoose.model("Fruit", fruitSchema); Fruit.find((err, fruits) => { if (err) { console.log(err); } else { fruits.forEach((fruit) => console.log(fruit.name)); };…

VIEW QUESTION
Back To Top
Search