Mongodb

Connectors

  • mongo-es - A MongoDB to Elasticsearch connector

Clients

Administration tools

  • dbkoda
  • Robo3t - Desktop GUI
    • Install using snap: snap install robo3t-snap

Backups

Snippets

Convert date string to ISODate type

1
2
3
4
db.collection.find({OrderDate: {$type: 'string'}}).forEach(function(element){
element.OrderDate = ISODate(element.OrderDate);
db.collection.save(element);
})

Find documents between dates

1
2
3
4
5
6
db.collection.find({
createdAt: {
$gte: ISODate("2018-10-25T00:00:00.000Z"),
$lt: ISODate("2018-10-29T00:00:00.000Z"),
}
})

Comments

⬆︎TOP