elasticsearch-model 6.0.0 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -0
- data/README.md +14 -7
- data/Rakefile +27 -36
- data/elasticsearch-model.gemspec +1 -1
- data/examples/activerecord_mapping_completion.rb +2 -15
- data/gemfiles/3.0.gemfile +6 -1
- data/gemfiles/4.0.gemfile +7 -1
- data/gemfiles/5.0.gemfile +6 -0
- data/lib/elasticsearch/model.rb +15 -8
- data/lib/elasticsearch/model/adapters/active_record.rb +7 -26
- data/lib/elasticsearch/model/indexing.rb +5 -3
- data/lib/elasticsearch/model/naming.rb +6 -1
- data/lib/elasticsearch/model/response.rb +2 -2
- data/lib/elasticsearch/model/response/pagination.rb +2 -192
- data/lib/elasticsearch/model/response/pagination/kaminari.rb +109 -0
- data/lib/elasticsearch/model/response/pagination/will_paginate.rb +95 -0
- data/lib/elasticsearch/model/response/result.rb +1 -1
- data/lib/elasticsearch/model/version.rb +1 -1
- data/spec/elasticsearch/model/adapter_spec.rb +119 -0
- data/spec/elasticsearch/model/adapters/active_record/associations_spec.rb +334 -0
- data/spec/elasticsearch/model/adapters/active_record/basic_spec.rb +340 -0
- data/spec/elasticsearch/model/adapters/active_record/dynamic_index_name_spec.rb +18 -0
- data/spec/elasticsearch/model/adapters/active_record/import_spec.rb +187 -0
- data/spec/elasticsearch/model/adapters/active_record/multi_model_spec.rb +110 -0
- data/spec/elasticsearch/model/adapters/active_record/namespaced_model_spec.rb +38 -0
- data/spec/elasticsearch/model/adapters/active_record/pagination_spec.rb +315 -0
- data/spec/elasticsearch/model/adapters/active_record/parent_child_spec.rb +75 -0
- data/spec/elasticsearch/model/adapters/active_record/serialization_spec.rb +61 -0
- data/spec/elasticsearch/model/adapters/active_record_spec.rb +207 -0
- data/spec/elasticsearch/model/adapters/default_spec.rb +41 -0
- data/spec/elasticsearch/model/adapters/mongoid/basic_spec.rb +267 -0
- data/spec/elasticsearch/model/adapters/mongoid/multi_model_spec.rb +66 -0
- data/spec/elasticsearch/model/adapters/mongoid_spec.rb +235 -0
- data/spec/elasticsearch/model/adapters/multiple_spec.rb +125 -0
- data/spec/elasticsearch/model/callbacks_spec.rb +33 -0
- data/spec/elasticsearch/model/client_spec.rb +66 -0
- data/spec/elasticsearch/model/hash_wrapper_spec.rb +12 -0
- data/spec/elasticsearch/model/importing_spec.rb +214 -0
- data/spec/elasticsearch/model/indexing_spec.rb +918 -0
- data/spec/elasticsearch/model/module_spec.rb +101 -0
- data/spec/elasticsearch/model/multimodel_spec.rb +55 -0
- data/spec/elasticsearch/model/naming_inheritance_spec.rb +184 -0
- data/spec/elasticsearch/model/naming_spec.rb +186 -0
- data/spec/elasticsearch/model/proxy_spec.rb +107 -0
- data/spec/elasticsearch/model/response/aggregations_spec.rb +66 -0
- data/spec/elasticsearch/model/response/base_spec.rb +90 -0
- data/spec/elasticsearch/model/response/pagination/kaminari_spec.rb +410 -0
- data/spec/elasticsearch/model/response/pagination/will_paginate_spec.rb +262 -0
- data/spec/elasticsearch/model/response/records_spec.rb +118 -0
- data/spec/elasticsearch/model/response/response_spec.rb +131 -0
- data/spec/elasticsearch/model/response/result_spec.rb +122 -0
- data/spec/elasticsearch/model/response/results_spec.rb +56 -0
- data/spec/elasticsearch/model/searching_search_request_spec.rb +112 -0
- data/spec/elasticsearch/model/searching_spec.rb +49 -0
- data/spec/elasticsearch/model/serializing_spec.rb +22 -0
- data/spec/spec_helper.rb +161 -0
- data/spec/support/app.rb +21 -0
- data/spec/support/app/answer.rb +33 -0
- data/spec/support/app/article.rb +22 -0
- data/spec/support/app/article_for_pagination.rb +12 -0
- data/spec/support/app/article_with_custom_serialization.rb +13 -0
- data/spec/support/app/article_with_dynamic_index_name.rb +15 -0
- data/spec/support/app/author.rb +9 -0
- data/spec/support/app/authorship.rb +4 -0
- data/spec/support/app/category.rb +3 -0
- data/spec/support/app/comment.rb +3 -0
- data/spec/support/app/episode.rb +11 -0
- data/spec/support/app/image.rb +19 -0
- data/spec/support/app/import_article.rb +12 -0
- data/spec/support/app/mongoid_article.rb +21 -0
- data/spec/support/app/namespaced_book.rb +10 -0
- data/spec/support/app/parent_and_child_searchable.rb +24 -0
- data/spec/support/app/post.rb +14 -0
- data/spec/support/app/question.rb +27 -0
- data/spec/support/app/searchable.rb +48 -0
- data/spec/support/app/series.rb +11 -0
- data/spec/support/model.json +1 -0
- data/{test → spec}/support/model.yml +0 -0
- metadata +129 -86
- data/test/integration/active_record_associations_parent_child_test.rb +0 -188
- data/test/integration/active_record_associations_test.rb +0 -339
- data/test/integration/active_record_basic_test.rb +0 -255
- data/test/integration/active_record_custom_serialization_test.rb +0 -67
- data/test/integration/active_record_import_test.rb +0 -168
- data/test/integration/active_record_namespaced_model_test.rb +0 -56
- data/test/integration/active_record_pagination_test.rb +0 -149
- data/test/integration/dynamic_index_name_test.rb +0 -52
- data/test/integration/mongoid_basic_test.rb +0 -240
- data/test/integration/multiple_models_test.rb +0 -176
- data/test/support/model.json +0 -1
- data/test/test_helper.rb +0 -92
- data/test/unit/adapter_active_record_test.rb +0 -157
- data/test/unit/adapter_default_test.rb +0 -41
- data/test/unit/adapter_mongoid_test.rb +0 -161
- data/test/unit/adapter_multiple_test.rb +0 -106
- data/test/unit/adapter_test.rb +0 -69
- data/test/unit/callbacks_test.rb +0 -31
- data/test/unit/client_test.rb +0 -27
- data/test/unit/hash_wrapper_test.rb +0 -13
- data/test/unit/importing_test.rb +0 -224
- data/test/unit/indexing_test.rb +0 -720
- data/test/unit/module_test.rb +0 -68
- data/test/unit/multimodel_test.rb +0 -38
- data/test/unit/naming_inheritance_test.rb +0 -94
- data/test/unit/naming_test.rb +0 -103
- data/test/unit/proxy_test.rb +0 -98
- data/test/unit/response_aggregations_test.rb +0 -46
- data/test/unit/response_base_test.rb +0 -40
- data/test/unit/response_pagination_kaminari_test.rb +0 -433
- data/test/unit/response_pagination_will_paginate_test.rb +0 -398
- data/test/unit/response_records_test.rb +0 -91
- data/test/unit/response_result_test.rb +0 -90
- data/test/unit/response_results_test.rb +0 -34
- data/test/unit/response_test.rb +0 -104
- data/test/unit/searching_search_request_test.rb +0 -78
- data/test/unit/searching_test.rb +0 -41
- data/test/unit/serializing_test.rb +0 -17
data/spec/support/app.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'active_record'
|
2
|
+
|
3
|
+
require 'support/app/question'
|
4
|
+
require 'support/app/answer'
|
5
|
+
require 'support/app/parent_and_child_searchable'
|
6
|
+
require 'support/app/article_with_custom_serialization'
|
7
|
+
require 'support/app/import_article'
|
8
|
+
require 'support/app/namespaced_book'
|
9
|
+
require 'support/app/article_for_pagination'
|
10
|
+
require 'support/app/article_with_dynamic_index_name'
|
11
|
+
require 'support/app/episode'
|
12
|
+
require 'support/app/image'
|
13
|
+
require 'support/app/series'
|
14
|
+
require 'support/app/mongoid_article'
|
15
|
+
require 'support/app/article'
|
16
|
+
require 'support/app/searchable'
|
17
|
+
require 'support/app/category'
|
18
|
+
require 'support/app/author'
|
19
|
+
require 'support/app/authorship'
|
20
|
+
require 'support/app/comment'
|
21
|
+
require 'support/app/post'
|
@@ -0,0 +1,33 @@
|
|
1
|
+
class Answer < ActiveRecord::Base
|
2
|
+
include Elasticsearch::Model
|
3
|
+
|
4
|
+
belongs_to :question
|
5
|
+
|
6
|
+
JOIN_TYPE = 'answer'.freeze
|
7
|
+
|
8
|
+
index_name 'questions_and_answers'.freeze
|
9
|
+
document_type 'doc'.freeze
|
10
|
+
|
11
|
+
before_create :randomize_id
|
12
|
+
|
13
|
+
def randomize_id
|
14
|
+
begin
|
15
|
+
self.id = SecureRandom.random_number(1_000_000)
|
16
|
+
end while Answer.where(id: self.id).exists?
|
17
|
+
end
|
18
|
+
|
19
|
+
mapping do
|
20
|
+
indexes :text
|
21
|
+
indexes :author
|
22
|
+
end
|
23
|
+
|
24
|
+
def as_indexed_json(options={})
|
25
|
+
# This line is necessary for differences between ActiveModel::Serializers::JSON#as_json versions
|
26
|
+
json = as_json(options)[JOIN_TYPE] || as_json(options)
|
27
|
+
json.merge(join_field: { name: JOIN_TYPE, parent: question_id })
|
28
|
+
end
|
29
|
+
|
30
|
+
after_commit lambda { __elasticsearch__.index_document(routing: (question_id || 1)) }, on: :create
|
31
|
+
after_commit lambda { __elasticsearch__.update_document(routing: (question_id || 1)) }, on: :update
|
32
|
+
after_commit lambda {__elasticsearch__.delete_document(routing: (question_id || 1)) }, on: :destroy
|
33
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class ::Article < ActiveRecord::Base
|
2
|
+
include Elasticsearch::Model
|
3
|
+
include Elasticsearch::Model::Callbacks
|
4
|
+
|
5
|
+
document_type 'article'
|
6
|
+
|
7
|
+
settings index: {number_of_shards: 1, number_of_replicas: 0} do
|
8
|
+
mapping do
|
9
|
+
indexes :title, type: 'text', analyzer: 'snowball'
|
10
|
+
indexes :body, type: 'text'
|
11
|
+
indexes :clicks, type: 'integer'
|
12
|
+
indexes :created_at, type: 'date'
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def as_indexed_json(options = {})
|
17
|
+
attributes
|
18
|
+
.symbolize_keys
|
19
|
+
.slice(:title, :body, :clicks, :created_at)
|
20
|
+
.merge(suggest_title: title)
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class ::ArticleForPagination < ActiveRecord::Base
|
2
|
+
include Elasticsearch::Model
|
3
|
+
|
4
|
+
scope :published, -> { where(published: true) }
|
5
|
+
|
6
|
+
settings index: { number_of_shards: 1, number_of_replicas: 0 } do
|
7
|
+
mapping do
|
8
|
+
indexes :title, type: 'text', analyzer: 'snowball'
|
9
|
+
indexes :created_at, type: 'date'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class ::ArticleWithCustomSerialization < ActiveRecord::Base
|
2
|
+
include Elasticsearch::Model
|
3
|
+
include Elasticsearch::Model::Callbacks
|
4
|
+
|
5
|
+
mapping do
|
6
|
+
indexes :title
|
7
|
+
end
|
8
|
+
|
9
|
+
def as_indexed_json(options={})
|
10
|
+
# as_json(options.merge root: false).slice('title')
|
11
|
+
{ title: self.title }
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class ::ArticleWithDynamicIndexName < ActiveRecord::Base
|
2
|
+
include Elasticsearch::Model
|
3
|
+
include Elasticsearch::Model::Callbacks
|
4
|
+
|
5
|
+
def self.counter=(value)
|
6
|
+
@counter = 0
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.counter
|
10
|
+
(@counter ||= 0) && @counter += 1
|
11
|
+
end
|
12
|
+
|
13
|
+
mapping { indexes :title }
|
14
|
+
index_name { "articles-#{counter}" }
|
15
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Episode < ActiveRecord::Base
|
2
|
+
include Elasticsearch::Model
|
3
|
+
include Elasticsearch::Model::Callbacks
|
4
|
+
|
5
|
+
settings index: {number_of_shards: 1, number_of_replicas: 0} do
|
6
|
+
mapping do
|
7
|
+
indexes :name, type: 'text', analyzer: 'snowball'
|
8
|
+
indexes :created_at, type: 'date'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class Image
|
2
|
+
include Mongoid::Document
|
3
|
+
include Elasticsearch::Model
|
4
|
+
include Elasticsearch::Model::Callbacks
|
5
|
+
|
6
|
+
field :name, type: String
|
7
|
+
attr_accessible :name if respond_to? :attr_accessible
|
8
|
+
|
9
|
+
settings index: {number_of_shards: 1, number_of_replicas: 0} do
|
10
|
+
mapping do
|
11
|
+
indexes :name, type: 'text', analyzer: 'snowball'
|
12
|
+
indexes :created_at, type: 'date'
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def as_indexed_json(options={})
|
17
|
+
as_json(except: [:_id])
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class ImportArticle < ActiveRecord::Base
|
2
|
+
include Elasticsearch::Model
|
3
|
+
|
4
|
+
scope :popular, -> { where('views >= 5') }
|
5
|
+
|
6
|
+
mapping do
|
7
|
+
indexes :title, type: 'text'
|
8
|
+
indexes :views, type: 'integer'
|
9
|
+
indexes :numeric, type: 'integer'
|
10
|
+
indexes :created_at, type: 'date'
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class ::MongoidArticle
|
2
|
+
include Mongoid::Document
|
3
|
+
include Elasticsearch::Model
|
4
|
+
include Elasticsearch::Model::Callbacks
|
5
|
+
|
6
|
+
field :id, type: String
|
7
|
+
field :title, type: String
|
8
|
+
field :views, type: Integer
|
9
|
+
attr_accessible :title if respond_to? :attr_accessible
|
10
|
+
|
11
|
+
settings index: { number_of_shards: 1, number_of_replicas: 0 } do
|
12
|
+
mapping do
|
13
|
+
indexes :title, type: 'text', analyzer: 'snowball'
|
14
|
+
indexes :created_at, type: 'date'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def as_indexed_json(options={})
|
19
|
+
as_json(except: [:id, :_id])
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module ParentChildSearchable
|
2
|
+
INDEX_NAME = 'questions_and_answers'.freeze
|
3
|
+
JOIN = 'join'.freeze
|
4
|
+
|
5
|
+
def create_index!(options={})
|
6
|
+
client = Question.__elasticsearch__.client
|
7
|
+
client.indices.delete index: INDEX_NAME rescue nil if options[:force]
|
8
|
+
|
9
|
+
settings = Question.settings.to_hash.merge Answer.settings.to_hash
|
10
|
+
mapping_properties = { join_field: { type: JOIN,
|
11
|
+
relations: { Question::JOIN_TYPE => Answer::JOIN_TYPE } } }
|
12
|
+
|
13
|
+
merged_properties = mapping_properties.merge(Question.mappings.to_hash[:doc][:properties]).merge(
|
14
|
+
Answer.mappings.to_hash[:doc][:properties])
|
15
|
+
mappings = { doc: { properties: merged_properties }}
|
16
|
+
|
17
|
+
client.indices.create index: INDEX_NAME,
|
18
|
+
body: {
|
19
|
+
settings: settings.to_hash,
|
20
|
+
mappings: mappings }
|
21
|
+
end
|
22
|
+
|
23
|
+
extend self
|
24
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class Post < ActiveRecord::Base
|
2
|
+
include Searchable
|
3
|
+
|
4
|
+
has_and_belongs_to_many :categories, after_add: [ lambda { |a,c| a.__elasticsearch__.index_document } ],
|
5
|
+
after_remove: [ lambda { |a,c| a.__elasticsearch__.index_document } ]
|
6
|
+
has_many :authorships
|
7
|
+
has_many :authors, through: :authorships,
|
8
|
+
after_add: [ lambda { |a,c| a.__elasticsearch__.index_document } ],
|
9
|
+
after_remove: [ lambda { |a,c| a.__elasticsearch__.index_document } ]
|
10
|
+
has_many :comments, after_add: [ lambda { |a,c| a.__elasticsearch__.index_document } ],
|
11
|
+
after_remove: [ lambda { |a,c| a.__elasticsearch__.index_document } ]
|
12
|
+
|
13
|
+
after_touch() { __elasticsearch__.index_document }
|
14
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class Question < ActiveRecord::Base
|
2
|
+
include Elasticsearch::Model
|
3
|
+
|
4
|
+
has_many :answers, dependent: :destroy
|
5
|
+
|
6
|
+
JOIN_TYPE = 'question'.freeze
|
7
|
+
JOIN_METADATA = { join_field: JOIN_TYPE}.freeze
|
8
|
+
|
9
|
+
index_name 'questions_and_answers'.freeze
|
10
|
+
document_type 'doc'.freeze
|
11
|
+
|
12
|
+
mapping do
|
13
|
+
indexes :title
|
14
|
+
indexes :text
|
15
|
+
indexes :author
|
16
|
+
end
|
17
|
+
|
18
|
+
def as_indexed_json(options={})
|
19
|
+
# This line is necessary for differences between ActiveModel::Serializers::JSON#as_json versions
|
20
|
+
json = as_json(options)[JOIN_TYPE] || as_json(options)
|
21
|
+
json.merge(JOIN_METADATA)
|
22
|
+
end
|
23
|
+
|
24
|
+
after_commit lambda { __elasticsearch__.index_document }, on: :create
|
25
|
+
after_commit lambda { __elasticsearch__.update_document }, on: :update
|
26
|
+
after_commit lambda { __elasticsearch__.delete_document }, on: :destroy
|
27
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module Searchable
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
include Elasticsearch::Model
|
6
|
+
include Elasticsearch::Model::Callbacks
|
7
|
+
|
8
|
+
# Set up the mapping
|
9
|
+
#
|
10
|
+
settings index: { number_of_shards: 1, number_of_replicas: 0 } do
|
11
|
+
mapping do
|
12
|
+
indexes :title, analyzer: 'snowball'
|
13
|
+
indexes :created_at, type: 'date'
|
14
|
+
|
15
|
+
indexes :authors do
|
16
|
+
indexes :first_name
|
17
|
+
indexes :last_name
|
18
|
+
indexes :full_name, type: 'text' do
|
19
|
+
indexes :raw, type: 'keyword'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
indexes :categories, type: 'keyword'
|
24
|
+
|
25
|
+
indexes :comments, type: 'nested' do
|
26
|
+
indexes :text
|
27
|
+
indexes :author
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# Customize the JSON serialization for Elasticsearch
|
33
|
+
#
|
34
|
+
def as_indexed_json(options={})
|
35
|
+
{
|
36
|
+
title: title,
|
37
|
+
text: text,
|
38
|
+
categories: categories.map(&:title),
|
39
|
+
authors: authors.as_json(methods: [:full_name], only: [:full_name, :first_name, :last_name]),
|
40
|
+
comments: comments.as_json(only: [:text, :author])
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Update document in the index after touch
|
45
|
+
#
|
46
|
+
after_touch() { __elasticsearch__.index_document }
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Series < ActiveRecord::Base
|
2
|
+
include Elasticsearch::Model
|
3
|
+
include Elasticsearch::Model::Callbacks
|
4
|
+
|
5
|
+
settings index: {number_of_shards: 1, number_of_replicas: 0} do
|
6
|
+
mapping do
|
7
|
+
indexes :name, type: 'text', analyzer: 'snowball'
|
8
|
+
indexes :created_at, type: 'date'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
{ "laz": "qux" }
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: elasticsearch
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -366,6 +366,8 @@ files:
|
|
366
366
|
- lib/elasticsearch/model/response/aggregations.rb
|
367
367
|
- lib/elasticsearch/model/response/base.rb
|
368
368
|
- lib/elasticsearch/model/response/pagination.rb
|
369
|
+
- lib/elasticsearch/model/response/pagination/kaminari.rb
|
370
|
+
- lib/elasticsearch/model/response/pagination/will_paginate.rb
|
369
371
|
- lib/elasticsearch/model/response/records.rb
|
370
372
|
- lib/elasticsearch/model/response/result.rb
|
371
373
|
- lib/elasticsearch/model/response/results.rb
|
@@ -373,45 +375,66 @@ files:
|
|
373
375
|
- lib/elasticsearch/model/searching.rb
|
374
376
|
- lib/elasticsearch/model/serializing.rb
|
375
377
|
- lib/elasticsearch/model/version.rb
|
376
|
-
-
|
377
|
-
-
|
378
|
-
-
|
379
|
-
-
|
380
|
-
-
|
381
|
-
-
|
382
|
-
-
|
383
|
-
-
|
384
|
-
-
|
385
|
-
-
|
386
|
-
-
|
387
|
-
-
|
388
|
-
-
|
389
|
-
-
|
390
|
-
-
|
391
|
-
-
|
392
|
-
-
|
393
|
-
-
|
394
|
-
-
|
395
|
-
-
|
396
|
-
-
|
397
|
-
-
|
398
|
-
-
|
399
|
-
-
|
400
|
-
-
|
401
|
-
-
|
402
|
-
-
|
403
|
-
-
|
404
|
-
-
|
405
|
-
-
|
406
|
-
-
|
407
|
-
-
|
408
|
-
-
|
409
|
-
-
|
410
|
-
-
|
411
|
-
-
|
412
|
-
-
|
413
|
-
-
|
414
|
-
-
|
378
|
+
- spec/elasticsearch/model/adapter_spec.rb
|
379
|
+
- spec/elasticsearch/model/adapters/active_record/associations_spec.rb
|
380
|
+
- spec/elasticsearch/model/adapters/active_record/basic_spec.rb
|
381
|
+
- spec/elasticsearch/model/adapters/active_record/dynamic_index_name_spec.rb
|
382
|
+
- spec/elasticsearch/model/adapters/active_record/import_spec.rb
|
383
|
+
- spec/elasticsearch/model/adapters/active_record/multi_model_spec.rb
|
384
|
+
- spec/elasticsearch/model/adapters/active_record/namespaced_model_spec.rb
|
385
|
+
- spec/elasticsearch/model/adapters/active_record/pagination_spec.rb
|
386
|
+
- spec/elasticsearch/model/adapters/active_record/parent_child_spec.rb
|
387
|
+
- spec/elasticsearch/model/adapters/active_record/serialization_spec.rb
|
388
|
+
- spec/elasticsearch/model/adapters/active_record_spec.rb
|
389
|
+
- spec/elasticsearch/model/adapters/default_spec.rb
|
390
|
+
- spec/elasticsearch/model/adapters/mongoid/basic_spec.rb
|
391
|
+
- spec/elasticsearch/model/adapters/mongoid/multi_model_spec.rb
|
392
|
+
- spec/elasticsearch/model/adapters/mongoid_spec.rb
|
393
|
+
- spec/elasticsearch/model/adapters/multiple_spec.rb
|
394
|
+
- spec/elasticsearch/model/callbacks_spec.rb
|
395
|
+
- spec/elasticsearch/model/client_spec.rb
|
396
|
+
- spec/elasticsearch/model/hash_wrapper_spec.rb
|
397
|
+
- spec/elasticsearch/model/importing_spec.rb
|
398
|
+
- spec/elasticsearch/model/indexing_spec.rb
|
399
|
+
- spec/elasticsearch/model/module_spec.rb
|
400
|
+
- spec/elasticsearch/model/multimodel_spec.rb
|
401
|
+
- spec/elasticsearch/model/naming_inheritance_spec.rb
|
402
|
+
- spec/elasticsearch/model/naming_spec.rb
|
403
|
+
- spec/elasticsearch/model/proxy_spec.rb
|
404
|
+
- spec/elasticsearch/model/response/aggregations_spec.rb
|
405
|
+
- spec/elasticsearch/model/response/base_spec.rb
|
406
|
+
- spec/elasticsearch/model/response/pagination/kaminari_spec.rb
|
407
|
+
- spec/elasticsearch/model/response/pagination/will_paginate_spec.rb
|
408
|
+
- spec/elasticsearch/model/response/records_spec.rb
|
409
|
+
- spec/elasticsearch/model/response/response_spec.rb
|
410
|
+
- spec/elasticsearch/model/response/result_spec.rb
|
411
|
+
- spec/elasticsearch/model/response/results_spec.rb
|
412
|
+
- spec/elasticsearch/model/searching_search_request_spec.rb
|
413
|
+
- spec/elasticsearch/model/searching_spec.rb
|
414
|
+
- spec/elasticsearch/model/serializing_spec.rb
|
415
|
+
- spec/spec_helper.rb
|
416
|
+
- spec/support/app.rb
|
417
|
+
- spec/support/app/answer.rb
|
418
|
+
- spec/support/app/article.rb
|
419
|
+
- spec/support/app/article_for_pagination.rb
|
420
|
+
- spec/support/app/article_with_custom_serialization.rb
|
421
|
+
- spec/support/app/article_with_dynamic_index_name.rb
|
422
|
+
- spec/support/app/author.rb
|
423
|
+
- spec/support/app/authorship.rb
|
424
|
+
- spec/support/app/category.rb
|
425
|
+
- spec/support/app/comment.rb
|
426
|
+
- spec/support/app/episode.rb
|
427
|
+
- spec/support/app/image.rb
|
428
|
+
- spec/support/app/import_article.rb
|
429
|
+
- spec/support/app/mongoid_article.rb
|
430
|
+
- spec/support/app/namespaced_book.rb
|
431
|
+
- spec/support/app/parent_and_child_searchable.rb
|
432
|
+
- spec/support/app/post.rb
|
433
|
+
- spec/support/app/question.rb
|
434
|
+
- spec/support/app/searchable.rb
|
435
|
+
- spec/support/app/series.rb
|
436
|
+
- spec/support/model.json
|
437
|
+
- spec/support/model.yml
|
415
438
|
homepage: https://github.com/elasticsearch/elasticsearch-rails/
|
416
439
|
licenses:
|
417
440
|
- Apache 2
|
@@ -432,48 +455,68 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
432
455
|
- !ruby/object:Gem::Version
|
433
456
|
version: '0'
|
434
457
|
requirements: []
|
435
|
-
|
436
|
-
rubygems_version: 2.7.7
|
458
|
+
rubygems_version: 3.0.4
|
437
459
|
signing_key:
|
438
460
|
specification_version: 4
|
439
461
|
summary: ActiveModel/Record integrations for Elasticsearch.
|
440
462
|
test_files:
|
441
|
-
-
|
442
|
-
-
|
443
|
-
-
|
444
|
-
-
|
445
|
-
-
|
446
|
-
-
|
447
|
-
-
|
448
|
-
-
|
449
|
-
-
|
450
|
-
-
|
451
|
-
-
|
452
|
-
-
|
453
|
-
-
|
454
|
-
-
|
455
|
-
-
|
456
|
-
-
|
457
|
-
-
|
458
|
-
-
|
459
|
-
-
|
460
|
-
-
|
461
|
-
-
|
462
|
-
-
|
463
|
-
-
|
464
|
-
-
|
465
|
-
-
|
466
|
-
-
|
467
|
-
-
|
468
|
-
-
|
469
|
-
-
|
470
|
-
-
|
471
|
-
-
|
472
|
-
-
|
473
|
-
-
|
474
|
-
-
|
475
|
-
-
|
476
|
-
-
|
477
|
-
-
|
478
|
-
-
|
479
|
-
-
|
463
|
+
- spec/elasticsearch/model/adapter_spec.rb
|
464
|
+
- spec/elasticsearch/model/adapters/active_record/associations_spec.rb
|
465
|
+
- spec/elasticsearch/model/adapters/active_record/basic_spec.rb
|
466
|
+
- spec/elasticsearch/model/adapters/active_record/dynamic_index_name_spec.rb
|
467
|
+
- spec/elasticsearch/model/adapters/active_record/import_spec.rb
|
468
|
+
- spec/elasticsearch/model/adapters/active_record/multi_model_spec.rb
|
469
|
+
- spec/elasticsearch/model/adapters/active_record/namespaced_model_spec.rb
|
470
|
+
- spec/elasticsearch/model/adapters/active_record/pagination_spec.rb
|
471
|
+
- spec/elasticsearch/model/adapters/active_record/parent_child_spec.rb
|
472
|
+
- spec/elasticsearch/model/adapters/active_record/serialization_spec.rb
|
473
|
+
- spec/elasticsearch/model/adapters/active_record_spec.rb
|
474
|
+
- spec/elasticsearch/model/adapters/default_spec.rb
|
475
|
+
- spec/elasticsearch/model/adapters/mongoid/basic_spec.rb
|
476
|
+
- spec/elasticsearch/model/adapters/mongoid/multi_model_spec.rb
|
477
|
+
- spec/elasticsearch/model/adapters/mongoid_spec.rb
|
478
|
+
- spec/elasticsearch/model/adapters/multiple_spec.rb
|
479
|
+
- spec/elasticsearch/model/callbacks_spec.rb
|
480
|
+
- spec/elasticsearch/model/client_spec.rb
|
481
|
+
- spec/elasticsearch/model/hash_wrapper_spec.rb
|
482
|
+
- spec/elasticsearch/model/importing_spec.rb
|
483
|
+
- spec/elasticsearch/model/indexing_spec.rb
|
484
|
+
- spec/elasticsearch/model/module_spec.rb
|
485
|
+
- spec/elasticsearch/model/multimodel_spec.rb
|
486
|
+
- spec/elasticsearch/model/naming_inheritance_spec.rb
|
487
|
+
- spec/elasticsearch/model/naming_spec.rb
|
488
|
+
- spec/elasticsearch/model/proxy_spec.rb
|
489
|
+
- spec/elasticsearch/model/response/aggregations_spec.rb
|
490
|
+
- spec/elasticsearch/model/response/base_spec.rb
|
491
|
+
- spec/elasticsearch/model/response/pagination/kaminari_spec.rb
|
492
|
+
- spec/elasticsearch/model/response/pagination/will_paginate_spec.rb
|
493
|
+
- spec/elasticsearch/model/response/records_spec.rb
|
494
|
+
- spec/elasticsearch/model/response/response_spec.rb
|
495
|
+
- spec/elasticsearch/model/response/result_spec.rb
|
496
|
+
- spec/elasticsearch/model/response/results_spec.rb
|
497
|
+
- spec/elasticsearch/model/searching_search_request_spec.rb
|
498
|
+
- spec/elasticsearch/model/searching_spec.rb
|
499
|
+
- spec/elasticsearch/model/serializing_spec.rb
|
500
|
+
- spec/spec_helper.rb
|
501
|
+
- spec/support/app.rb
|
502
|
+
- spec/support/app/answer.rb
|
503
|
+
- spec/support/app/article.rb
|
504
|
+
- spec/support/app/article_for_pagination.rb
|
505
|
+
- spec/support/app/article_with_custom_serialization.rb
|
506
|
+
- spec/support/app/article_with_dynamic_index_name.rb
|
507
|
+
- spec/support/app/author.rb
|
508
|
+
- spec/support/app/authorship.rb
|
509
|
+
- spec/support/app/category.rb
|
510
|
+
- spec/support/app/comment.rb
|
511
|
+
- spec/support/app/episode.rb
|
512
|
+
- spec/support/app/image.rb
|
513
|
+
- spec/support/app/import_article.rb
|
514
|
+
- spec/support/app/mongoid_article.rb
|
515
|
+
- spec/support/app/namespaced_book.rb
|
516
|
+
- spec/support/app/parent_and_child_searchable.rb
|
517
|
+
- spec/support/app/post.rb
|
518
|
+
- spec/support/app/question.rb
|
519
|
+
- spec/support/app/searchable.rb
|
520
|
+
- spec/support/app/series.rb
|
521
|
+
- spec/support/model.json
|
522
|
+
- spec/support/model.yml
|