カテゴリー : MongoDB

[MongoDB] field を削除するコマンド

MongoDB で不要なフィールドを削除するには db.collection.update を $unset で利用します。

MongoDB | モンゴディービー

続きを読む

[MongoDB] Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly.

mongo shell に入ろうとするとエラーが発生しました。

$ mongo myDb
Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly.

MongoDB | モンゴディービー

続きを読む

[MongoDB] mongo shell から別 DB へ接続してクエリを実行する

MongoDB で別データベースに接続してクエリを実行する方法をご紹介します。

MongoDB | モンゴディービー

続きを読む

[MongoDB] aggregate の実行時間を確認する方法

mongo shell で db.collection.aggregate() の実行時間を確認するコマンドをご紹介します。

MongoDB | モンゴディービー

続きを読む

[MongoDB] mongo shell での表示件数は DBQuery.shellBatchSize で設定できる

mongo shell での表示件数はデフォルト 20 件なのですが、これを変更するには DBQuery.shellBatchSize の値を変更すればいいみたいです。

MongoDB | モンゴディービー

続きを読む

MongoDB 用 GUI クライアント

MongoDB を mongo shell からでなく GUI クライアントから操作できた方が楽なこともあると聞いて、アプリ入れてみました。

MongoDB | モンゴディービー

続きを読む

[MongoDB] 特定のテキストフィールドが x 文字以上の document を取得する query

MongoDB で特定のテキストフィールドが x 文字以上の document を取得する query をご紹介します。

MongoDB | モンゴディービー

続きを読む

[MongoDB] MongoError: Runner error: Overflow sort stage buffered data usage of x bytes exceeds internal limit of 33554432 bytes

Express (Node.js) + Mongoose (MongoDB) なアプリケーションで下記のような MongoError: Runner error: Overflow sort stage buffered data usage of 33555427 bytes exceeds internal limit of 33554432 bytes エラーが発生しました。

MongoDB | モンゴディービー

続きを読む

[MongoDB] 改行文字を含む field の値をGoogle スプレッドシートでインポートできる形式で出力する

MongoDB で改行文字を含む field の値を Google スプレッドシートでインポートできる形式で出力する方法をご紹介します。

MongoDB | モンゴディービー

続きを読む

[MongoDB] クエリ結果を標準出力させてファイルに保存する方法

MongoDB でクエリ結果を標準出力させてファイルに保存するコマンドをご紹介します。

MongoDB | モンゴディービー

続きを読む