genghis icon indicating copy to clipboard operation
genghis copied to clipboard

Docs on query interface

Open shaneodonnell opened this issue 11 years ago • 6 comments

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.

shaneodonnell avatar Aug 21 '13 22:08 shaneodonnell

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("...")}

bobthecow avatar Aug 22 '13 00:08 bobthecow

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}}}

henry74 avatar Aug 27 '13 19:08 henry74

@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?

bobthecow avatar Aug 27 '13 20:08 bobthecow

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)

henry74 avatar Aug 27 '13 20:08 henry74

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

bobthecow avatar Aug 28 '13 11:08 bobthecow

Ruby 1.9.3

henry74 avatar Aug 28 '13 12:08 henry74