From be9c8f343ce24ef9f140ef3e5f673c3a6f747ec6 Mon Sep 17 00:00:00 2001 From: pyridine Date: Wed, 30 Aug 2023 17:00:46 -0400 Subject: [PATCH 1/2] Adds compound boolean statement to README --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index e9f624a8..ab5abcff 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,13 @@ Select select: [:name] ``` +Compound Boolean + +```ruby +# (in_stock: true OR backordered: false) AND (store_id: 1 OR store_id: 2) +_and: [ { _or: [ {in_stock: true}, {backordered: false} ] }, { _or: [{store_id: 1}, {store_id: 2}] } ] +``` + [These source filtering options are supported](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#source-filtering) ### Results From e8dd6f1547b3f8157b44668de62a7522aaf276db Mon Sep 17 00:00:00 2001 From: pyridine Date: Wed, 30 Aug 2023 17:11:03 -0400 Subject: [PATCH 2/2] move after link --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ab5abcff..8b383556 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,8 @@ Select select: [:name] ``` +[These source filtering options are supported](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#source-filtering) + Compound Boolean ```ruby @@ -153,8 +155,6 @@ Compound Boolean _and: [ { _or: [ {in_stock: true}, {backordered: false} ] }, { _or: [{store_id: 1}, {store_id: 2}] } ] ``` -[These source filtering options are supported](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#source-filtering) - ### Results Searches return a `Searchkick::Relation` object. This responds like an array to most methods.