Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
Description
See SERVER-2442
Example usage:
> show collections
|
fts_index3
|
search
|
system.indexes
|
|
|
//
|
// plain listCollections
|
//
|
> db.runCommand('listCollections');
|
{
|
"collections" : [
|
{
|
"name" : "fts_index3",
|
"options" : {
|
"flags" : 1
|
}
|
},
|
{
|
"name" : "search",
|
"options" : {
|
"flags" : 1
|
}
|
},
|
{
|
"name" : "system.indexes",
|
"options" : {
|
|
}
|
}
|
],
|
"ok" : 1
|
}
|
|
|
//
|
// listCollections with a filter parameter ('fts_index3' has been filtered)
|
//
|
> db.runCommand('listCollections', {filter: {name: /^s/}});
|
{
|
"collections" : [
|
{
|
"name" : "search",
|
"options" : {
|
"flags" : 1
|
}
|
},
|
{
|
"name" : "system.indexes",
|
"options" : {
|
|
}
|
}
|
],
|
"ok" : 1
|
}
|
Attachments
Issue Links
- is related to
-
SERVER-2442 Add list[Collections] command
-
- Closed
-