6

Is there a way to use aggregation framework in the latest version of mongoVUE?

The only option which looks like an aggregation framework is GROUP option but I was not able to figure out how to use it.

Can someone tell me, am I looking in the right direction? And If so, how I should write a query there.

P.S1 - it took me quite some time to be able to write MapReduce in mongoVUE

P.S2 - I am aware how to use aggregation framework from the shell.

StuartLC
  • 104,537
  • 17
  • 209
  • 285
Salvador Dali
  • 214,103
  • 147
  • 703
  • 753
  • 1
    MongoVUE hasn't been updated since last April so it doesn't support the recently released aggregation framework. – JohnnyHK Nov 26 '12 at 13:35
  • 1
    If MongoVUE allowed entering arbitrary db.runCommand() syntax then you would be able to run aggregation framework queries but I don't see that they have that capability. – Asya Kamsky Nov 26 '12 at 16:16
  • 1
    If you are comfortable using the `mongo` shell, I would also suggest trying [Robomongo](http://www.robomongo.org/). Robomongo is a cross-platform open source admin interface that allows you to open multiple shells in separate tabs. – Stennie May 20 '13 at 01:08

2 Answers2

6

MongoVUE 1.6.1 (released May 2, 2013) now includes an Aggregate view. If you select a collection you can choose this view from the normal menu or the right-click context menu.

Stennie
  • 63,885
  • 14
  • 149
  • 175
  • This works in 1.6.5 but only returns documents in TreeView (IMHO useless) and has no 'normal' options to view in table or text views. I can't view any document unless I click into it and can't copy any of the results. – Mario Jan 02 '14 at 23:16
  • 1
    @Mario: You should give [Robomongo](http://robomongo.org/) a try. It supports tree/table/JSON views for queries (including Aggregation Framework). – Stennie Jan 03 '14 at 00:24
0

Just to give an example of @Stennie's solution.

Given the following document in Mongo:

{ _id: 123456,
  Items: [
     { Name: "Item1", Color : "Red" },
     { Name: "Item2", Color : "Blue" },
     { Name: "Item3", Color : "Red" }
  ]
}

In MongueVue, after right clicking on the collection and selecting Aggregate, you can apply a pipeline such as the following, to flatten the Items, filter just the "Red" items and re-project just the item Names, from this document:

{ $match: {_id: 123456}},
{ $unwind: '$Items'},
{ $match: {'Items.Color': 'Red'}},
{ $project: {_id: 0, Name : '$Items.Name'}}

Aggregate in MongoVue

StuartLC
  • 104,537
  • 17
  • 209
  • 285