You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.
I using Rails 4 and Postgres-9.3 .
Using JSON data types to store Specifications(column: specification_json) inside Product model.
I want to do elastic-search on Product model as per specifications.
I have to query on Product based on this field specifications_json value. Query contains all type of operations like >, <, ==, contains a string etc.
eg:- Lists all products under a category called “Electronics” those specification “Pin-size”(spec key:- 1368) between 0.20 and 0.36 and specification “Screen-feature”(1371) contains string “multi”.
How to filter products based on above conditions?
The text was updated successfully, but these errors were encountered:
Thanks for the Retire gem :)
I using Rails 4 and Postgres-9.3 .
Using JSON data types to store Specifications(column: specification_json) inside Product model.
I want to do elastic-search on Product model as per specifications.
#<Product id: 7, prod_id: 525135, cat_id: 6716, category_id: 4335, updated: "2013-09-24 07:37:19",created_at: "2014-03-13 09:40:52", updated_at: "2014-03-20 13:53:27", eans: ["4016032288633"], skus: ["DK-1531-0025/Y"], account_id: 2, specifications_json: {"1368"=>[0.25, 0.36, 0.54],"1371" => ["multi-touch surface", "push button", "scroll button"], "1370"=>["LAN (RJ-45)"], "1369"=>["LAN (RJ-45)"]}>
specifications_json looks like
{ "1368" => [0.25, 0.36, 0.54], "1371" => ["multi-touch surface", "push button", "scroll button"], "1370"=>["LAN (RJ-45)"], ------------ }
I have to query on Product based on this field specifications_json value. Query contains all type of operations like >, <, ==, contains a string etc.
eg:- Lists all products under a category called “Electronics” those specification “Pin-size”(spec key:- 1368) between 0.20 and 0.36 and specification “Screen-feature”(1371) contains string “multi”.
How to filter products based on above conditions?
The text was updated successfully, but these errors were encountered: