elastic-rails 0.8.7 → 1.0.0
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/.env +2 -0
- data/.travis.yml +19 -5
- data/Makefile +38 -0
- data/docker-compose.services.yml +16 -0
- data/elastic.gemspec +5 -6
- data/lib/elastic/commands/compare_mappings.rb +2 -2
- data/lib/elastic/commands/import_index_documents.rb +4 -16
- data/lib/elastic/core/base_middleware.rb +0 -4
- data/lib/elastic/core/connector.rb +32 -42
- data/lib/elastic/core/definition.rb +16 -29
- data/lib/elastic/core/serializer.rb +1 -1
- data/lib/elastic/datatypes/default.rb +1 -1
- data/lib/elastic/datatypes/string.rb +6 -0
- data/lib/elastic/datatypes/term.rb +1 -2
- data/lib/elastic/fields/value.rb +2 -2
- data/lib/elastic/nodes/concerns/hit_provider.rb +0 -1
- data/lib/elastic/nodes/match.rb +3 -2
- data/lib/elastic/query.rb +2 -6
- data/lib/elastic/railties/ar_helpers.rb +2 -2
- data/lib/elastic/results/hit.rb +2 -3
- data/lib/elastic/shims/populating.rb +7 -13
- data/lib/elastic/type.rb +0 -1
- data/lib/elastic/types/base_type.rb +2 -6
- data/lib/elastic/version.rb +1 -1
- metadata +28 -45
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 415d01e7f57e3202b889d41df8942d3fe5347173
         | 
| 4 | 
            +
              data.tar.gz: 96661427d521dc54ae86178cf20529099e900c32
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ac05b2d5170f2e112d0b90c3e80cbb44730f1983f69e9d344140ea13e6127501ad926809c38ec1747f7caf8dc8972d6d5ba42596333c77c083ea4681193e998d
         | 
| 7 | 
            +
              data.tar.gz: 776bdcb23a31e9694538104d7572b72ca810467402500f3b4a3e9e8d3224364836fce0c106f05af0f9b67982f403a92409d5576658658783a671daeb3d1ef32c
         | 
    
        data/.env
    ADDED
    
    
    
        data/.travis.yml
    CHANGED
    
    | @@ -1,8 +1,22 @@ | |
| 1 1 | 
             
            language: ruby
         | 
| 2 2 | 
             
            rvm:
         | 
| 3 | 
            -
              - 2. | 
| 4 | 
            -
              - 2. | 
| 5 | 
            -
              - 2. | 
| 3 | 
            +
              - 2.6.2
         | 
| 4 | 
            +
              - 2.5.3
         | 
| 5 | 
            +
              - 2.4.1
         | 
| 6 | 
            +
              - 2.3.7
         | 
| 6 7 | 
             
            services:
         | 
| 7 | 
            -
              -  | 
| 8 | 
            -
            before_install: | 
| 8 | 
            +
              - docker
         | 
| 9 | 
            +
            before_install:
         | 
| 10 | 
            +
              - gem update bundler
         | 
| 11 | 
            +
              - docker -v
         | 
| 12 | 
            +
              - make services-up
         | 
| 13 | 
            +
              - sleep 10
         | 
| 14 | 
            +
            deploy:
         | 
| 15 | 
            +
              provider: rubygems
         | 
| 16 | 
            +
              api_key:
         | 
| 17 | 
            +
                secure: Ucdb3YW5+gBFBxhZylqacER9xdu/oP4lmu6JqiWIL95IdNwQEyh45llBmRxYnsyb1WdaFlu35EbkgFZyerfWBtSKl5xjxkEJH7xRjfA/Ait19YGd9jdrVGSPXMZodf8+Q4GQe47Q934AsR/YLZ/g6cDUsEwhsYVoCmVWR5SICCdaTI98K2Pt4/W2CEcucSNzb4tWptj7noreCTQL4iLodTC7x4MMk2wscNFCKZUW5J2HCB8eds6pK7hYTt5wjo+ARJdkFvYlanJ7bOBFGLGps3UP4Rj5K3h2hM+7nGwt4yddDLYMaBwfwjpfo4f4ayX7pnMvwfn3WCfD9f4ps430WbSqPOvuHLAxcO7th6EOoLmS0/5RDFL+Gk96WHgr51A5RdPUoN3O1Qa4sl6nsPCJmC64mR7Mm62ZYeYCvUXgf7cZYzX7/dLIK2u0pkRQa3axkZgR+COcmAImZL8ffSNxOFRpQPPBNWoEZhlOTXwKmkSJjfiWYvCUGRmx3DFM1Tra88ctWkLh3B77wcDFBtUZEmA8KYS+ies8ctQyndHtzU1oJ2gxOD3Ye64fWRprZl+ApeFNTgBlu+kMe/vs8i504ERBur421iOqbnfP3IDqIuizC5zkSXG2JEAT1rvLtuf2tBuTbB6h/jYZtFssboXENlw++ZopIO5ZAbFaXMxBPPc=
         | 
| 18 | 
            +
              gem: elastic-rails
         | 
| 19 | 
            +
              on:
         | 
| 20 | 
            +
                tags: true
         | 
| 21 | 
            +
                repo: platanus/elastic-rails
         | 
| 22 | 
            +
                branch: master
         | 
    
        data/Makefile
    ADDED
    
    | @@ -0,0 +1,38 @@ | |
| 1 | 
            +
            PROJECT ?= elastic-rails
         | 
| 2 | 
            +
            DOCKER_COMPOSE_FILE ?= docker-compose.services.yml
         | 
| 3 | 
            +
            DOCKER_COMPOSE_ARGS ?= -p $(PROJECT) -f $(DOCKER_COMPOSE_FILE)
         | 
| 4 | 
            +
            SHELL := /bin/bash
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            run: help
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            BOLD ?= $(shell tput bold)
         | 
| 9 | 
            +
            NORMAL ?= $(shell tput sgr0)
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            help:
         | 
| 12 | 
            +
            	@echo Run elasticsearch for development:
         | 
| 13 | 
            +
            	@echo "  ${BOLD}make services-up${NORMAL}"
         | 
| 14 | 
            +
            	@echo ""
         | 
| 15 | 
            +
            	@echo "Reset the environment:"
         | 
| 16 | 
            +
            	@echo "  ${BOLD}make services-destroy${NORMAL}"
         | 
| 17 | 
            +
            	@echo ""
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            services: services-up
         | 
| 20 | 
            +
             | 
| 21 | 
            +
            services-ps:
         | 
| 22 | 
            +
            	docker-compose $(DOCKER_COMPOSE_ARGS) ps
         | 
| 23 | 
            +
             | 
| 24 | 
            +
            services-up:
         | 
| 25 | 
            +
            	docker-compose $(DOCKER_COMPOSE_ARGS) up -d
         | 
| 26 | 
            +
             | 
| 27 | 
            +
            services-stop:
         | 
| 28 | 
            +
            	docker-compose $(DOCKER_COMPOSE_ARGS) stop
         | 
| 29 | 
            +
             | 
| 30 | 
            +
            services-destroy:
         | 
| 31 | 
            +
            	docker-compose $(DOCKER_COMPOSE_ARGS) down --volumes
         | 
| 32 | 
            +
             | 
| 33 | 
            +
            services-logs:
         | 
| 34 | 
            +
            	docker-compose $(DOCKER_COMPOSE_ARGS) logs -f
         | 
| 35 | 
            +
             | 
| 36 | 
            +
            services-port:
         | 
| 37 | 
            +
            	@set -o pipefail; \
         | 
| 38 | 
            +
            	docker-compose $(DOCKER_COMPOSE_ARGS) port ${SERVICE} ${PORT} 2> /dev/null | cut -d':' -f2 || echo ${PORT}
         | 
| @@ -0,0 +1,16 @@ | |
| 1 | 
            +
            version: '3'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            services:
         | 
| 4 | 
            +
              elasticsearch:
         | 
| 5 | 
            +
                image: elasticsearch:6.7.0
         | 
| 6 | 
            +
                ports:
         | 
| 7 | 
            +
                  - 9200
         | 
| 8 | 
            +
                volumes:
         | 
| 9 | 
            +
                  - elasticsearch_data:/usr/share/elasticsearch/data
         | 
| 10 | 
            +
                environment:
         | 
| 11 | 
            +
                  - discovery.type=single-node
         | 
| 12 | 
            +
                  - bootstrap.memory_lock=true
         | 
| 13 | 
            +
                  - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            volumes:
         | 
| 16 | 
            +
              elasticsearch_data:
         | 
    
        data/elastic.gemspec
    CHANGED
    
    | @@ -19,18 +19,17 @@ Gem::Specification.new do |spec| | |
| 19 19 | 
             
              spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
         | 
| 20 20 | 
             
              spec.require_paths = ["lib"]
         | 
| 21 21 |  | 
| 22 | 
            -
              spec.add_dependency "elasticsearch", "~>  | 
| 22 | 
            +
              spec.add_dependency "elasticsearch", "~> 6.3.1"
         | 
| 23 23 | 
             
              spec.add_dependency "activesupport"
         | 
| 24 24 |  | 
| 25 | 
            -
              spec.add_development_dependency " | 
| 25 | 
            +
              spec.add_development_dependency "dotenv"
         | 
| 26 | 
            +
              spec.add_development_dependency "bundler", "~> 2.0"
         | 
| 26 27 | 
             
              spec.add_development_dependency "rake", "~> 10.4"
         | 
| 27 28 | 
             
              spec.add_development_dependency "rspec", "~> 3.1"
         | 
| 28 29 | 
             
              spec.add_development_dependency "rspec-nc", "~> 0.2"
         | 
| 29 30 | 
             
              spec.add_development_dependency "guard", "~> 2.11"
         | 
| 30 31 | 
             
              spec.add_development_dependency "guard-rspec", "~> 4.5"
         | 
| 31 32 | 
             
              spec.add_development_dependency "terminal-notifier-guard", "~> 1.6", ">= 1.6.1"
         | 
| 32 | 
            -
              spec.add_development_dependency "pry", "~> 0. | 
| 33 | 
            -
              spec.add_development_dependency "pry- | 
| 34 | 
            -
              spec.add_development_dependency "pry-byebug", "~> 3.2"
         | 
| 35 | 
            -
              spec.add_development_dependency "pry-nav", "~> 0.2"
         | 
| 33 | 
            +
              spec.add_development_dependency "pry", "~> 0.12.2"
         | 
| 34 | 
            +
              spec.add_development_dependency "pry-nav", "~> 0.3.0"
         | 
| 36 35 | 
             
            end
         | 
| @@ -1,8 +1,8 @@ | |
| 1 1 | 
             
            module Elastic::Commands
         | 
| 2 2 | 
             
              class CompareMappings < Elastic::Support::Command.new(:current, :user)
         | 
| 3 3 | 
             
                def perform
         | 
| 4 | 
            -
                  user_properties. | 
| 5 | 
            -
                     | 
| 4 | 
            +
                  user_properties.reject do |field, property|
         | 
| 5 | 
            +
                    compare_field_properties(current_properties[field], property)
         | 
| 6 6 | 
             
                  end.map { |f| f[0] }
         | 
| 7 7 | 
             
                end
         | 
| 8 8 |  | 
| @@ -4,23 +4,15 @@ module Elastic::Commands | |
| 4 4 | 
             
              )
         | 
| 5 5 | 
             
                def perform
         | 
| 6 6 | 
             
                  if collection.present?
         | 
| 7 | 
            -
                     | 
| 7 | 
            +
                    target.collect_from(collection, middleware_options) { |obj| queue obj }
         | 
| 8 8 | 
             
                  else
         | 
| 9 | 
            -
                     | 
| 9 | 
            +
                    target.collect_all(middleware_options) { |obj| queue obj }
         | 
| 10 10 | 
             
                  end
         | 
| 11 11 | 
             
                  flush
         | 
| 12 12 | 
             
                end
         | 
| 13 13 |  | 
| 14 14 | 
             
                private
         | 
| 15 15 |  | 
| 16 | 
            -
                def import_collection
         | 
| 17 | 
            -
                  main_target.collect_from(collection, middleware_options) { |obj| queue obj }
         | 
| 18 | 
            -
                end
         | 
| 19 | 
            -
             | 
| 20 | 
            -
                def import_target(_target)
         | 
| 21 | 
            -
                  _target.collect_all(middleware_options) { |obj| queue obj }
         | 
| 22 | 
            -
                end
         | 
| 23 | 
            -
             | 
| 24 16 | 
             
                def cache
         | 
| 25 17 | 
             
                  @cache ||= []
         | 
| 26 18 | 
             
                end
         | 
| @@ -48,12 +40,8 @@ module Elastic::Commands | |
| 48 40 | 
             
                  index.new(_object).as_elastic_document
         | 
| 49 41 | 
             
                end
         | 
| 50 42 |  | 
| 51 | 
            -
                def  | 
| 52 | 
            -
                  index.definition. | 
| 53 | 
            -
                end
         | 
| 54 | 
            -
             | 
| 55 | 
            -
                def targets
         | 
| 56 | 
            -
                  index.definition.targets
         | 
| 43 | 
            +
                def target
         | 
| 44 | 
            +
                  index.definition.target
         | 
| 57 45 | 
             
                end
         | 
| 58 46 |  | 
| 59 47 | 
             
                def middleware_options
         | 
| @@ -1,8 +1,9 @@ | |
| 1 1 | 
             
            module Elastic::Core
         | 
| 2 2 | 
             
              class Connector
         | 
| 3 | 
            -
                 | 
| 3 | 
            +
                DEFAULT_TYPE = '_doc'
         | 
| 4 | 
            +
             | 
| 5 | 
            +
                def initialize(_name, _mapping, settling_time: 10.seconds)
         | 
| 4 6 | 
             
                  @name = _name
         | 
| 5 | 
            -
                  @types = _types
         | 
| 6 7 | 
             
                  @mapping = _mapping
         | 
| 7 8 | 
             
                  @settling_time = settling_time
         | 
| 8 9 | 
             
                end
         | 
| @@ -17,6 +18,7 @@ module Elastic::Core | |
| 17 18 | 
             
                  actual_name = resolve_actual_index_name
         | 
| 18 19 | 
             
                  return :not_available if actual_name.nil?
         | 
| 19 20 | 
             
                  return :not_synchronized unless mapping_synchronized? actual_name
         | 
| 21 | 
            +
             | 
| 20 22 | 
             
                  :ready
         | 
| 21 23 | 
             
                end
         | 
| 22 24 |  | 
| @@ -31,7 +33,7 @@ module Elastic::Core | |
| 31 33 | 
             
                    create_from_scratch
         | 
| 32 34 | 
             
                  when :not_synchronized
         | 
| 33 35 | 
             
                    begin
         | 
| 34 | 
            -
                       | 
| 36 | 
            +
                      setup_index_mapping resolve_actual_index_name
         | 
| 35 37 | 
             
                    rescue Elasticsearch::Transport::Transport::Errors::BadRequest
         | 
| 36 38 | 
             
                      return false
         | 
| 37 39 | 
             
                    end
         | 
| @@ -46,7 +48,6 @@ module Elastic::Core | |
| 46 48 | 
             
                      copy_to new_index, batch_size: batch_size
         | 
| 47 49 | 
             
                    end
         | 
| 48 50 | 
             
                  end
         | 
| 49 | 
            -
             | 
| 50 51 | 
             
                  nil
         | 
| 51 52 | 
             
                end
         | 
| 52 53 |  | 
| @@ -55,7 +56,7 @@ module Elastic::Core | |
| 55 56 |  | 
| 56 57 | 
             
                  # TODO: validate document type
         | 
| 57 58 | 
             
                  operations = write_indices.map do |write_index|
         | 
| 58 | 
            -
                    { 'index' => _document.merge('_index' => write_index) }
         | 
| 59 | 
            +
                    { 'index' => _document.merge('_index' => write_index, '_type' => DEFAULT_TYPE) }
         | 
| 59 60 | 
             
                  end
         | 
| 60 61 |  | 
| 61 62 | 
             
                  api.bulk(body: operations)
         | 
| @@ -65,7 +66,7 @@ module Elastic::Core | |
| 65 66 | 
             
                  return if Elastic.config.disable_indexing
         | 
| 66 67 |  | 
| 67 68 | 
             
                  # TODO: validate documents type
         | 
| 68 | 
            -
                  body = _documents.map { |doc| { 'index' => doc } }
         | 
| 69 | 
            +
                  body = _documents.map { |doc| { 'index' => doc.merge('_type' => DEFAULT_TYPE) } }
         | 
| 69 70 |  | 
| 70 71 | 
             
                  write_indices.each do |write_index|
         | 
| 71 72 | 
             
                    retry_on_temporary_error('bulk indexing') do
         | 
| @@ -76,20 +77,18 @@ module Elastic::Core | |
| 76 77 |  | 
| 77 78 | 
             
                def delete(_document)
         | 
| 78 79 | 
             
                  raise ArgumentError, 'document must provide an id' unless _document['_id']
         | 
| 79 | 
            -
                  raise ArgumentError, 'document must provide a type' unless _document['_type']
         | 
| 80 80 |  | 
| 81 81 | 
             
                  return if Elastic.config.disable_indexing
         | 
| 82 82 |  | 
| 83 83 | 
             
                  write_index, rolling_index = write_indices
         | 
| 84 84 |  | 
| 85 | 
            -
                  operations = [{ | 
| 85 | 
            +
                  operations = [{
         | 
| 86 | 
            +
                    'delete' => _document.merge('_index' => write_index, '_type' => DEFAULT_TYPE)
         | 
| 87 | 
            +
                  }]
         | 
| 86 88 |  | 
| 87 89 | 
             
                  if rolling_index
         | 
| 88 90 | 
             
                    operations << {
         | 
| 89 | 
            -
                      ' | 
| 90 | 
            -
                        '_index' => rolling_index,
         | 
| 91 | 
            -
                        'data' => { '_mark_for_deletion' => true }
         | 
| 92 | 
            -
                      )
         | 
| 91 | 
            +
                      'delete' => _document.merge('_index' => rolling_index, '_type' => DEFAULT_TYPE)
         | 
| 93 92 | 
             
                    }
         | 
| 94 93 | 
             
                  end
         | 
| 95 94 |  | 
| @@ -100,16 +99,16 @@ module Elastic::Core | |
| 100 99 | 
             
                  api.indices.refresh index: index_name
         | 
| 101 100 | 
             
                end
         | 
| 102 101 |  | 
| 103 | 
            -
                def find( | 
| 104 | 
            -
                  api.get(index: index_name,  | 
| 102 | 
            +
                def find(_id)
         | 
| 103 | 
            +
                  api.get(index: index_name, id: _id)
         | 
| 105 104 | 
             
                end
         | 
| 106 105 |  | 
| 107 | 
            -
                def count(query: nil | 
| 108 | 
            -
                  api.count(index: index_name,  | 
| 106 | 
            +
                def count(query: nil)
         | 
| 107 | 
            +
                  api.count(index: index_name, body: query)['count']
         | 
| 109 108 | 
             
                end
         | 
| 110 109 |  | 
| 111 | 
            -
                def query(query: nil | 
| 112 | 
            -
                  api.search(index: index_name,  | 
| 110 | 
            +
                def query(query: nil)
         | 
| 111 | 
            +
                  api.search(index: index_name, body: query)
         | 
| 113 112 | 
             
                end
         | 
| 114 113 |  | 
| 115 114 | 
             
                def rollover(&_block) # rubocop:disable Metrics/MethodLength
         | 
| @@ -125,12 +124,11 @@ module Elastic::Core | |
| 125 124 | 
             
                    transfer_alias(write_index_alias, to: new_index)
         | 
| 126 125 | 
             
                    wait_for_index_to_stabilize
         | 
| 127 126 | 
             
                    perform_optimized_write_on(new_index, &_block)
         | 
| 128 | 
            -
                    delete_marked_for_deletion new_index
         | 
| 129 127 | 
             
                    transfer_alias(index_name, from: actual_index, to: new_index)
         | 
| 130 128 | 
             
                    transfer_alias(write_index_alias, from: actual_index)
         | 
| 131 129 | 
             
                    wait_for_index_to_stabilize
         | 
| 132 130 | 
             
                    api.indices.delete index: actual_index
         | 
| 133 | 
            -
                  rescue
         | 
| 131 | 
            +
                  rescue StandardError
         | 
| 134 132 | 
             
                    api.indices.delete index: new_index
         | 
| 135 133 | 
             
                    raise
         | 
| 136 134 | 
             
                  end
         | 
| @@ -170,7 +168,8 @@ module Elastic::Core | |
| 170 168 | 
             
                private
         | 
| 171 169 |  | 
| 172 170 | 
             
                def wait_for_index_to_stabilize
         | 
| 173 | 
            -
                  return if @settling_time | 
| 171 | 
            +
                  return if @settling_time.zero?
         | 
| 172 | 
            +
             | 
| 174 173 | 
             
                  Elastic.logger.info "Waiting #{@settling_time * 1.2}s for write indices to catch up ..."
         | 
| 175 174 | 
             
                  sleep(@settling_time * 1.2)
         | 
| 176 175 | 
             
                end
         | 
| @@ -212,10 +211,6 @@ module Elastic::Core | |
| 212 211 | 
             
                  end
         | 
| 213 212 | 
             
                end
         | 
| 214 213 |  | 
| 215 | 
            -
                def delete_marked_for_deletion(_index)
         | 
| 216 | 
            -
                  api.delete_by_query(index: _index, body: { query: { term: { _mark_for_deletion: true } } })
         | 
| 217 | 
            -
                end
         | 
| 218 | 
            -
             | 
| 219 214 | 
             
                def write_indices_expired?
         | 
| 220 215 | 
             
                  @write_indices_expiration && @write_indices_expiration < Time.current
         | 
| 221 216 | 
             
                end
         | 
| @@ -231,7 +226,7 @@ module Elastic::Core | |
| 231 226 | 
             
                  new_name = "#{index_name}:#{Time.now.to_i}"
         | 
| 232 227 | 
             
                  api.indices.create index: new_name
         | 
| 233 228 | 
             
                  api.cluster.health wait_for_status: 'yellow'
         | 
| 234 | 
            -
                   | 
| 229 | 
            +
                  setup_index_mapping new_name
         | 
| 235 230 | 
             
                  new_name
         | 
| 236 231 | 
             
                end
         | 
| 237 232 |  | 
| @@ -248,25 +243,20 @@ module Elastic::Core | |
| 248 243 | 
             
                end
         | 
| 249 244 |  | 
| 250 245 | 
             
                def mapping_synchronized?(_index)
         | 
| 251 | 
            -
                  type_mappings = api.indices.get_mapping(index: _index)
         | 
| 246 | 
            +
                  type_mappings = api.indices.get_mapping(index: _index, include_type_name: false)
         | 
| 252 247 | 
             
                  return false if type_mappings[_index].nil?
         | 
| 253 | 
            -
                   | 
| 248 | 
            +
                  return false if type_mappings[_index]['mappings'].empty?
         | 
| 254 249 |  | 
| 255 | 
            -
                   | 
| 256 | 
            -
                     | 
| 250 | 
            +
                  diff = Elastic::Commands::CompareMappings.for(
         | 
| 251 | 
            +
                    current: type_mappings[_index]['mappings'],
         | 
| 252 | 
            +
                    user: @mapping
         | 
| 253 | 
            +
                  )
         | 
| 257 254 |  | 
| 258 | 
            -
             | 
| 259 | 
            -
                      current: type_mappings[type],
         | 
| 260 | 
            -
                      user: @mapping
         | 
| 261 | 
            -
                    )
         | 
| 262 | 
            -
                    diff.empty?
         | 
| 263 | 
            -
                  end
         | 
| 255 | 
            +
                  diff.empty?
         | 
| 264 256 | 
             
                end
         | 
| 265 257 |  | 
| 266 | 
            -
                def  | 
| 267 | 
            -
                   | 
| 268 | 
            -
                    api.indices.put_mapping(index: _index, type: type, body: @mapping)
         | 
| 269 | 
            -
                  end
         | 
| 258 | 
            +
                def setup_index_mapping(_index)
         | 
| 259 | 
            +
                  api.indices.put_mapping(index: _index, type: DEFAULT_TYPE, body: @mapping)
         | 
| 270 260 | 
             
                end
         | 
| 271 261 |  | 
| 272 262 | 
             
                def transfer_alias(_alias, from: nil, to: nil)
         | 
| @@ -284,7 +274,7 @@ module Elastic::Core | |
| 284 274 | 
             
                  {
         | 
| 285 275 | 
             
                    'create' => {
         | 
| 286 276 | 
             
                      '_id' => _hit['_id'],
         | 
| 287 | 
            -
                      '_type' =>  | 
| 277 | 
            +
                      '_type' => DEFAULT_TYPE,
         | 
| 288 278 | 
             
                      'data' => _hit['_source']
         | 
| 289 279 | 
             
                    }
         | 
| 290 280 | 
             
                  }
         | 
| @@ -295,7 +285,7 @@ module Elastic::Core | |
| 295 285 | 
             
                end
         | 
| 296 286 |  | 
| 297 287 | 
             
                def retry_on_temporary_error(_action, retries: 3)
         | 
| 298 | 
            -
                   | 
| 288 | 
            +
                  yield
         | 
| 299 289 | 
             
                rescue Elasticsearch::Transport::Transport::Errors::ServiceUnavailable,
         | 
| 300 290 | 
             
                       Elasticsearch::Transport::Transport::Errors::GatewayTimeout => exc
         | 
| 301 291 | 
             
                  raise if retries <= 0
         | 
| @@ -2,29 +2,22 @@ module Elastic::Core | |
| 2 2 | 
             
              class Definition
         | 
| 3 3 | 
             
                attr_reader :middleware_options
         | 
| 4 4 |  | 
| 5 | 
            -
                def  | 
| 6 | 
            -
                   | 
| 7 | 
            -
                end
         | 
| 5 | 
            +
                def target
         | 
| 6 | 
            +
                  raise 'attempting to access target before definition has been frozen' if @target_cache.nil?
         | 
| 8 7 |  | 
| 9 | 
            -
                def targets
         | 
| 10 | 
            -
                  raise 'attempting to access targets before definition has been frozen' if @target_cache.nil?
         | 
| 11 8 | 
             
                  @target_cache
         | 
| 12 9 | 
             
                end
         | 
| 13 10 |  | 
| 14 | 
            -
                def  | 
| 15 | 
            -
                  @ | 
| 16 | 
            -
                end
         | 
| 17 | 
            -
             | 
| 18 | 
            -
                def types
         | 
| 19 | 
            -
                  targets.map(&:type_name)
         | 
| 11 | 
            +
                def target=(_value)
         | 
| 12 | 
            +
                  @target = _value
         | 
| 20 13 | 
             
                end
         | 
| 21 14 |  | 
| 22 15 | 
             
                def mode
         | 
| 23 | 
            -
                   | 
| 16 | 
            +
                  target.mode
         | 
| 24 17 | 
             
                end
         | 
| 25 18 |  | 
| 26 19 | 
             
                def initialize
         | 
| 27 | 
            -
                  @ | 
| 20 | 
            +
                  @target = nil
         | 
| 28 21 | 
             
                  @field_map = {}
         | 
| 29 22 | 
             
                  @field_cache = {}
         | 
| 30 23 | 
             
                  @middleware_options = HashWithIndifferentAccess.new
         | 
| @@ -40,7 +33,8 @@ module Elastic::Core | |
| 40 33 |  | 
| 41 34 | 
             
                def freeze
         | 
| 42 35 | 
             
                  return if frozen?
         | 
| 43 | 
            -
             | 
| 36 | 
            +
             | 
| 37 | 
            +
                  cache_target
         | 
| 44 38 | 
             
                  complete_and_validate_fields
         | 
| 45 39 | 
             
                  freeze_fields
         | 
| 46 40 | 
             
                  @middleware_options.freeze
         | 
| @@ -81,26 +75,19 @@ module Elastic::Core | |
| 81 75 | 
             
                  else
         | 
| 82 76 | 
             
                    parent = @field_map[_name[0...separator]]
         | 
| 83 77 | 
             
                    return nil if parent.nil?
         | 
| 78 | 
            +
             | 
| 84 79 | 
             
                    parent.get_field(_name[separator + 1..-1])
         | 
| 85 80 | 
             
                  end
         | 
| 86 81 | 
             
                end
         | 
| 87 82 |  | 
| 88 | 
            -
                def  | 
| 89 | 
            -
                   | 
| 90 | 
            -
             | 
| 91 | 
            -
             | 
| 92 | 
            -
                def load_targets
         | 
| 93 | 
            -
                  mode = nil
         | 
| 94 | 
            -
                  @targets.map do |target|
         | 
| 95 | 
            -
                    target = target.to_s.camelize.constantize if target.is_a?(Symbol) || target.is_a?(String)
         | 
| 83 | 
            +
                def cache_target
         | 
| 84 | 
            +
                  target = @target
         | 
| 85 | 
            +
                  target = target.to_s.camelize.constantize if @target.is_a?(Symbol) || @target.is_a?(String)
         | 
| 86 | 
            +
                  target = load_target_middleware(target) unless target.class < BaseMiddleware
         | 
| 96 87 |  | 
| 97 | 
            -
             | 
| 98 | 
            -
                    raise 'index target is not indexable' if target.nil?
         | 
| 99 | 
            -
                    raise 'mistmatching indexable mode' if mode && mode != target.mode
         | 
| 100 | 
            -
                    mode = target.mode
         | 
| 88 | 
            +
                  raise 'index target is not indexable' if target.nil?
         | 
| 101 89 |  | 
| 102 | 
            -
             | 
| 103 | 
            -
                  end
         | 
| 90 | 
            +
                  @target_cache = target
         | 
| 104 91 | 
             
                end
         | 
| 105 92 |  | 
| 106 93 | 
             
                def complete_and_validate_fields
         | 
| @@ -127,7 +114,7 @@ module Elastic::Core | |
| 127 114 | 
             
                end
         | 
| 128 115 |  | 
| 129 116 | 
             
                def infer_mapping_options(_name)
         | 
| 130 | 
            -
                   | 
| 117 | 
            +
                  target.field_options_for(_name, middleware_options)
         | 
| 131 118 | 
             
                end
         | 
| 132 119 | 
             
              end
         | 
| 133 120 | 
             
            end
         | 
| @@ -17,7 +17,7 @@ module Elastic::Core | |
| 17 17 | 
             
                end
         | 
| 18 18 |  | 
| 19 19 | 
             
                def as_elastic_document(only_meta: false)
         | 
| 20 | 
            -
                  result = { | 
| 20 | 
            +
                  result = {}
         | 
| 21 21 | 
             
                  result['_id'] = read_attribute_for_indexing(:id) if has_attribute_for_indexing?(:id)
         | 
| 22 22 | 
             
                  result['data'] = as_elastic_source unless only_meta
         | 
| 23 23 | 
             
                  result
         | 
    
        data/lib/elastic/fields/value.rb
    CHANGED
    
    | @@ -84,9 +84,9 @@ module Elastic::Fields | |
| 84 84 | 
             
                def load_registered_datatype(_name)
         | 
| 85 85 | 
             
                  # TODO: replace this with a datatype registry
         | 
| 86 86 | 
             
                  case _name
         | 
| 87 | 
            -
                  when :term
         | 
| 87 | 
            +
                  when :term, :keyword
         | 
| 88 88 | 
             
                    Elastic::Datatypes::Term
         | 
| 89 | 
            -
                  when :string
         | 
| 89 | 
            +
                  when :string, :text
         | 
| 90 90 | 
             
                    Elastic::Datatypes::String
         | 
| 91 91 | 
             
                  when :date
         | 
| 92 92 | 
             
                    Elastic::Datatypes::Date
         | 
    
        data/lib/elastic/nodes/match.rb
    CHANGED
    
    | @@ -29,9 +29,10 @@ module Elastic::Nodes | |
| 29 29 |  | 
| 30 30 | 
             
                def render(_options = {})
         | 
| 31 31 | 
             
                  hash = { 'query' => @query }
         | 
| 32 | 
            -
                  hash['type'] = @mode.to_s unless @mode.nil? || @mode == :boolean
         | 
| 33 32 |  | 
| 34 | 
            -
                   | 
| 33 | 
            +
                  match_mode = @mode.nil? || @mode == :boolean ? 'match' : "match_#{@mode}"
         | 
| 34 | 
            +
             | 
| 35 | 
            +
                  { match_mode => { render_field(_options) => render_boost(hash) } }
         | 
| 35 36 | 
             
                end
         | 
| 36 37 |  | 
| 37 38 | 
             
                private
         | 
    
        data/lib/elastic/query.rb
    CHANGED
    
    | @@ -35,7 +35,7 @@ module Elastic | |
| 35 35 | 
             
                  end
         | 
| 36 36 | 
             
                end
         | 
| 37 37 |  | 
| 38 | 
            -
                def ids | 
| 38 | 
            +
                def ids
         | 
| 39 39 | 
             
                  execute assembler.assemble_ids
         | 
| 40 40 | 
             
                end
         | 
| 41 41 |  | 
| @@ -87,11 +87,7 @@ module Elastic | |
| 87 87 | 
             
                end
         | 
| 88 88 |  | 
| 89 89 | 
             
                def execute(_query)
         | 
| 90 | 
            -
                  raw = @index.connector.query(
         | 
| 91 | 
            -
                    type: @index.definition.types,
         | 
| 92 | 
            -
                    query: _query.render
         | 
| 93 | 
            -
                  )
         | 
| 94 | 
            -
             | 
| 90 | 
            +
                  raw = @index.connector.query(query: _query.render)
         | 
| 95 91 | 
             
                  _query.handle_result(raw, formatter)
         | 
| 96 92 | 
             
                end
         | 
| 97 93 |  | 
| @@ -38,8 +38,8 @@ module Elastic::Railties | |
| 38 38 | 
             
                # rubocop:disable Metrics/CyclomaticComplexity
         | 
| 39 39 | 
             
                def ar_type_to_options(_type)
         | 
| 40 40 | 
             
                  case _type.try(:to_sym)
         | 
| 41 | 
            -
                  when :text              then { type: : | 
| 42 | 
            -
                  when :string            then { type: : | 
| 41 | 
            +
                  when :text              then { type: :text }
         | 
| 42 | 
            +
                  when :string            then { type: :keyword }
         | 
| 43 43 | 
             
                  when :integer           then { type: :long } # not sure..
         | 
| 44 44 | 
             
                  when :float, :decimal   then { type: :double } # not sure..
         | 
| 45 45 | 
             
                  when :date              then { type: :date }
         | 
    
        data/lib/elastic/results/hit.rb
    CHANGED
    
    | @@ -1,10 +1,9 @@ | |
| 1 1 | 
             
            module Elastic::Results
         | 
| 2 2 | 
             
              class Hit < Base
         | 
| 3 | 
            -
                attr_reader : | 
| 3 | 
            +
                attr_reader :id, :score, :source
         | 
| 4 4 | 
             
                attr_accessor :data
         | 
| 5 5 |  | 
| 6 | 
            -
                def initialize( | 
| 7 | 
            -
                  @type = _type
         | 
| 6 | 
            +
                def initialize(_id, _score, _source)
         | 
| 8 7 | 
             
                  @id = _id
         | 
| 9 8 | 
             
                  @score = _score
         | 
| 10 9 | 
             
                  @source = _source
         | 
| @@ -26,21 +26,15 @@ module Elastic::Shims | |
| 26 26 | 
             
                end
         | 
| 27 27 |  | 
| 28 28 | 
             
                def populate(_result)
         | 
| 29 | 
            -
                   | 
| 30 | 
            -
                  groups.each { |t, h| populate_group(t, h) }
         | 
| 31 | 
            -
                end
         | 
| 32 | 
            -
             | 
| 33 | 
            -
                def populate_group(_type_name, _hits)
         | 
| 34 | 
            -
                  target = resolve_target(_type_name)
         | 
| 35 | 
            -
                  raise "Unexpected type name #{_type_name}" if target.nil?
         | 
| 29 | 
            +
                  hits = _result.pick(Elastic::Results::Hit).to_a
         | 
| 36 30 |  | 
| 37 31 | 
             
                  if populate_by_id?
         | 
| 38 | 
            -
                    ids =  | 
| 32 | 
            +
                    ids = hits.map(&:id)
         | 
| 39 33 | 
             
                    objects = target.find_by_ids(ids, middleware_options)
         | 
| 40 | 
            -
                    objects.each_with_index { |o, i|  | 
| 34 | 
            +
                    objects.each_with_index { |o, i| hits[i].data = o }
         | 
| 41 35 | 
             
                  else
         | 
| 42 | 
            -
                     | 
| 43 | 
            -
                      hit.data = target.build_from_data(hit.source, middleware_options)
         | 
| 36 | 
            +
                    hits.each do |hit|
         | 
| 37 | 
            +
                      hit.data = @index.definition.target.build_from_data(hit.source, middleware_options)
         | 
| 44 38 | 
             
                    end
         | 
| 45 39 | 
             
                  end
         | 
| 46 40 | 
             
                end
         | 
| @@ -49,8 +43,8 @@ module Elastic::Shims | |
| 49 43 | 
             
                  @index.definition.mode == :index
         | 
| 50 44 | 
             
                end
         | 
| 51 45 |  | 
| 52 | 
            -
                def  | 
| 53 | 
            -
                  @index.definition. | 
| 46 | 
            +
                def target
         | 
| 47 | 
            +
                  @index.definition.target
         | 
| 54 48 | 
             
                end
         | 
| 55 49 |  | 
| 56 50 | 
             
                def middleware_options
         | 
    
        data/lib/elastic/type.rb
    CHANGED
    
    
| @@ -1,16 +1,12 @@ | |
| 1 1 | 
             
            module Elastic::Types
         | 
| 2 2 | 
             
              class BaseType < Elastic::Core::Serializer
         | 
| 3 3 | 
             
                def self.target=(_name_or_class)
         | 
| 4 | 
            -
                  pre_definition. | 
| 5 | 
            -
                end
         | 
| 6 | 
            -
             | 
| 7 | 
            -
                def self.targets=(_names_or_classes)
         | 
| 8 | 
            -
                  pre_definition.targets = _names_or_classes
         | 
| 4 | 
            +
                  pre_definition.target = _name_or_class
         | 
| 9 5 | 
             
                end
         | 
| 10 6 |  | 
| 11 7 | 
             
                def self.pre_definition
         | 
| 12 8 | 
             
                  @pre_definition ||= Elastic::Core::Definition.new.tap do |definition|
         | 
| 13 | 
            -
                    definition. | 
| 9 | 
            +
                    definition.target = default_target unless default_target.nil?
         | 
| 14 10 | 
             
                  end
         | 
| 15 11 | 
             
                end
         | 
| 16 12 |  | 
    
        data/lib/elastic/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: elastic-rails
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 1.0.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Ignacio Baixas
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2019-05-13 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: elasticsearch
         | 
| @@ -16,20 +16,14 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - "~>"
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version:  | 
| 20 | 
            -
                - - ">="
         | 
| 21 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 22 | 
            -
                    version: 1.0.18
         | 
| 19 | 
            +
                    version: 6.3.1
         | 
| 23 20 | 
             
              type: :runtime
         | 
| 24 21 | 
             
              prerelease: false
         | 
| 25 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 26 23 | 
             
                requirements:
         | 
| 27 24 | 
             
                - - "~>"
         | 
| 28 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 29 | 
            -
                    version:  | 
| 30 | 
            -
                - - ">="
         | 
| 31 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 32 | 
            -
                    version: 1.0.18
         | 
| 26 | 
            +
                    version: 6.3.1
         | 
| 33 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 34 28 | 
             
              name: activesupport
         | 
| 35 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -44,20 +38,34 @@ dependencies: | |
| 44 38 | 
             
                - - ">="
         | 
| 45 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 46 40 | 
             
                    version: '0'
         | 
| 41 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            +
              name: dotenv
         | 
| 43 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            +
                requirements:
         | 
| 45 | 
            +
                - - ">="
         | 
| 46 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            +
                    version: '0'
         | 
| 48 | 
            +
              type: :development
         | 
| 49 | 
            +
              prerelease: false
         | 
| 50 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 | 
            +
                requirements:
         | 
| 52 | 
            +
                - - ">="
         | 
| 53 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            +
                    version: '0'
         | 
| 47 55 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 48 56 | 
             
              name: bundler
         | 
| 49 57 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 50 58 | 
             
                requirements:
         | 
| 51 59 | 
             
                - - "~>"
         | 
| 52 60 | 
             
                  - !ruby/object:Gem::Version
         | 
| 53 | 
            -
                    version: ' | 
| 61 | 
            +
                    version: '2.0'
         | 
| 54 62 | 
             
              type: :development
         | 
| 55 63 | 
             
              prerelease: false
         | 
| 56 64 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 57 65 | 
             
                requirements:
         | 
| 58 66 | 
             
                - - "~>"
         | 
| 59 67 | 
             
                  - !ruby/object:Gem::Version
         | 
| 60 | 
            -
                    version: ' | 
| 68 | 
            +
                    version: '2.0'
         | 
| 61 69 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 62 70 | 
             
              name: rake
         | 
| 63 71 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -154,56 +162,28 @@ dependencies: | |
| 154 162 | 
             
                requirements:
         | 
| 155 163 | 
             
                - - "~>"
         | 
| 156 164 | 
             
                  - !ruby/object:Gem::Version
         | 
| 157 | 
            -
                    version:  | 
| 165 | 
            +
                    version: 0.12.2
         | 
| 158 166 | 
             
              type: :development
         | 
| 159 167 | 
             
              prerelease: false
         | 
| 160 168 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 161 169 | 
             
                requirements:
         | 
| 162 170 | 
             
                - - "~>"
         | 
| 163 171 | 
             
                  - !ruby/object:Gem::Version
         | 
| 164 | 
            -
                    version:  | 
| 165 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 166 | 
            -
              name: pry-remote
         | 
| 167 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 168 | 
            -
                requirements:
         | 
| 169 | 
            -
                - - "~>"
         | 
| 170 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 171 | 
            -
                    version: '0.1'
         | 
| 172 | 
            -
              type: :development
         | 
| 173 | 
            -
              prerelease: false
         | 
| 174 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 175 | 
            -
                requirements:
         | 
| 176 | 
            -
                - - "~>"
         | 
| 177 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 178 | 
            -
                    version: '0.1'
         | 
| 179 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 180 | 
            -
              name: pry-byebug
         | 
| 181 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 182 | 
            -
                requirements:
         | 
| 183 | 
            -
                - - "~>"
         | 
| 184 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 185 | 
            -
                    version: '3.2'
         | 
| 186 | 
            -
              type: :development
         | 
| 187 | 
            -
              prerelease: false
         | 
| 188 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 189 | 
            -
                requirements:
         | 
| 190 | 
            -
                - - "~>"
         | 
| 191 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 192 | 
            -
                    version: '3.2'
         | 
| 172 | 
            +
                    version: 0.12.2
         | 
| 193 173 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 194 174 | 
             
              name: pry-nav
         | 
| 195 175 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 196 176 | 
             
                requirements:
         | 
| 197 177 | 
             
                - - "~>"
         | 
| 198 178 | 
             
                  - !ruby/object:Gem::Version
         | 
| 199 | 
            -
                    version:  | 
| 179 | 
            +
                    version: 0.3.0
         | 
| 200 180 | 
             
              type: :development
         | 
| 201 181 | 
             
              prerelease: false
         | 
| 202 182 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 203 183 | 
             
                requirements:
         | 
| 204 184 | 
             
                - - "~>"
         | 
| 205 185 | 
             
                  - !ruby/object:Gem::Version
         | 
| 206 | 
            -
                    version:  | 
| 186 | 
            +
                    version: 0.3.0
         | 
| 207 187 | 
             
            description: Elasticsearch integration for Ruby on Rails by Platanus
         | 
| 208 188 | 
             
            email:
         | 
| 209 189 | 
             
            - ignacio@platan.us
         | 
| @@ -211,6 +191,7 @@ executables: [] | |
| 211 191 | 
             
            extensions: []
         | 
| 212 192 | 
             
            extra_rdoc_files: []
         | 
| 213 193 | 
             
            files:
         | 
| 194 | 
            +
            - ".env"
         | 
| 214 195 | 
             
            - ".gitignore"
         | 
| 215 196 | 
             
            - ".rspec"
         | 
| 216 197 | 
             
            - ".travis.yml"
         | 
| @@ -218,10 +199,12 @@ files: | |
| 218 199 | 
             
            - Gemfile
         | 
| 219 200 | 
             
            - Guardfile
         | 
| 220 201 | 
             
            - LICENSE.txt
         | 
| 202 | 
            +
            - Makefile
         | 
| 221 203 | 
             
            - README.md
         | 
| 222 204 | 
             
            - Rakefile
         | 
| 223 205 | 
             
            - bin/console
         | 
| 224 206 | 
             
            - bin/setup
         | 
| 207 | 
            +
            - docker-compose.services.yml
         | 
| 225 208 | 
             
            - elastic.gemspec
         | 
| 226 209 | 
             
            - lib/elastic-rails.rb
         | 
| 227 210 | 
             
            - lib/elastic.rb
         | 
| @@ -348,7 +331,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 348 331 | 
             
                  version: '0'
         | 
| 349 332 | 
             
            requirements: []
         | 
| 350 333 | 
             
            rubyforge_project: 
         | 
| 351 | 
            -
            rubygems_version: 2.6. | 
| 334 | 
            +
            rubygems_version: 2.6.14.1
         | 
| 352 335 | 
             
            signing_key: 
         | 
| 353 336 | 
             
            specification_version: 4
         | 
| 354 337 | 
             
            summary: Elasticsearch integration for Ruby on Rails by Platanus
         |