tire 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tire/dsl.rb +1 -1
- data/lib/tire/index.rb +14 -9
- data/lib/tire/model/persistence.rb +1 -1
- data/lib/tire/model/search.rb +9 -3
- data/lib/tire/results/item.rb +1 -1
- data/lib/tire/search/facet.rb +11 -10
- data/lib/tire/version.rb +5 -29
- data/test/integration/bulk_test.rb +13 -8
- data/test/integration/facets_test.rb +14 -3
- data/test/integration/filtered_queries_test.rb +1 -1
- data/test/integration/filters_test.rb +12 -0
- data/test/test_helper.rb +2 -0
- data/test/unit/index_test.rb +19 -0
- data/test/unit/results_item_test.rb +1 -0
- data/test/unit/search_facet_test.rb +9 -0
- metadata +42 -61
data/lib/tire/dsl.rb
CHANGED
@@ -33,7 +33,7 @@ module Tire
|
|
33
33
|
# Build and perform a [multi-search](http://elasticsearch.org/guide/reference/api/multi-search.html)
|
34
34
|
# request.
|
35
35
|
#
|
36
|
-
# s = Tire.
|
36
|
+
# s = Tire.multi_search 'clients' do
|
37
37
|
# search :names do
|
38
38
|
# query { match :name, 'carpenter' }
|
39
39
|
# end
|
data/lib/tire/index.rb
CHANGED
@@ -90,7 +90,7 @@ module Tire
|
|
90
90
|
logged([type, id].join('/'), curl)
|
91
91
|
end
|
92
92
|
|
93
|
-
# Performs a [
|
93
|
+
# Performs a [bulk](http://www.elasticsearch.org/guide/reference/api/bulk.html) request
|
94
94
|
#
|
95
95
|
# @myindex.bulk :index, [ {id: 1, title: 'One'}, { id: 2, title: 'Two', _version: 3 } ], refresh: true
|
96
96
|
#
|
@@ -115,7 +115,9 @@ module Tire
|
|
115
115
|
type = get_type_from_document(document, :escape => false) # Do not URL-escape the _type
|
116
116
|
id = get_id_from_document(document)
|
117
117
|
|
118
|
-
|
118
|
+
if ENV['DEBUG']
|
119
|
+
STDERR.puts "[ERROR] Document #{document.inspect} does not have ID" unless id
|
120
|
+
end
|
119
121
|
|
120
122
|
header = { action.to_sym => { :_index => name, :_type => type, :_id => id } }
|
121
123
|
|
@@ -373,10 +375,11 @@ module Tire
|
|
373
375
|
code = @response ? @response.code : error.class rescue 'N/A'
|
374
376
|
|
375
377
|
if Configuration.logger.level.to_s == 'debug'
|
376
|
-
body = if @response
|
377
|
-
|
378
|
-
|
379
|
-
|
378
|
+
body = if @response && @response.body && !@response.body.to_s.empty?
|
379
|
+
MultiJson.encode( MultiJson.load(@response.body), :pretty => Configuration.pretty)
|
380
|
+
elsif error && error.message && !error.message.to_s.empty?
|
381
|
+
MultiJson.encode( MultiJson.load(error.message), :pretty => Configuration.pretty) rescue ''
|
382
|
+
else ''
|
380
383
|
end
|
381
384
|
else
|
382
385
|
body = ''
|
@@ -412,7 +415,7 @@ module Tire
|
|
412
415
|
when document.is_a?(Hash)
|
413
416
|
document[:_id] || document['_id'] || document[:id] || document['id']
|
414
417
|
when document.respond_to?(:id) && document.id != document.object_id
|
415
|
-
document.id
|
418
|
+
document.id.as_json
|
416
419
|
end
|
417
420
|
$VERBOSE = old_verbose
|
418
421
|
id
|
@@ -421,8 +424,10 @@ module Tire
|
|
421
424
|
def convert_document_to_json(document)
|
422
425
|
document = case
|
423
426
|
when document.is_a?(String)
|
424
|
-
|
425
|
-
|
427
|
+
if ENV['DEBUG']
|
428
|
+
Tire.warn "Passing the document as JSON string has been deprecated, " +
|
429
|
+
"please pass an object which responds to `to_indexed_json` or a plain Hash."
|
430
|
+
end
|
426
431
|
document
|
427
432
|
when document.respond_to?(:to_indexed_json) then document.to_indexed_json
|
428
433
|
else raise ArgumentError, "Please pass a JSON string or object with a 'to_indexed_json' method," +
|
@@ -45,7 +45,7 @@ module Tire
|
|
45
45
|
|
46
46
|
include Persistence::Storage
|
47
47
|
|
48
|
-
['_score', '_type', '_index', '_version', 'sort', 'highlight', '
|
48
|
+
['_score', '_type', '_index', '_version', 'sort', 'highlight', '_explanation'].each do |attr|
|
49
49
|
define_method("#{attr}=") { |value| @attributes ||= {}; @attributes[attr] = value }
|
50
50
|
define_method("#{attr}") { @attributes[attr] }
|
51
51
|
end
|
data/lib/tire/model/search.rb
CHANGED
@@ -150,7 +150,7 @@ module Tire
|
|
150
150
|
instance._index = response['_index'] if instance.respond_to?(:_index=)
|
151
151
|
instance._type = response['_type'] if instance.respond_to?(:_type=)
|
152
152
|
instance._version = response['_version'] if instance.respond_to?(:_version=)
|
153
|
-
instance.matches
|
153
|
+
instance.tire.matches = response['matches'] if instance.tire.respond_to?(:matches=)
|
154
154
|
self
|
155
155
|
end
|
156
156
|
end
|
@@ -194,11 +194,17 @@ module Tire
|
|
194
194
|
end
|
195
195
|
|
196
196
|
def matches
|
197
|
-
|
197
|
+
instance.instance_eval do
|
198
|
+
@attributes ||= {}
|
199
|
+
@attributes['tire__matches']
|
200
|
+
end
|
198
201
|
end
|
199
202
|
|
200
203
|
def matches=(value)
|
201
|
-
|
204
|
+
instance.instance_eval do
|
205
|
+
@attributes ||= {}
|
206
|
+
@attributes['tire__matches'] = value
|
207
|
+
end
|
202
208
|
end
|
203
209
|
|
204
210
|
end
|
data/lib/tire/results/item.rb
CHANGED
data/lib/tire/search/facet.rb
CHANGED
@@ -11,52 +11,53 @@ module Tire
|
|
11
11
|
def initialize(name, options={}, &block)
|
12
12
|
@name = name
|
13
13
|
@options = options
|
14
|
+
@value = {}
|
14
15
|
block.arity < 1 ? self.instance_eval(&block) : block.call(self) if block_given?
|
15
16
|
end
|
16
17
|
|
17
18
|
def terms(field, options={})
|
18
19
|
size = options.delete(:size) || 10
|
19
20
|
all_terms = options.delete(:all_terms) || false
|
20
|
-
@value = if field.is_a?(Enumerable) and not field.is_a?(String)
|
21
|
-
{ :
|
21
|
+
@value[:terms] = if field.is_a?(Enumerable) and not field.is_a?(String)
|
22
|
+
{ :fields => field }.update({ :size => size, :all_terms => all_terms }).update(options)
|
22
23
|
else
|
23
|
-
{ :
|
24
|
+
{ :field => field }.update({ :size => size, :all_terms => all_terms }).update(options)
|
24
25
|
end
|
25
26
|
self
|
26
27
|
end
|
27
28
|
|
28
29
|
def date(field, options={})
|
29
30
|
interval = options.delete(:interval) || 'day'
|
30
|
-
@value
|
31
|
+
@value[:date_histogram] = { :field => field, :interval => interval }.update(options)
|
31
32
|
self
|
32
33
|
end
|
33
34
|
|
34
35
|
def range(field, ranges=[], options={})
|
35
|
-
@value
|
36
|
+
@value[:range] = { :field => field, :ranges => ranges }.update(options)
|
36
37
|
self
|
37
38
|
end
|
38
39
|
|
39
40
|
def histogram(field, options={})
|
40
|
-
@value
|
41
|
+
@value[:histogram] = (options.delete(:histogram) || {:field => field}.update(options))
|
41
42
|
self
|
42
43
|
end
|
43
44
|
|
44
45
|
def statistical(field, options={})
|
45
|
-
@value
|
46
|
+
@value[:statistical] = (options.delete(:statistical) || {:field => field}.update(options))
|
46
47
|
self
|
47
48
|
end
|
48
49
|
|
49
50
|
def terms_stats(key_field, value_field, options={})
|
50
|
-
@value
|
51
|
+
@value[:terms_stats] = {:key_field => key_field, :value_field => value_field}.update(options)
|
51
52
|
self
|
52
53
|
end
|
53
54
|
|
54
55
|
def query(&block)
|
55
|
-
@value
|
56
|
+
@value[:query] = Query.new(&block).to_hash
|
56
57
|
end
|
57
58
|
|
58
59
|
def filter(type, options={})
|
59
|
-
@value
|
60
|
+
@value[:filter] = Filter.new(type, options)
|
60
61
|
self
|
61
62
|
end
|
62
63
|
|
data/lib/tire/version.rb
CHANGED
@@ -1,36 +1,12 @@
|
|
1
1
|
module Tire
|
2
|
-
VERSION = "0.5.
|
2
|
+
VERSION = "0.5.2"
|
3
3
|
|
4
4
|
CHANGELOG =<<-END
|
5
5
|
IMPORTANT CHANGES LATELY:
|
6
6
|
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
* Added prettified JSON output for logging requests and responses at the `debug` level
|
12
|
-
* Improved the Rake import task
|
13
|
-
* Allow passing of arbitrary objects in the `:as` mapping option [#446]
|
14
|
-
* Allow to define default values for Tire::Model::Persistence `:as` lambdas
|
15
|
-
* Added `@search.results.max_score`
|
16
|
-
* Changed the URI escape/unescape compatibility patch to not require Rack
|
17
|
-
* Allow using the full DSL in filter facets
|
18
|
-
* Allow complex hash options for the `term` query
|
19
|
-
* Allow passing Hash-like objects to `terms` query as well
|
20
|
-
* Implemented `respond_to?` for `Item`
|
21
|
-
* Improved support for Kaminari pagination
|
22
|
-
* Added support for the `parent` URL parameter in `Index#store`
|
23
|
-
* Added the `min_score` and `track_scores` DSL methods
|
24
|
-
* Added support for loading partial fields
|
25
|
-
* Added support for boosting query
|
26
|
-
* Added the `facet_filter` DSL method
|
27
|
-
* Allow passing `routing`, `fields` and `preference` URL parameter to Index#retrieve
|
28
|
-
* Allow building the search request step-by-step in Tire's DSL [#496]
|
29
|
-
* Added a `match` query type
|
30
|
-
* Added support for multisearch (_msearch) and the `Tire.multi_search` DSL method
|
31
|
-
* Added support for multi-search in the ActiveModel integration and in Tire::Model::Persistence
|
32
|
-
* Added support for create and delete actions for Index#bulk
|
33
|
-
* Added support for meta information (`_routing`, `_parent`, etc) in Index#bulk
|
34
|
-
* Added support for URL parameters (`refresh`, `consistency`) in Index#bulk
|
7
|
+
* Fixed bugs in the `matches` Tire method in models
|
8
|
+
* Fixed JSON parser errors when logging empty bodies
|
9
|
+
* Allow arbitrary ordering of methods in the facet DSL block
|
10
|
+
* Fix issues with Mongoid gem (incorrect JSON serialization of Moped::BSON::ObjectId)
|
35
11
|
END
|
36
12
|
end
|
@@ -18,6 +18,8 @@ module Tire
|
|
18
18
|
teardown do
|
19
19
|
@index.delete
|
20
20
|
Tire.index('bulk-test-fresh').delete
|
21
|
+
Tire.index('bulk-test-consistency').delete
|
22
|
+
Tire.index('bulk-test-routing').delete
|
21
23
|
end
|
22
24
|
|
23
25
|
should "store a collection of documents and refresh the index" do
|
@@ -26,12 +28,15 @@ module Tire
|
|
26
28
|
end
|
27
29
|
|
28
30
|
should "extract the routing value from documents" do
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
index = Tire.index('bulk-test-routing')
|
32
|
+
index.delete
|
33
|
+
index.create index: { number_of_shards: 2, number_of_replicas: 0 }
|
34
|
+
index.bulk_store [ { id: '1', title: 'A', _routing: 'a'}, { id: '2', title: 'B', _routing: 'b'} ]
|
35
|
+
index.refresh
|
36
|
+
|
37
|
+
assert_equal 2, Tire.search('bulk-test-routing') { query {all} }.results.size
|
38
|
+
assert_equal 1, Tire.search('bulk-test-routing', routing: 'a') { query {all} }.results.size
|
39
|
+
assert_equal 1, Tire.search('bulk-test-routing', routing: 'b') { query {all} }.results.size
|
35
40
|
end
|
36
41
|
|
37
42
|
should "delete documents in bulk" do
|
@@ -61,14 +66,14 @@ module Tire
|
|
61
66
|
should "timeout when consistency factor is not met" do
|
62
67
|
# Tire.configure { logger STDERR, level: 'debug' }
|
63
68
|
|
64
|
-
Tire.index 'bulk-test' do
|
69
|
+
Tire.index 'bulk-test-consistency' do
|
65
70
|
delete
|
66
71
|
create index: { number_of_shards: 1, number_of_replicas: 15 }
|
67
72
|
end
|
68
73
|
|
69
74
|
assert_raise Timeout::Error do
|
70
75
|
Timeout::timeout(3) do
|
71
|
-
Tire.index('bulk-test').bulk_store [ {id: '1', title: 'One' } ],
|
76
|
+
Tire.index('bulk-test-consistency').bulk_store [ {id: '1', title: 'One' } ],
|
72
77
|
consistency: 'all',
|
73
78
|
raise: true
|
74
79
|
end
|
@@ -70,8 +70,19 @@ module Tire
|
|
70
70
|
assert_equal 1, s.results.facets.size
|
71
71
|
assert_equal 'ruby', s.results.facets['tags']['terms'].first['term']
|
72
72
|
assert_equal 1, s.results.facets['tags']['terms'].first['count'].to_i
|
73
|
-
|
73
|
+
end
|
74
|
+
|
75
|
+
should "allow arbitrary order of methods in the DSL block" do
|
76
|
+
s = Tire.search('articles-test', :search_type => 'count') do
|
77
|
+
facet 'tags' do
|
78
|
+
facet_filter :range, { :published_on => { :from => '2011-01-01', :to => '2011-01-01' } }
|
79
|
+
terms :tags
|
80
|
+
end
|
81
|
+
end
|
74
82
|
|
83
|
+
assert_equal 1, s.results.facets.size
|
84
|
+
assert_equal 'ruby', s.results.facets['tags']['terms'].first['term']
|
85
|
+
assert_equal 1, s.results.facets['tags']['terms'].first['count'].to_i
|
75
86
|
end
|
76
87
|
|
77
88
|
context "terms" do
|
@@ -265,8 +276,8 @@ module Tire
|
|
265
276
|
assert_equal 2, facets["count"], facets.inspect
|
266
277
|
end
|
267
278
|
|
268
|
-
|
279
|
+
end
|
269
280
|
|
281
|
+
end
|
270
282
|
end
|
271
|
-
|
272
283
|
end
|
@@ -19,6 +19,18 @@ module Tire
|
|
19
19
|
assert_equal 'Two', s.results.first.title
|
20
20
|
end
|
21
21
|
|
22
|
+
should "filter the results with multiple terms" do
|
23
|
+
# 2.json > Is tagged *both* "ruby" and "python"
|
24
|
+
|
25
|
+
s = Tire.search('articles-test') do
|
26
|
+
query { all }
|
27
|
+
filter :terms, :tags => ['ruby', 'python'], :execution => 'and'
|
28
|
+
end
|
29
|
+
|
30
|
+
assert_equal 1, s.results.count
|
31
|
+
assert_equal 'Two', s.results.first.title
|
32
|
+
end
|
33
|
+
|
22
34
|
should "filter the results with multiple 'or' filters" do
|
23
35
|
# 4.json > Begins with "F" and is tagged "erlang"
|
24
36
|
|
data/test/test_helper.rb
CHANGED
data/test/unit/index_test.rb
CHANGED
@@ -304,6 +304,25 @@ module Tire
|
|
304
304
|
@index.store Article.new(:id => 123, :title => 'Test', :body => 'Lorem')
|
305
305
|
end
|
306
306
|
|
307
|
+
should "convert document ID to string or number" do
|
308
|
+
# This is related to issues #529, #535:
|
309
|
+
# When using Mongoid and the Yajl gem, document IDs from Mongo (Moped::BSON::ObjectId)
|
310
|
+
# are incorrectly serialized to JSON, and documents are stored with incorrect, auto-generated IDs.
|
311
|
+
class Document1; def id; "one"; end; end
|
312
|
+
class Document2; def id; 1; end; end
|
313
|
+
class Document3; class ID; def as_json; 'c'; end; end
|
314
|
+
def id; ID.new; end
|
315
|
+
end
|
316
|
+
|
317
|
+
document_1 = Document1.new
|
318
|
+
document_2 = Document2.new
|
319
|
+
document_3 = Document3.new
|
320
|
+
|
321
|
+
assert_equal 'one', @index.get_id_from_document(document_1)
|
322
|
+
assert_equal 1, @index.get_id_from_document(document_2)
|
323
|
+
assert_equal 'c', @index.get_id_from_document(document_3)
|
324
|
+
end
|
325
|
+
|
307
326
|
end
|
308
327
|
|
309
328
|
end
|
@@ -73,6 +73,15 @@ module Tire::Search
|
|
73
73
|
f['foo'][:facet_filter].to_json )
|
74
74
|
end
|
75
75
|
|
76
|
+
should "allow arbitrary ordering of methods in the DSL block" do
|
77
|
+
f = Facet.new('foo') do
|
78
|
+
facet_filter :terms, :tags => ['ruby']
|
79
|
+
terms :published_on
|
80
|
+
end.to_hash
|
81
|
+
|
82
|
+
assert_equal( { :terms => {:tags => ['ruby'] }}.to_json, f['foo'][:facet_filter].to_json)
|
83
|
+
end
|
84
|
+
|
76
85
|
end
|
77
86
|
|
78
87
|
context "terms facet" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70285950165900 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70285950165900
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rest-client
|
27
|
-
requirement: &
|
27
|
+
requirement: &70285950165360 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '1.6'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70285950165360
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: multi_json
|
38
|
-
requirement: &
|
38
|
+
requirement: &70285950164860 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '1.0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70285950164860
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: activemodel
|
49
|
-
requirement: &
|
49
|
+
requirement: &70285950164400 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '3.0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70285950164400
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: hashr
|
60
|
-
requirement: &
|
60
|
+
requirement: &70285950163940 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.0.19
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70285950163940
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
|
-
requirement: &
|
71
|
+
requirement: &70285950163480 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '1.0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70285950163480
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: yajl-ruby
|
82
|
-
requirement: &
|
82
|
+
requirement: &70285950163020 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '1.0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70285950163020
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: shoulda
|
93
|
-
requirement: &
|
93
|
+
requirement: &70285950162640 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70285950162640
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: mocha
|
104
|
-
requirement: &
|
104
|
+
requirement: &70285950162180 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70285950162180
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: minitest
|
115
|
-
requirement: &
|
115
|
+
requirement: &70285950161680 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ~>
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '2.12'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70285950161680
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: activerecord
|
126
|
-
requirement: &
|
126
|
+
requirement: &70285950161180 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: '3.0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70285950161180
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: sqlite3
|
137
|
-
requirement: &
|
137
|
+
requirement: &70285950160800 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,10 +142,10 @@ dependencies:
|
|
142
142
|
version: '0'
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *70285950160800
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: mongoid
|
148
|
-
requirement: &
|
148
|
+
requirement: &70285950160260 !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
151
151
|
- - ~>
|
@@ -153,10 +153,10 @@ dependencies:
|
|
153
153
|
version: '2.2'
|
154
154
|
type: :development
|
155
155
|
prerelease: false
|
156
|
-
version_requirements: *
|
156
|
+
version_requirements: *70285950160260
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: bson_ext
|
159
|
-
requirement: &
|
159
|
+
requirement: &70285950159840 !ruby/object:Gem::Requirement
|
160
160
|
none: false
|
161
161
|
requirements:
|
162
162
|
- - ! '>='
|
@@ -164,10 +164,10 @@ dependencies:
|
|
164
164
|
version: '0'
|
165
165
|
type: :development
|
166
166
|
prerelease: false
|
167
|
-
version_requirements: *
|
167
|
+
version_requirements: *70285950159840
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: redis-persistence
|
170
|
-
requirement: &
|
170
|
+
requirement: &70285959011600 !ruby/object:Gem::Requirement
|
171
171
|
none: false
|
172
172
|
requirements:
|
173
173
|
- - ! '>='
|
@@ -175,10 +175,10 @@ dependencies:
|
|
175
175
|
version: '0'
|
176
176
|
type: :development
|
177
177
|
prerelease: false
|
178
|
-
version_requirements: *
|
178
|
+
version_requirements: *70285959011600
|
179
179
|
- !ruby/object:Gem::Dependency
|
180
180
|
name: curb
|
181
|
-
requirement: &
|
181
|
+
requirement: &70285959011180 !ruby/object:Gem::Requirement
|
182
182
|
none: false
|
183
183
|
requirements:
|
184
184
|
- - ! '>='
|
@@ -186,10 +186,10 @@ dependencies:
|
|
186
186
|
version: '0'
|
187
187
|
type: :development
|
188
188
|
prerelease: false
|
189
|
-
version_requirements: *
|
189
|
+
version_requirements: *70285959011180
|
190
190
|
- !ruby/object:Gem::Dependency
|
191
191
|
name: oj
|
192
|
-
requirement: &
|
192
|
+
requirement: &70285959010760 !ruby/object:Gem::Requirement
|
193
193
|
none: false
|
194
194
|
requirements:
|
195
195
|
- - ! '>='
|
@@ -197,10 +197,10 @@ dependencies:
|
|
197
197
|
version: '0'
|
198
198
|
type: :development
|
199
199
|
prerelease: false
|
200
|
-
version_requirements: *
|
200
|
+
version_requirements: *70285959010760
|
201
201
|
- !ruby/object:Gem::Dependency
|
202
202
|
name: turn
|
203
|
-
requirement: &
|
203
|
+
requirement: &70285959010220 !ruby/object:Gem::Requirement
|
204
204
|
none: false
|
205
205
|
requirements:
|
206
206
|
- - ~>
|
@@ -208,7 +208,7 @@ dependencies:
|
|
208
208
|
version: '0.9'
|
209
209
|
type: :development
|
210
210
|
prerelease: false
|
211
|
-
version_requirements: *
|
211
|
+
version_requirements: *70285959010220
|
212
212
|
description: ! " Tire is a Ruby client for the ElasticSearch search engine/database.\n\n
|
213
213
|
\ It provides Ruby-like API for fluent communication with the ElasticSearch server\n
|
214
214
|
\ and blends with ActiveModel class for convenient usage in Rails applications.\n\n
|
@@ -359,29 +359,10 @@ homepage: http://github.com/karmi/tire
|
|
359
359
|
licenses: []
|
360
360
|
post_install_message: ! "================================================================================\n\n
|
361
361
|
\ Please check the documentation at <http://karmi.github.com/tire/>.\n\n--------------------------------------------------------------------------------\n\n
|
362
|
-
\ IMPORTANT CHANGES LATELY:\n\n *
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
to halt bubbling of `sort` into URL parameters [#334]\n * Added prettified JSON
|
367
|
-
output for logging requests and responses at the `debug` level\n * Improved the
|
368
|
-
Rake import task\n * Allow passing of arbitrary objects in the `:as` mapping option
|
369
|
-
[#446]\n * Allow to define default values for Tire::Model::Persistence `:as` lambdas\n
|
370
|
-
\ * Added `@search.results.max_score`\n * Changed the URI escape/unescape compatibility
|
371
|
-
patch to not require Rack\n * Allow using the full DSL in filter facets\n * Allow
|
372
|
-
complex hash options for the `term` query\n * Allow passing Hash-like objects to
|
373
|
-
`terms` query as well\n * Implemented `respond_to?` for `Item`\n * Improved support
|
374
|
-
for Kaminari pagination\n * Added support for the `parent` URL parameter in `Index#store`\n
|
375
|
-
\ * Added the `min_score` and `track_scores` DSL methods\n * Added support for
|
376
|
-
loading partial fields\n * Added support for boosting query\n * Added the `facet_filter`
|
377
|
-
DSL method\n * Allow passing `routing`, `fields` and `preference` URL parameter
|
378
|
-
to Index#retrieve\n * Allow building the search request step-by-step in Tire's
|
379
|
-
DSL [#496]\n * Added a `match` query type\n * Added support for multisearch (_msearch)
|
380
|
-
and the `Tire.multi_search` DSL method\n * Added support for multi-search in the
|
381
|
-
ActiveModel integration and in Tire::Model::Persistence\n * Added support for create
|
382
|
-
and delete actions for Index#bulk\n * Added support for meta information (`_routing`,
|
383
|
-
`_parent`, etc) in Index#bulk\n * Added support for URL parameters (`refresh`,
|
384
|
-
`consistency`) in Index#bulk\n\n See the full changelog at <http://github.com/karmi/tire/commits/v0.5.1>.\n\n--------------------------------------------------------------------------------\n"
|
362
|
+
\ IMPORTANT CHANGES LATELY:\n\n * Fixed bugs in the `matches` Tire method in models\n
|
363
|
+
\ * Fixed JSON parser errors when logging empty bodies\n * Allow arbitrary ordering
|
364
|
+
of methods in the facet DSL block\n * Fix issues with Mongoid gem (incorrect JSON
|
365
|
+
serialization of Moped::BSON::ObjectId)\n\n See the full changelog at <http://github.com/karmi/tire/commits/v0.5.2>.\n\n--------------------------------------------------------------------------------\n"
|
385
366
|
rdoc_options:
|
386
367
|
- --charset=UTF-8
|
387
368
|
require_paths:
|