bobthecow / genghis

The single-file MongoDB admin app
http://genghisapp.com
MIT License
1.45k stars 166 forks source link

Docs on query interface #131

Open shaneodonnell opened 11 years ago

shaneodonnell commented 11 years ago

If you could provide a few examples, it would be helpful. I've done a lot of .find()s via the mongo command line interface, and even with a cut and paste, can't get them to work in the Genghis search box.

I looked around and couldn't find any examples or docs otherwise.

If you can get me unblocked, I'd be happy to write some up myself, but I'm throughly stuck.

Thanks.

bobthecow commented 11 years ago

It's just the guts of the find(), i.e.

{foo: {$exists: 1}}

It also accepts ObjectIds as strings, to save you from writing

{_id: ObjectId("...")}
henry74 commented 11 years ago

I am doing simple queries which do not return any results. For example:

{params:{db_coll:"rss"}}

All documents have a params field which points to a hash with a db_coll key.

Even simple queries return no results: {params: {db_coll:{$exists:1}}}

bobthecow commented 11 years ago

@henry74 That's strange. What browser, browser version, genghis version, backend, backend version, mongo version, and mongo driver version are you using? Are you seeing any errors in your browser's JS console?

henry74 commented 11 years ago

No javascript errors Genghis 2.3.8 running on Ruby MongoDB shell version: 2.4.6 Chrome Version 29.0.1547.57

GIT remote: https://github.com/bobthecow/genghis.git revision: 156acfb5eb9b5c0468e094afa60d849302ba8fef specs: genghisapp (2.3.8) json (>= 1.7.0, < 1.9.0) mongo (>= 1.8.0, <= 1.9.0) sinatra (>= 1.3.3, < 1.5.0) sinatra-contrib (>= 1.3.1, < 1.5.0) sinatra-mustache (>= 0.0.4, < 0.2.0) vegas (~> 0.1.8)

mongo (1.9.0)
  bson (~> 1.9.0)
bobthecow commented 11 years ago

Those look a lot like the version numbers I have, which are working for me. What Ruby version are you running?

henry74 commented 11 years ago

Ruby 1.9.3