searchkick 4.4.0 → 5.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +160 -3
 - data/LICENSE.txt +1 -1
 - data/README.md +567 -421
 - data/lib/searchkick/bulk_reindex_job.rb +12 -8
 - data/lib/searchkick/controller_runtime.rb +40 -0
 - data/lib/searchkick/index.rb +167 -74
 - data/lib/searchkick/index_cache.rb +30 -0
 - data/lib/searchkick/index_options.rb +465 -404
 - data/lib/searchkick/indexer.rb +15 -8
 - data/lib/searchkick/log_subscriber.rb +57 -0
 - data/lib/searchkick/middleware.rb +9 -2
 - data/lib/searchkick/model.rb +50 -51
 - data/lib/searchkick/process_batch_job.rb +9 -25
 - data/lib/searchkick/process_queue_job.rb +4 -3
 - data/lib/searchkick/query.rb +106 -77
 - data/lib/searchkick/record_data.rb +1 -1
 - data/lib/searchkick/record_indexer.rb +136 -51
 - data/lib/searchkick/reindex_queue.rb +51 -9
 - data/lib/searchkick/reindex_v2_job.rb +10 -34
 - data/lib/searchkick/relation.rb +247 -0
 - data/lib/searchkick/relation_indexer.rb +155 -0
 - data/lib/searchkick/results.rb +131 -96
 - data/lib/searchkick/version.rb +1 -1
 - data/lib/searchkick/where.rb +11 -0
 - data/lib/searchkick.rb +202 -96
 - data/lib/tasks/searchkick.rake +14 -10
 - metadata +18 -85
 - data/CONTRIBUTING.md +0 -53
 - data/lib/searchkick/bulk_indexer.rb +0 -173
 - data/lib/searchkick/logging.rb +0 -246
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 8646c1e2b5f827947bc43c6d9f3761a3050007d67c8d051a3e70014700148c17
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 23d8ab0656e1f2cbaf11aeffedd99ed3b9991271248c2bddc5bf6150cfdfff2c
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 13fa0dd9d4c0fa8f77368403b0a9f717eaf5bcfd714022bcdd23400161ef8939baf7803f3a0773cf6848b6deea9ad46b9e9a67e50871cab07911e4a16f171775
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: bb2da50a0761be5e90074896c8c020aa7568a3483579bfa0743101199ef20b370b7b0cf3235818c86e69b6e4438cf05e67643a1a192715b5c952253411912dab
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,3 +1,159 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ## 5.3.1 (2023-11-28)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            - Fixed error with misspellings below and failed queries
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            ## 5.3.0 (2023-07-02)
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            - Fixed error with `cutoff_frequency`
         
     | 
| 
      
 8 
     | 
    
         
            +
            - Dropped support for Ruby < 3 and Active Record < 6.1
         
     | 
| 
      
 9 
     | 
    
         
            +
            - Dropped support for Mongoid < 7
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ## 5.2.4 (2023-05-11)
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            - Fixed error with non-string routing and `:async` mode
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            ## 5.2.3 (2023-04-12)
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            - Fixed error with missing records and multiple models
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            ## 5.2.2 (2023-04-01)
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            - Fixed `total_docs` method
         
     | 
| 
      
 22 
     | 
    
         
            +
            - Fixed deprecation warning with Active Support 7.1
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
            ## 5.2.1 (2023-02-21)
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            - Added support for `redis-client` gem
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            ## 5.2.0 (2023-02-08)
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
            - Added model name to warning about missing records
         
     | 
| 
      
 31 
     | 
    
         
            +
            - Fixed unnecessary data loading when reindexing relations with `:async` and `:queue` modes
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            ## 5.1.2 (2023-01-29)
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
            - Fixed error with missing point in time
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
            ## 5.1.1 (2022-12-05)
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
            - Added support for strings for `offset` and `per_page`
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
            ## 5.1.0 (2022-10-12)
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
            - Added support for fractional search timeout
         
     | 
| 
      
 44 
     | 
    
         
            +
            - Fixed search timeout with `elasticsearch` 8+ and `opensearch-ruby` gems
         
     | 
| 
      
 45 
     | 
    
         
            +
            - Fixed search timeout not applying to `multi_search`
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
            ## 5.0.5 (2022-10-09)
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
            - Added `model` method to `Searchkick::Relation`
         
     | 
| 
      
 50 
     | 
    
         
            +
            - Fixed deprecation warning with `redis` gem
         
     | 
| 
      
 51 
     | 
    
         
            +
            - Fixed `respond_to?` method on relation loading relation
         
     | 
| 
      
 52 
     | 
    
         
            +
            - Fixed `Relation loaded` error for non-mutating methods on relation
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
            ## 5.0.4 (2022-06-16)
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
            - Added `max_result_window` option
         
     | 
| 
      
 57 
     | 
    
         
            +
            - Improved error message for unsupported versions of Elasticsearch
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
            ## 5.0.3 (2022-03-13)
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
            - Fixed context for index name for inherited models
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            ## 5.0.2 (2022-03-03)
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
            - Fixed index name for inherited models
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
            ## 5.0.1 (2022-02-27)
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
            - Prefer `mode: :async` over `async: true` for full reindex
         
     | 
| 
      
 70 
     | 
    
         
            +
            - Fixed instance method overriding with concerns
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
            ## 5.0.0 (2022-02-21)
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
            - Searches now use lazy loading (similar to Active Record)
         
     | 
| 
      
 75 
     | 
    
         
            +
            - Added `unscope` option to better support working with default scopes
         
     | 
| 
      
 76 
     | 
    
         
            +
            - Added support for `:async` and `:queue` modes for `reindex` on relation
         
     | 
| 
      
 77 
     | 
    
         
            +
            - Added basic protection from unfiltered parameters to `where` option
         
     | 
| 
      
 78 
     | 
    
         
            +
            - Added `models` option to `similar` method
         
     | 
| 
      
 79 
     | 
    
         
            +
            - Changed async full reindex to fetch ids instead of using ranges for numeric primary keys with Active Record
         
     | 
| 
      
 80 
     | 
    
         
            +
            - Changed `searchkick_index_options` to return symbol keys (instead of mix of strings and symbols)
         
     | 
| 
      
 81 
     | 
    
         
            +
            - Changed non-anchored regular expressions to match expected results (previously warned)
         
     | 
| 
      
 82 
     | 
    
         
            +
            - Changed record reindex to return `true` to match model and relation reindex
         
     | 
| 
      
 83 
     | 
    
         
            +
            - Updated async reindex job to call `search_import` for nested associations
         
     | 
| 
      
 84 
     | 
    
         
            +
            - Fixed removing records when `should_index?` is `false` when `reindex` called on relation
         
     | 
| 
      
 85 
     | 
    
         
            +
            - Fixed issue with `merge_mappings` for fields that use `searchkick` options
         
     | 
| 
      
 86 
     | 
    
         
            +
            - Raise error when `search` called on relations
         
     | 
| 
      
 87 
     | 
    
         
            +
            - Raise `ArgumentError` (instead of warning) for invalid regular expression modifiers
         
     | 
| 
      
 88 
     | 
    
         
            +
            - Raise `ArgumentError` instead of `RuntimeError` for unknown operators
         
     | 
| 
      
 89 
     | 
    
         
            +
            - Removed mapping of `id` to `_id` with `order` option (not supported in Elasticsearch 8)
         
     | 
| 
      
 90 
     | 
    
         
            +
            - Removed `wordnet` option (no longer worked)
         
     | 
| 
      
 91 
     | 
    
         
            +
            - Removed dependency on `elasticsearch` gem (can use `elasticsearch` or `opensearch-ruby`)
         
     | 
| 
      
 92 
     | 
    
         
            +
            - Dropped support for Elasticsearch 6
         
     | 
| 
      
 93 
     | 
    
         
            +
            - Dropped support for Ruby < 2.6 and Active Record < 5.2
         
     | 
| 
      
 94 
     | 
    
         
            +
            - Dropped support for NoBrainer and Cequel
         
     | 
| 
      
 95 
     | 
    
         
            +
            - Dropped support for `faraday_middleware-aws-signers-v4` (use `faraday_middleware-aws-sigv4` instead)
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
            ## 4.6.3 (2021-11-19)
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
            - Added support for reloadable synonyms for OpenSearch
         
     | 
| 
      
 100 
     | 
    
         
            +
            - Added experimental support for `opensearch-ruby` gem
         
     | 
| 
      
 101 
     | 
    
         
            +
            - Removed `elasticsearch-xpack` dependency for reloadable synonyms
         
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
            ## 4.6.2 (2021-11-15)
         
     | 
| 
      
 104 
     | 
    
         
            +
             
     | 
| 
      
 105 
     | 
    
         
            +
            - Added support for beginless ranges to `where` option
         
     | 
| 
      
 106 
     | 
    
         
            +
            - Fixed `like` and `ilike` with `+` character
         
     | 
| 
      
 107 
     | 
    
         
            +
            - Fixed warning about accessing system indices when no model or index specified
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
            ## 4.6.1 (2021-09-25)
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
            - Added `ilike` operator for Elasticsearch 7.10+
         
     | 
| 
      
 112 
     | 
    
         
            +
            - Fixed missing methods with `multi_search`
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
            ## 4.6.0 (2021-08-22)
         
     | 
| 
      
 115 
     | 
    
         
            +
             
     | 
| 
      
 116 
     | 
    
         
            +
            - Added support for case-insensitive regular expressions with Elasticsearch 7.10+
         
     | 
| 
      
 117 
     | 
    
         
            +
            - Added support for `OPENSEARCH_URL`
         
     | 
| 
      
 118 
     | 
    
         
            +
            - Fixed error with `debug` option
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
            ## 4.5.2 (2021-08-05)
         
     | 
| 
      
 121 
     | 
    
         
            +
             
     | 
| 
      
 122 
     | 
    
         
            +
            - Fixed error with reindex queue
         
     | 
| 
      
 123 
     | 
    
         
            +
            - Fixed error with `model_name` method with multiple models
         
     | 
| 
      
 124 
     | 
    
         
            +
            - Fixed error with `debug` option with elasticsearch-ruby 7.14
         
     | 
| 
      
 125 
     | 
    
         
            +
             
     | 
| 
      
 126 
     | 
    
         
            +
            ## 4.5.1 (2021-08-03)
         
     | 
| 
      
 127 
     | 
    
         
            +
             
     | 
| 
      
 128 
     | 
    
         
            +
            - Improved performance of reindex queue
         
     | 
| 
      
 129 
     | 
    
         
            +
             
     | 
| 
      
 130 
     | 
    
         
            +
            ## 4.5.0 (2021-06-07)
         
     | 
| 
      
 131 
     | 
    
         
            +
             
     | 
| 
      
 132 
     | 
    
         
            +
            - Added experimental support for OpenSearch
         
     | 
| 
      
 133 
     | 
    
         
            +
            - Added support for synonyms in Japanese
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
      
 135 
     | 
    
         
            +
            ## 4.4.4 (2021-03-12)
         
     | 
| 
      
 136 
     | 
    
         
            +
             
     | 
| 
      
 137 
     | 
    
         
            +
            - Fixed `too_long_frame_exception` with `scroll` method
         
     | 
| 
      
 138 
     | 
    
         
            +
            - Fixed multi-word emoji tokenization
         
     | 
| 
      
 139 
     | 
    
         
            +
             
     | 
| 
      
 140 
     | 
    
         
            +
            ## 4.4.3 (2021-02-25)
         
     | 
| 
      
 141 
     | 
    
         
            +
             
     | 
| 
      
 142 
     | 
    
         
            +
            - Added support for Hunspell
         
     | 
| 
      
 143 
     | 
    
         
            +
            - Fixed warning about accessing system indices
         
     | 
| 
      
 144 
     | 
    
         
            +
             
     | 
| 
      
 145 
     | 
    
         
            +
            ## 4.4.2 (2020-11-23)
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
      
 147 
     | 
    
         
            +
            - Added `missing_records` method to results
         
     | 
| 
      
 148 
     | 
    
         
            +
            - Fixed issue with `like` and special characters
         
     | 
| 
      
 149 
     | 
    
         
            +
             
     | 
| 
      
 150 
     | 
    
         
            +
            ## 4.4.1 (2020-06-24)
         
     | 
| 
      
 151 
     | 
    
         
            +
             
     | 
| 
      
 152 
     | 
    
         
            +
            - Added `stem_exclusion` and `stemmer_override` options
         
     | 
| 
      
 153 
     | 
    
         
            +
            - Added `with_score` method to search results
         
     | 
| 
      
 154 
     | 
    
         
            +
            - Improved error message for `reload_synonyms` with non-OSS version of Elasticsearch
         
     | 
| 
      
 155 
     | 
    
         
            +
            - Improved output for reindex rake task
         
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
       1 
157 
     | 
    
         
             
            ## 4.4.0 (2020-06-17)
         
     | 
| 
       2 
158 
     | 
    
         | 
| 
       3 
159 
     | 
    
         
             
            - Added support for reloadable, multi-word, search time synonyms
         
     | 
| 
         @@ -59,6 +215,7 @@ Breaking changes 
     | 
|
| 
       59 
215 
     | 
    
         | 
| 
       60 
216 
     | 
    
         
             
            - Removed support for Elasticsearch 5
         
     | 
| 
       61 
217 
     | 
    
         
             
            - Removed support for multi-word synonyms (they no longer work with shingles)
         
     | 
| 
      
 218 
     | 
    
         
            +
            - Removed support for Active Record < 5
         
     | 
| 
       62 
219 
     | 
    
         | 
| 
       63 
220 
     | 
    
         
             
            ## 3.1.3 (2019-04-11)
         
     | 
| 
       64 
221 
     | 
    
         | 
| 
         @@ -125,7 +282,7 @@ Breaking changes 
     | 
|
| 
       125 
282 
     | 
    
         
             
            Breaking changes
         
     | 
| 
       126 
283 
     | 
    
         | 
| 
       127 
284 
     | 
    
         
             
            - Removed support for Elasticsearch 2
         
     | 
| 
       128 
     | 
    
         
            -
            - Removed support for  
     | 
| 
      
 285 
     | 
    
         
            +
            - Removed support for Active Record < 4.2 and Mongoid < 5
         
     | 
| 
       129 
286 
     | 
    
         
             
            - Types are no longer used
         
     | 
| 
       130 
287 
     | 
    
         
             
            - The `_all` field is disabled by default in Elasticsearch 5
         
     | 
| 
       131 
288 
     | 
    
         
             
            - Conversions are not stemmed by default
         
     | 
| 
         @@ -430,7 +587,7 @@ Breaking changes 
     | 
|
| 
       430 
587 
     | 
    
         | 
| 
       431 
588 
     | 
    
         
             
            ## 0.8.3 (2014-09-20)
         
     | 
| 
       432 
589 
     | 
    
         | 
| 
       433 
     | 
    
         
            -
            - Added support for  
     | 
| 
      
 590 
     | 
    
         
            +
            - Added support for Active Job
         
     | 
| 
       434 
591 
     | 
    
         
             
            - Added `timeout` setting
         
     | 
| 
       435 
592 
     | 
    
         
             
            - Fixed import with no records
         
     | 
| 
       436 
593 
     | 
    
         | 
| 
         @@ -537,7 +694,7 @@ Breaking changes 
     | 
|
| 
       537 
694 
     | 
    
         | 
| 
       538 
695 
     | 
    
         
             
            ## 0.5.2 (2014-02-12)
         
     | 
| 
       539 
696 
     | 
    
         | 
| 
       540 
     | 
    
         
            -
            - Use after_commit hook for  
     | 
| 
      
 697 
     | 
    
         
            +
            - Use after_commit hook for Active Record to prevent data inconsistencies
         
     | 
| 
       541 
698 
     | 
    
         | 
| 
       542 
699 
     | 
    
         
             
            ## 0.5.1 (2014-02-12)
         
     | 
| 
       543 
700 
     | 
    
         | 
    
        data/LICENSE.txt
    CHANGED