itstommymorgan / asari

a Ruby wrapper for AWS CloudSearch.
52 stars 51 forks source link

Boolean queries #14

Closed kaiuhl closed 11 years ago

kaiuhl commented 11 years ago

Howdy Tommy,

This PR allows you to build a Ruby representation of how the boolean queries work on Cloudfront.

@asari.search filter: { or: { donut: true, and: { round: true, cook_type: "fried", topping: "glaze" } }
#=> Generates a query string of (or donut:'true' (and round:'true' cook_type:'fried' topping:'glaze))

It should work at any depth or level of logic. Yay hurray!

:cake:

kaiuhl commented 11 years ago

Don't merge — need to fix an issue with nil values passed in params. :-1:

Edit: Nevermind, already pushed it. Thundercats are go.