Skip to content

Instantly share code, notes, and snippets.

@matteomanzo
Created April 18, 2018 08:15
Show Gist options
  • Save matteomanzo/8577f0d9e7aac1bd627e8858ea651195 to your computer and use it in GitHub Desktop.
Save matteomanzo/8577f0d9e7aac1bd627e8858ea651195 to your computer and use it in GitHub Desktop.
Mastico::Query.new(fields: [:author], query: "Botticello").apply(chewy_query).load.to_a
=> [#<Artwork:0x007fa66e9a78f8
id: 30,
museum_id: 6,
title: "Adoration of the Magi"
author: "Sandro Botticelli (Florence 1445-1510)",
position: 2>,
#<Artwork:0x007fa66e9a7678
id: 3,
museum_id: 15,
title: "Birth of Venus",
author: "Sandro Botticelli (Florence 1445-1510) ",
position: 109>,
#<Artwork:0x007fa66e9a77b8
id: 20,
museum_id: 11,
title: "Fortitude",
author: "Sandro Botticelli (Florence 1445 -1510)",
position: 2015>]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment