Commit 25eb4c18aa380c2bbc8a4cce6e7e5bac04e5fa1b

Authored by Andrew Kane
1 parent 8dcbc68b

Updated readme

Showing 2 changed files with 7 additions and 8 deletions   Show diff stats
README.md
... ... @@ -624,13 +624,6 @@ Limit
624 624 Product.search "apples", aggs: {store_id: {limit: 10}}
625 625 ```
626 626  
627   -Minimum Document Count
628   -
629   -```ruby
630   -Product.search "apples", aggs: {store_id: {min_doc_count: 2}}
631   -# Only return stores that have 2 or more hits
632   -```
633   -
634 627 Order
635 628  
636 629 ```ruby
... ... @@ -646,6 +639,12 @@ price_ranges = [{to: 20}, {from: 20, to: 50}, {from: 50}]
646 639 Product.search "*", aggs: {price: {ranges: price_ranges}}
647 640 ```
648 641  
  642 +Minimum document count [master]
  643 +
  644 +```ruby
  645 +Product.search "apples", aggs: {store_id: {min_doc_count: 2}}
  646 +```
  647 +
649 648 #### Moving From Facets
650 649  
651 650 1. Replace `facets` with `aggs` in searches. **Note:** Stats facets are not supported at this time.
... ...
test/aggs_test.rb
... ... @@ -31,7 +31,7 @@ class AggsTest < Minitest::Test
31 31 end
32 32  
33 33 def test_min_doc_count
34   - assert_equal ({2 => 2}), store_agg(aggs: {store_id: { min_doc_count: 2 }})
  34 + assert_equal ({2 => 2}), store_agg(aggs: {store_id: {min_doc_count: 2}})
35 35 end
36 36  
37 37 def test_no_aggs
... ...