tire 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tire/model/indexing.rb +11 -4
- data/lib/tire/results/pagination.rb +1 -1
- data/lib/tire/search.rb +4 -3
- data/lib/tire/search/query.rb +4 -0
- data/lib/tire/version.rb +5 -5
- data/test/integration/range_queries_test.rb +36 -0
- data/test/unit/model_search_test.rb +32 -0
- data/test/unit/results_collection_test.rb +5 -0
- data/test/unit/search_query_test.rb +4 -0
- data/test/unit/search_test.rb +11 -0
- metadata +228 -142
data/lib/tire/model/indexing.rb
CHANGED
@@ -31,21 +31,24 @@ module Tire
|
|
31
31
|
# for the corresponding index, telling _ElasticSearch_ how to understand your documents:
|
32
32
|
# what type is which property, whether it is analyzed or no, which analyzer to use, etc.
|
33
33
|
#
|
34
|
+
# You may pass the top level mapping properties (such as `_source` or `_all`) as a Hash.
|
35
|
+
#
|
34
36
|
# Usage:
|
35
37
|
#
|
36
38
|
# class Article
|
37
39
|
# # ...
|
38
|
-
# mapping do
|
40
|
+
# mapping :_source => { :compress => true } do
|
39
41
|
# indexes :id, :type => 'string', :index => :not_analyzed
|
40
42
|
# indexes :title, :type => 'string', :analyzer => 'snowball', :boost => 100
|
41
43
|
# # ...
|
42
44
|
# end
|
43
45
|
# end
|
44
46
|
#
|
45
|
-
def mapping
|
47
|
+
def mapping(*args)
|
46
48
|
@mapping ||= {}
|
47
49
|
if block_given?
|
48
|
-
@
|
50
|
+
@mapping_options = args.pop
|
51
|
+
@store_mapping = true and yield and @store_mapping = false
|
49
52
|
create_elasticsearch_index
|
50
53
|
else
|
51
54
|
@mapping
|
@@ -100,8 +103,12 @@ module Tire
|
|
100
103
|
@store_mapping || false
|
101
104
|
end
|
102
105
|
|
106
|
+
def mapping_options
|
107
|
+
@mapping_options || {}
|
108
|
+
end
|
109
|
+
|
103
110
|
def mapping_to_hash
|
104
|
-
{ document_type.to_sym => { :properties => mapping } }
|
111
|
+
{ document_type.to_sym => mapping_options.merge({ :properties => mapping }) }
|
105
112
|
end
|
106
113
|
|
107
114
|
end
|
data/lib/tire/search.rb
CHANGED
@@ -107,20 +107,21 @@ module Tire
|
|
107
107
|
|
108
108
|
Configuration.logger.log_request '_search', indices, to_curl
|
109
109
|
|
110
|
-
took = @json['took']
|
110
|
+
took = @json['took'] rescue nil
|
111
|
+
code = @response.code rescue nil
|
111
112
|
|
112
113
|
if Configuration.logger.level.to_s == 'debug'
|
113
114
|
# FIXME: Depends on RestClient implementation
|
114
115
|
body = if @json
|
115
116
|
defined?(Yajl) ? Yajl::Encoder.encode(@json, :pretty => true) : MultiJson.encode(@json)
|
116
117
|
else
|
117
|
-
@response.body
|
118
|
+
@response.body rescue nil
|
118
119
|
end
|
119
120
|
else
|
120
121
|
body = ''
|
121
122
|
end
|
122
123
|
|
123
|
-
Configuration.logger.log_response
|
124
|
+
Configuration.logger.log_response code || 'N/A', took || 'N/A', body
|
124
125
|
end
|
125
126
|
end
|
126
127
|
|
data/lib/tire/search/query.rb
CHANGED
data/lib/tire/version.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
module Tire
|
2
|
-
VERSION = "0.3.
|
2
|
+
VERSION = "0.3.8"
|
3
3
|
|
4
4
|
CHANGELOG =<<-END
|
5
5
|
IMPORTANT CHANGES LATELY:
|
6
6
|
|
7
7
|
* Fixed a bug: `Results::Item` was referencing Ruby classes incorrectly within Rails
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
8
|
+
* Fixed `ZeroDivisionError` for empty result sets
|
9
|
+
* Display correct exception on request failure
|
10
|
+
* Added support for range queries
|
11
|
+
* Added support for mapping options
|
12
12
|
END
|
13
13
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Tire
|
4
|
+
|
5
|
+
class RangeQueriesIntegrationTest < Test::Unit::TestCase
|
6
|
+
include Test::Integration
|
7
|
+
|
8
|
+
context "Range queries" do
|
9
|
+
|
10
|
+
should "allow simple range queries" do
|
11
|
+
s = Tire.search('articles-test') do
|
12
|
+
query do
|
13
|
+
range :words, { :gte => 250 }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
assert_equal 3, s.results.size
|
18
|
+
assert_equal ['Two', 'Three', 'Four'].sort, s.results.map(&:title).sort
|
19
|
+
end
|
20
|
+
|
21
|
+
should "allow combined range queries" do
|
22
|
+
s = Tire.search('articles-test') do
|
23
|
+
query do
|
24
|
+
range :words, { :gte => 250, :lt => 375 }
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
assert_equal 2, s.results.size
|
29
|
+
assert_equal ['Two', 'Four'].sort, s.results.map(&:title).sort
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
@@ -295,6 +295,38 @@ module Tire
|
|
295
295
|
assert_equal 'snowball', ModelWithCustomMapping.mapping[:title][:analyzer]
|
296
296
|
end
|
297
297
|
|
298
|
+
should "create the index with proper mapping options" do
|
299
|
+
expected = {
|
300
|
+
:settings => {},
|
301
|
+
:mappings => {
|
302
|
+
:model_with_custom_mapping_and_options => {
|
303
|
+
:_source => { :compress => true },
|
304
|
+
:_all => { :enabled => false },
|
305
|
+
:properties => { :title => { :type => 'string', :analyzer => 'snowball', :boost => 10 } }
|
306
|
+
}
|
307
|
+
}
|
308
|
+
}
|
309
|
+
|
310
|
+
Tire::Index.any_instance.expects(:create).with(expected)
|
311
|
+
|
312
|
+
class ::ModelWithCustomMappingAndOptions
|
313
|
+
extend ActiveModel::Naming
|
314
|
+
extend ActiveModel::Callbacks
|
315
|
+
|
316
|
+
include Tire::Model::Search
|
317
|
+
include Tire::Model::Callbacks
|
318
|
+
|
319
|
+
mapping :_source => { :compress => true }, :_all => { :enabled => false } do
|
320
|
+
indexes :title, :type => 'string', :analyzer => 'snowball', :boost => 10
|
321
|
+
end
|
322
|
+
|
323
|
+
end
|
324
|
+
|
325
|
+
assert_equal 'snowball', ModelWithCustomMappingAndOptions.mapping[:title][:analyzer]
|
326
|
+
assert_equal true, ModelWithCustomMappingAndOptions.mapping_options[:_source][:compress]
|
327
|
+
assert_equal false, ModelWithCustomMappingAndOptions.mapping_options[:_all][:enabled]
|
328
|
+
end
|
329
|
+
|
298
330
|
should "not raise an error when defining mapping" do
|
299
331
|
Tire::Index.any_instance.unstub(:exists?)
|
300
332
|
Configuration.client.expects(:head).raises(Errno::ECONNREFUSED)
|
@@ -193,6 +193,11 @@ module Tire
|
|
193
193
|
assert_equal 2, @collection.current_page
|
194
194
|
end
|
195
195
|
|
196
|
+
should "return current page for empty result" do
|
197
|
+
collection = Results::Collection.new( { 'hits' => { 'hits' => [], 'total' => 0 } } )
|
198
|
+
assert_equal 1, collection.current_page
|
199
|
+
end
|
200
|
+
|
196
201
|
should "return previous page" do
|
197
202
|
assert_equal 1, @collection.previous_page
|
198
203
|
end
|
@@ -34,6 +34,10 @@ module Tire::Search
|
|
34
34
|
Query.new.terms(:foo, ['bar', 'baz'], :minimum_match => 2) )
|
35
35
|
end
|
36
36
|
|
37
|
+
should "allow search for a range" do
|
38
|
+
assert_equal( { :range => { :age => { :gte => 21 } } }, Query.new.range(:age, { :gte => 21 }) )
|
39
|
+
end
|
40
|
+
|
37
41
|
should "allow search with a query string" do
|
38
42
|
assert_equal( { :query_string => { :query => 'title:foo' } },
|
39
43
|
Query.new.string('title:foo') )
|
data/test/unit/search_test.rb
CHANGED
@@ -134,6 +134,17 @@ module Tire
|
|
134
134
|
Search::Search.new('index').perform
|
135
135
|
end
|
136
136
|
|
137
|
+
should "log the original exception on failed request" do
|
138
|
+
Configuration.logger STDERR
|
139
|
+
|
140
|
+
Configuration.client.expects(:get).raises(Errno::ECONNREFUSED)
|
141
|
+
Configuration.logger.expects(:log_response).with('N/A', 'N/A', '')
|
142
|
+
|
143
|
+
assert_raise Errno::ECONNREFUSED do
|
144
|
+
Search::Search.new('index').perform
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
137
148
|
context "sort" do
|
138
149
|
|
139
150
|
should "allow sorting by multiple fields" do
|
metadata
CHANGED
@@ -1,196 +1,257 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: tire
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 8
|
10
|
+
version: 0.3.8
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Karel Minarik
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2011-10-24 00:00:00 +02:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
15
22
|
name: rake
|
16
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
25
|
none: false
|
18
|
-
requirements:
|
26
|
+
requirements:
|
19
27
|
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 63
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 9
|
33
|
+
- 2
|
21
34
|
version: 0.9.2
|
22
35
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
26
38
|
name: rest-client
|
27
|
-
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
41
|
none: false
|
29
|
-
requirements:
|
42
|
+
requirements:
|
30
43
|
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 15
|
46
|
+
segments:
|
47
|
+
- 1
|
48
|
+
- 6
|
49
|
+
- 0
|
32
50
|
version: 1.6.0
|
33
51
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
37
54
|
name: multi_json
|
38
|
-
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
57
|
none: false
|
40
|
-
requirements:
|
58
|
+
requirements:
|
41
59
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 15
|
62
|
+
segments:
|
63
|
+
- 1
|
64
|
+
- 0
|
65
|
+
version: "1.0"
|
44
66
|
type: :runtime
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
67
|
+
version_requirements: *id003
|
68
|
+
- !ruby/object:Gem::Dependency
|
48
69
|
name: activemodel
|
49
|
-
|
70
|
+
prerelease: false
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
72
|
none: false
|
51
|
-
requirements:
|
73
|
+
requirements:
|
52
74
|
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 7
|
77
|
+
segments:
|
78
|
+
- 3
|
79
|
+
- 0
|
80
|
+
version: "3.0"
|
55
81
|
type: :runtime
|
56
|
-
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
82
|
+
version_requirements: *id004
|
83
|
+
- !ruby/object:Gem::Dependency
|
59
84
|
name: bundler
|
60
|
-
|
85
|
+
prerelease: false
|
86
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
87
|
none: false
|
62
|
-
requirements:
|
88
|
+
requirements:
|
63
89
|
- - ~>
|
64
|
-
- !ruby/object:Gem::Version
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
hash: 23
|
92
|
+
segments:
|
93
|
+
- 1
|
94
|
+
- 0
|
95
|
+
- 0
|
65
96
|
version: 1.0.0
|
66
97
|
type: :development
|
67
|
-
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
98
|
+
version_requirements: *id005
|
99
|
+
- !ruby/object:Gem::Dependency
|
70
100
|
name: yajl-ruby
|
71
|
-
|
101
|
+
prerelease: false
|
102
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
72
103
|
none: false
|
73
|
-
requirements:
|
104
|
+
requirements:
|
74
105
|
- - ~>
|
75
|
-
- !ruby/object:Gem::Version
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
hash: 63
|
108
|
+
segments:
|
109
|
+
- 0
|
110
|
+
- 8
|
111
|
+
- 0
|
76
112
|
version: 0.8.0
|
77
113
|
type: :development
|
78
|
-
|
79
|
-
|
80
|
-
- !ruby/object:Gem::Dependency
|
114
|
+
version_requirements: *id006
|
115
|
+
- !ruby/object:Gem::Dependency
|
81
116
|
name: shoulda
|
82
|
-
|
117
|
+
prerelease: false
|
118
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
83
119
|
none: false
|
84
|
-
requirements:
|
85
|
-
- -
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
hash: 3
|
124
|
+
segments:
|
125
|
+
- 0
|
126
|
+
version: "0"
|
88
127
|
type: :development
|
89
|
-
|
90
|
-
|
91
|
-
- !ruby/object:Gem::Dependency
|
128
|
+
version_requirements: *id007
|
129
|
+
- !ruby/object:Gem::Dependency
|
92
130
|
name: mocha
|
93
|
-
|
131
|
+
prerelease: false
|
132
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
94
133
|
none: false
|
95
|
-
requirements:
|
96
|
-
- -
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
hash: 3
|
138
|
+
segments:
|
139
|
+
- 0
|
140
|
+
version: "0"
|
99
141
|
type: :development
|
100
|
-
|
101
|
-
|
102
|
-
- !ruby/object:Gem::Dependency
|
142
|
+
version_requirements: *id008
|
143
|
+
- !ruby/object:Gem::Dependency
|
103
144
|
name: activerecord
|
104
|
-
|
145
|
+
prerelease: false
|
146
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
105
147
|
none: false
|
106
|
-
requirements:
|
148
|
+
requirements:
|
107
149
|
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
hash: 9
|
152
|
+
segments:
|
153
|
+
- 3
|
154
|
+
- 0
|
155
|
+
- 7
|
109
156
|
version: 3.0.7
|
110
157
|
type: :development
|
111
|
-
|
112
|
-
|
113
|
-
- !ruby/object:Gem::Dependency
|
158
|
+
version_requirements: *id009
|
159
|
+
- !ruby/object:Gem::Dependency
|
114
160
|
name: mongoid
|
115
|
-
|
161
|
+
prerelease: false
|
162
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
116
163
|
none: false
|
117
|
-
requirements:
|
164
|
+
requirements:
|
118
165
|
- - ~>
|
119
|
-
- !ruby/object:Gem::Version
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
hash: 5
|
168
|
+
segments:
|
169
|
+
- 2
|
170
|
+
- 2
|
171
|
+
- 1
|
120
172
|
version: 2.2.1
|
121
173
|
type: :development
|
122
|
-
|
123
|
-
|
124
|
-
- !ruby/object:Gem::Dependency
|
174
|
+
version_requirements: *id010
|
175
|
+
- !ruby/object:Gem::Dependency
|
125
176
|
name: sqlite3
|
126
|
-
|
177
|
+
prerelease: false
|
178
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
127
179
|
none: false
|
128
|
-
requirements:
|
129
|
-
- -
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
|
180
|
+
requirements:
|
181
|
+
- - ">="
|
182
|
+
- !ruby/object:Gem::Version
|
183
|
+
hash: 3
|
184
|
+
segments:
|
185
|
+
- 0
|
186
|
+
version: "0"
|
132
187
|
type: :development
|
133
|
-
|
134
|
-
|
135
|
-
- !ruby/object:Gem::Dependency
|
188
|
+
version_requirements: *id011
|
189
|
+
- !ruby/object:Gem::Dependency
|
136
190
|
name: supermodel
|
137
|
-
|
191
|
+
prerelease: false
|
192
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
138
193
|
none: false
|
139
|
-
requirements:
|
140
|
-
- -
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
|
194
|
+
requirements:
|
195
|
+
- - ">="
|
196
|
+
- !ruby/object:Gem::Version
|
197
|
+
hash: 3
|
198
|
+
segments:
|
199
|
+
- 0
|
200
|
+
version: "0"
|
143
201
|
type: :development
|
144
|
-
|
145
|
-
|
146
|
-
- !ruby/object:Gem::Dependency
|
202
|
+
version_requirements: *id012
|
203
|
+
- !ruby/object:Gem::Dependency
|
147
204
|
name: rdoc
|
148
|
-
|
205
|
+
prerelease: false
|
206
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
149
207
|
none: false
|
150
|
-
requirements:
|
151
|
-
- -
|
152
|
-
- !ruby/object:Gem::Version
|
153
|
-
|
208
|
+
requirements:
|
209
|
+
- - ">="
|
210
|
+
- !ruby/object:Gem::Version
|
211
|
+
hash: 3
|
212
|
+
segments:
|
213
|
+
- 0
|
214
|
+
version: "0"
|
154
215
|
type: :development
|
155
|
-
|
156
|
-
|
157
|
-
- !ruby/object:Gem::Dependency
|
216
|
+
version_requirements: *id013
|
217
|
+
- !ruby/object:Gem::Dependency
|
158
218
|
name: rcov
|
159
|
-
|
219
|
+
prerelease: false
|
220
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
160
221
|
none: false
|
161
|
-
requirements:
|
162
|
-
- -
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
|
222
|
+
requirements:
|
223
|
+
- - ">="
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
hash: 3
|
226
|
+
segments:
|
227
|
+
- 0
|
228
|
+
version: "0"
|
165
229
|
type: :development
|
166
|
-
|
167
|
-
|
168
|
-
- !ruby/object:Gem::Dependency
|
230
|
+
version_requirements: *id014
|
231
|
+
- !ruby/object:Gem::Dependency
|
169
232
|
name: turn
|
170
|
-
|
233
|
+
prerelease: false
|
234
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
171
235
|
none: false
|
172
|
-
requirements:
|
173
|
-
- -
|
174
|
-
- !ruby/object:Gem::Version
|
175
|
-
|
236
|
+
requirements:
|
237
|
+
- - ">="
|
238
|
+
- !ruby/object:Gem::Version
|
239
|
+
hash: 3
|
240
|
+
segments:
|
241
|
+
- 0
|
242
|
+
version: "0"
|
176
243
|
type: :development
|
177
|
-
|
178
|
-
|
179
|
-
description: ! " Tire is a Ruby client for the ElasticSearch search engine/database.\n\n
|
180
|
-
\ It provides Ruby-like API for fluent communication with the ElasticSearch server\n
|
181
|
-
\ and blends with ActiveModel class for convenient usage in Rails applications.\n\n
|
182
|
-
\ It allows to delete and create indices, define mapping for them, supports\n the
|
183
|
-
bulk API, and presents an easy-to-use DSL for constructing your queries.\n\n It
|
184
|
-
has full ActiveRecord/ActiveModel compatibility, allowing you to index\n your
|
185
|
-
models (incrementally upon saving, or in bulk), searching and\n paginating the
|
186
|
-
results.\n\n Please check the documentation at <http://karmi.github.com/tire/>.\n"
|
244
|
+
version_requirements: *id015
|
245
|
+
description: " Tire is a Ruby client for the ElasticSearch search engine/database.\n\n It provides Ruby-like API for fluent communication with the ElasticSearch server\n and blends with ActiveModel class for convenient usage in Rails applications.\n\n It allows to delete and create indices, define mapping for them, supports\n the bulk API, and presents an easy-to-use DSL for constructing your queries.\n\n It has full ActiveRecord/ActiveModel compatibility, allowing you to index\n your models (incrementally upon saving, or in bulk), searching and\n paginating the results.\n\n Please check the documentation at <http://karmi.github.com/tire/>.\n"
|
187
246
|
email: karmi@karmi.cz
|
188
247
|
executables: []
|
248
|
+
|
189
249
|
extensions: []
|
190
|
-
|
250
|
+
|
251
|
+
extra_rdoc_files:
|
191
252
|
- README.markdown
|
192
253
|
- MIT-LICENSE
|
193
|
-
files:
|
254
|
+
files:
|
194
255
|
- .gitignore
|
195
256
|
- .travis.yml
|
196
257
|
- Gemfile
|
@@ -247,6 +308,7 @@ files:
|
|
247
308
|
- test/integration/percolator_test.rb
|
248
309
|
- test/integration/persistent_model_test.rb
|
249
310
|
- test/integration/query_string_test.rb
|
311
|
+
- test/integration/range_queries_test.rb
|
250
312
|
- test/integration/results_test.rb
|
251
313
|
- test/integration/sort_test.rb
|
252
314
|
- test/models/active_model_article.rb
|
@@ -282,38 +344,61 @@ files:
|
|
282
344
|
- test/unit/search_test.rb
|
283
345
|
- test/unit/tire_test.rb
|
284
346
|
- tire.gemspec
|
347
|
+
has_rdoc: true
|
285
348
|
homepage: http://github.com/karmi/tire
|
286
349
|
licenses: []
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
350
|
+
|
351
|
+
post_install_message: |
|
352
|
+
================================================================================
|
353
|
+
|
354
|
+
Please check the documentation at <http://karmi.github.com/tire/>.
|
355
|
+
|
356
|
+
--------------------------------------------------------------------------------
|
357
|
+
|
358
|
+
IMPORTANT CHANGES LATELY:
|
359
|
+
|
360
|
+
* Fixed a bug: `Results::Item` was referencing Ruby classes incorrectly within Rails
|
361
|
+
* Fixed `ZeroDivisionError` for empty result sets
|
362
|
+
* Display correct exception on request failure
|
363
|
+
* Added support for range queries
|
364
|
+
* Added support for mapping options
|
365
|
+
|
366
|
+
See the full changelog at <http://github.com/karmi/tire/commits/v0.3.8>.
|
367
|
+
|
368
|
+
--------------------------------------------------------------------------------
|
369
|
+
|
370
|
+
rdoc_options:
|
295
371
|
- --charset=UTF-8
|
296
|
-
require_paths:
|
372
|
+
require_paths:
|
297
373
|
- lib
|
298
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
374
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
299
375
|
none: false
|
300
|
-
requirements:
|
301
|
-
- -
|
302
|
-
- !ruby/object:Gem::Version
|
303
|
-
|
304
|
-
|
376
|
+
requirements:
|
377
|
+
- - ">="
|
378
|
+
- !ruby/object:Gem::Version
|
379
|
+
hash: 3
|
380
|
+
segments:
|
381
|
+
- 0
|
382
|
+
version: "0"
|
383
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
305
384
|
none: false
|
306
|
-
requirements:
|
307
|
-
- -
|
308
|
-
- !ruby/object:Gem::Version
|
385
|
+
requirements:
|
386
|
+
- - ">="
|
387
|
+
- !ruby/object:Gem::Version
|
388
|
+
hash: 23
|
389
|
+
segments:
|
390
|
+
- 1
|
391
|
+
- 3
|
392
|
+
- 6
|
309
393
|
version: 1.3.6
|
310
394
|
requirements: []
|
395
|
+
|
311
396
|
rubyforge_project: tire
|
312
|
-
rubygems_version: 1.
|
397
|
+
rubygems_version: 1.6.2
|
313
398
|
signing_key:
|
314
399
|
specification_version: 3
|
315
400
|
summary: Ruby client for ElasticSearch
|
316
|
-
test_files:
|
401
|
+
test_files:
|
317
402
|
- test/fixtures/articles/1.json
|
318
403
|
- test/fixtures/articles/2.json
|
319
404
|
- test/fixtures/articles/3.json
|
@@ -331,6 +416,7 @@ test_files:
|
|
331
416
|
- test/integration/percolator_test.rb
|
332
417
|
- test/integration/persistent_model_test.rb
|
333
418
|
- test/integration/query_string_test.rb
|
419
|
+
- test/integration/range_queries_test.rb
|
334
420
|
- test/integration/results_test.rb
|
335
421
|
- test/integration/sort_test.rb
|
336
422
|
- test/models/active_model_article.rb
|