Re: some questions


Chronological Thread 
  • From: Arjuna Christensen <aj@junglist.gen.nz>
  • To: chef@lists.opscode.com
  • Cc: smparkes@smparkes.net
  • Subject: Re: some questions
  • Date: Fri, 24 Apr 2009 13:31:42 +1200

I believe David Lee's recent patch for CHEF-243 [1] should make searches from Ferret much more usable.

Essentially, it gives the ability for the hash returned by search() and Ferret to be used like a real, nested hash.

e.g.:

data = {
  "parent_child_0" => "pc0",
  "parent_child_grandchild" => "gc",
  "parent_child_1" => "pc",
  "parent_child_2" => "pc2"
}

search() => h(data)

h["parent_child_0"] # => "pc0"
h["parent"]["child_0"] # => "pc0"
h["parent"]["child"]["grandchild"] # => "gc"

Mad props to David =)

Regards,

AJ

[1] http://tickets.opscode.com/browse/CHEF-243

On 24/04/2009, at 12:26 PM, Adam Jacob wrote:

On Thu, Apr 23, 2009 at 5:19 PM, Steven Parkes <smparkes@smparkes.net> wrote:
The query API is the part that sucks here

Hmmm.  A JSON equivalent of xpath, anyone?

BINGO

I think doing JSONQuery as a CouchDB view server would get us the
rocking' ad-hoc query-ness.

Adam

--
Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-4759 E: adam@opscode.com




Archive powered by MHonArc 2.6.16.

§