From 442273c1b40254d3129662c8d131788426f36584 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Tue, 16 Jul 2013 01:22:49 -0700 Subject: [PATCH] Updated readme --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2cc0a8e..2f16d66 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Runs on Elasticsearch ```ruby class Product < ActiveRecord::Base - searchkick :name + searchkick end ``` @@ -28,11 +28,17 @@ And to query, use: Product.search "2% Milk" ``` +### Query Like SQL + +```ruby +Product.search "2% Milk", where: {in_stock: true}, limit: 10, offset: 50 +``` + ### Synonyms ```ruby class Product < ActiveRecord::Base - searchkick :name, synonyms: ["scallion => green onion"] # TODO Ruby syntax + searchkick synonyms: ["scallion => green onion"] # TODO Ruby syntax end ``` @@ -59,7 +65,7 @@ Add the conversions to the index. class Product < ActiveRecord::Base has_many :searches - searchkick :name, conversions: true + searchkick conversions: true def to_indexed_json { -- libgit2 0.21.0