Last active
May 17, 2018 08:19
-
-
Save palin/df96c428ec65d832c7c0d0121e8340a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ Torque.store('ask_an_owner_questions', data) | |
=> { | |
"_index"=>"torque-ask_an_owner_questions", | |
"_type"=>"document", | |
"_id"=>"483518", | |
"_version"=>1, | |
"result"=>"created", | |
"_shards"=>{ | |
"total"=>2, | |
"successful"=>1, | |
"failed"=>0 | |
}, | |
"created"=>true | |
} | |
The data which goes to Torque looks like this: | |
data = | |
{ | |
:id=>483518, | |
:locale=>: "en-GB", | |
:searchable=>[ | |
{ | |
:id=>483518, | |
:type=>"AskAnOwnerQuestion", | |
:value=>"Are you in Australia?" | |
}, | |
{ | |
:id=>531533, | |
:type=>"AskAnOwnerResponse", | |
:value=>"Yes x 1" | |
} | |
], | |
:filterable=>[ | |
{ | |
:key=>"product_group_id", | |
:value=>71111111 | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment