The Elasticsearch List Indexes Tutorial

Introduction There are multiple ways to list all of the indexes contained in an Elasticsearch cluster. One common way of doing this is to use cURL and Kibana to issue HTTP requests to communicate with the Elasticsearch cluster to have it return all of the index names and their respective UUIDs. The Elasticsearch list indexes … Continued

mongoose Regex Query

Introduction Regular expression or Regex is a very important part of programming. It is usually used to find a pattern in a string. It takes time to understand regex and because of it being a bit tough, beginners usually skip this topic. This is always a mistake because the regular expression is used frequently in … Continued

mongoose Aggregate Sum

Introduction Aggregation in MongoDB provides a vast range of very useful operators. One such operator is $sum. As the name suggests, the $sum operator is used to get the sum of numerical values. It is commonly used with $match and $group. Other available stages are $addFields (Available starting in MongoDB 3.4), $set (MongoDB 4.2), $replaceRoot … Continued

mongoose Like Operator

Introduction The LIKE operator is common is SQL. It is a very useful operator when we need to filter the data according to some text. Unfortunately, no such operator exists in MongoDB. But it does not mean we cannot achieve the functionality of the LIKE operator in MongoDB and mongoose. In this article, we will … Continued

Node Js MongoDB Join Query

Introduction MongoDB is a NoSQL database and there are no joins in NoSQL. But MongoDB provides few ways to use joins. There are several joins in SQL but the most frequently used is the inner join. In this article, we will discuss how to perform an inner join operation in MongoDB. But first, we will … Continued

How to Use the $lookup Function in MongoDB

Introduction When you’re querying data in MongoDB, there are times when you need information that’s stored in documents across multiple collections. The $lookup function makes it easy to “join” multiple collections, returning results that contain fields from all specified collections. In this tutorial, we’ll take a closer look at the $lookup function in MongoDB and … Continued

How to use mongoose to find by id and update with an example

Introduction In this quick tutorial we will demo how to use mongoose to find by id and update with an example. The update operation is one of the CRUD operations that is used to update data in a database. Out of all the CRUD operations, the update operation should be performed very carefully. You see, … Continued

How to use NodeJs mongoose to find the object ID

Introduction Read operation is one of the CRUD operations that can be performed on a database. Mongoose provides a few methods to read the data from a database. Each method has its own specialty. We can use these methods according to our requirements. One of these methods is the findById() method. As the name suggests, … Continued

How to Perform a Node Js MongoDB Select Query

Introduction Right up-front we want to let you know that there is no select query in MongoDB. The select query is used in SQL based systems but there is an equivalent in MongoDB which we will introduce you to. How to Perform the Equivalent of a SQL Select Query with NodeJS and MongoDB Almost all … Continued

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.