$showDiskLoc

  • $showDiskLoc

Deprecated since v3.2

Starting in v3.2, the $showDiskLoc operator is deprecated in themongo shell. In the mongo shell,use cursor.showRecordId() instead.

$showDiskLoc option adds a field $diskLoc to thereturned documents. The value of the added $diskLoc field is adocument that contains the disk location information:

  1. "$diskLoc": {
  2. "file": <int>,
  3. "offset": <int>
  4. }

The mongo shell provides thecursor.showDiskLoc() method for $showDiskLoc:

  1. db.collection.find().showDiskLoc()

You can also specify the $showDiskLoc option in eitherof the following forms:

  1. db.collection.find( { <query> } )._addSpecial("$showDiskLoc" , true)
  2. db.collection.find( { $query: { <query> }, $showDiskLoc: true } )