ultrasphinx 1.8 → 1.9
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +1 -3
- data/CHANGELOG +4 -0
- data/DEPLOYMENT_NOTES +7 -3
- data/Manifest +10 -0
- data/RAKE_TASKS +4 -2
- data/README +35 -18
- data/TODO +0 -1
- data/examples/default.base +24 -19
- data/lib/ultrasphinx.rb +1 -1
- data/lib/ultrasphinx/configure.rb +66 -25
- data/lib/ultrasphinx/core_extensions.rb +10 -1
- data/lib/ultrasphinx/is_indexed.rb +49 -6
- data/lib/ultrasphinx/search.rb +81 -69
- data/lib/ultrasphinx/search/internals.rb +61 -38
- data/lib/ultrasphinx/search/parser.rb +17 -7
- data/lib/ultrasphinx/ultrasphinx.rb +69 -16
- data/tasks/ultrasphinx.rake +47 -29
- data/test/config/ultrasphinx/test.base +50 -21
- data/test/integration/app/app/models/geo/address.rb +2 -1
- data/test/integration/app/app/models/person/user.rb +12 -3
- data/test/integration/app/app/models/seller.rb +2 -1
- data/test/integration/app/config/environment.rb +2 -0
- data/test/integration/app/config/ultrasphinx/default.base +16 -8
- data/test/integration/app/config/ultrasphinx/development.conf +319 -0
- data/test/integration/app/config/ultrasphinx/development.conf.canonical +152 -24
- data/test/integration/app/db/schema.rb +56 -0
- data/test/integration/app/test/fixtures/sellers.yml +1 -1
- data/test/integration/app/test/fixtures/users.yml +1 -1
- data/test/integration/app/test/unit/country_test.rb +8 -0
- data/test/integration/delta_test.rb +39 -0
- data/test/integration/search_test.rb +60 -1
- data/test/integration/spell_test.rb +6 -2
- data/test/profile/benchmark.rb +44 -0
- data/test/test_helper.rb +6 -1
- data/test/unit/parser_test.rb +21 -2
- data/ultrasphinx.gemspec +4 -4
- data/vendor/riddle/README +2 -2
- data/vendor/riddle/lib/riddle.rb +1 -1
- data/vendor/riddle/lib/riddle/client.rb +45 -10
- data/vendor/riddle/spec/fixtures/data/anchor.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/any.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/boolean.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/distinct.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/field_weights.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/filter.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/group.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/index.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/index_weights.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/phrase.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/rank_mode.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/simple.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/sort.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/update_simple.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/weights.bin +0 -0
- data/vendor/riddle/spec/fixtures/data_generator.php +130 -0
- data/vendor/riddle/spec/fixtures/sphinxapi.php +1066 -0
- data/vendor/riddle/spec/spec_helper.rb +1 -0
- data/vendor/riddle/spec/unit/client_spec.rb +18 -4
- metadata +12 -2
- metadata.gz.sig +0 -0
@@ -15,12 +15,12 @@ describe Riddle::Client do
|
|
15
15
|
|
16
16
|
it "should translate anchor arguments correctly" do
|
17
17
|
client = Riddle::Client.new
|
18
|
-
client.set_anchor "latitude", 10.0, "
|
18
|
+
client.set_anchor "latitude", 10.0, "longitude", 95.0
|
19
19
|
client.anchor.should == {
|
20
20
|
:latitude_attribute => "latitude",
|
21
21
|
:latitude => 10.0,
|
22
|
-
:
|
23
|
-
:
|
22
|
+
:longitude_attribute => "longitude",
|
23
|
+
:longitude => 95.0
|
24
24
|
}
|
25
25
|
end
|
26
26
|
|
@@ -104,11 +104,25 @@ describe Riddle::Client do
|
|
104
104
|
|
105
105
|
it "should build a message with an anchor correctly" do
|
106
106
|
client = Riddle::Client.new
|
107
|
-
client.set_anchor "latitude", 10.0, "
|
107
|
+
client.set_anchor "latitude", 10.0, "longitude", 95.0
|
108
108
|
client.append_query "test "
|
109
109
|
client.queue.first.should == query_contents(:anchor)
|
110
110
|
end
|
111
111
|
|
112
|
+
it "should build a message with index weights correctly" do
|
113
|
+
client = Riddle::Client.new
|
114
|
+
client.index_weights = {"people" => 101}
|
115
|
+
client.append_query "test "
|
116
|
+
client.queue.first.should == query_contents(:index_weights)
|
117
|
+
end
|
118
|
+
|
119
|
+
it "should build a message with field weights correctly" do
|
120
|
+
client = Riddle::Client.new
|
121
|
+
client.field_weights = {"city" => 101}
|
122
|
+
client.append_query "test "
|
123
|
+
client.queue.first.should == query_contents(:field_weights)
|
124
|
+
end
|
125
|
+
|
112
126
|
it "should keep multiple messages in the queue" do
|
113
127
|
client = Riddle::Client.new
|
114
128
|
client.weights = [100, 1]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultrasphinx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: "1.
|
4
|
+
version: "1.9"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ""
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
yZ0=
|
31
31
|
-----END CERTIFICATE-----
|
32
32
|
|
33
|
-
date: 2008-
|
33
|
+
date: 2008-03-08 00:00:00 -05:00
|
34
34
|
default_executable:
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
@@ -124,6 +124,7 @@ files:
|
|
124
124
|
- test/integration/app/config/locomotive.yml
|
125
125
|
- test/integration/app/config/routes.rb
|
126
126
|
- test/integration/app/config/ultrasphinx/default.base
|
127
|
+
- test/integration/app/config/ultrasphinx/development.conf
|
127
128
|
- test/integration/app/config/ultrasphinx/development.conf.canonical
|
128
129
|
- test/integration/app/db/migrate/001_create_users.rb
|
129
130
|
- test/integration/app/db/migrate/002_create_sellers.rb
|
@@ -134,6 +135,7 @@ files:
|
|
134
135
|
- test/integration/app/db/migrate/007_add_lat_and_long_to_address.rb
|
135
136
|
- test/integration/app/db/migrate/008_add_mission_statement_to_seller.rb
|
136
137
|
- test/integration/app/db/migrate/009_create_countries.rb
|
138
|
+
- test/integration/app/db/schema.rb
|
137
139
|
- test/integration/app/doc/README_FOR_APP
|
138
140
|
- test/integration/app/public/404.html
|
139
141
|
- test/integration/app/public/500.html
|
@@ -176,13 +178,16 @@ files:
|
|
176
178
|
- test/integration/app/test/functional/users_controller_test.rb
|
177
179
|
- test/integration/app/test/test_helper.rb
|
178
180
|
- test/integration/app/test/unit/address_test.rb
|
181
|
+
- test/integration/app/test/unit/country_test.rb
|
179
182
|
- test/integration/app/test/unit/seller_test.rb
|
180
183
|
- test/integration/app/test/unit/state_test.rb
|
181
184
|
- test/integration/app/test/unit/user_test.rb
|
182
185
|
- test/integration/configure_test.rb
|
186
|
+
- test/integration/delta_test.rb
|
183
187
|
- test/integration/search_test.rb
|
184
188
|
- test/integration/server_test.rb
|
185
189
|
- test/integration/spell_test.rb
|
190
|
+
- test/profile/benchmark.rb
|
186
191
|
- test/setup.rb
|
187
192
|
- test/teardown.rb
|
188
193
|
- test/test_all.rb
|
@@ -202,6 +207,7 @@ files:
|
|
202
207
|
- vendor/riddle/spec/fixtures/data/any.bin
|
203
208
|
- vendor/riddle/spec/fixtures/data/boolean.bin
|
204
209
|
- vendor/riddle/spec/fixtures/data/distinct.bin
|
210
|
+
- vendor/riddle/spec/fixtures/data/field_weights.bin
|
205
211
|
- vendor/riddle/spec/fixtures/data/filter.bin
|
206
212
|
- vendor/riddle/spec/fixtures/data/filter_array.bin
|
207
213
|
- vendor/riddle/spec/fixtures/data/filter_array_exclude.bin
|
@@ -212,12 +218,16 @@ files:
|
|
212
218
|
- vendor/riddle/spec/fixtures/data/filter_range_exclude.bin
|
213
219
|
- vendor/riddle/spec/fixtures/data/group.bin
|
214
220
|
- vendor/riddle/spec/fixtures/data/index.bin
|
221
|
+
- vendor/riddle/spec/fixtures/data/index_weights.bin
|
215
222
|
- vendor/riddle/spec/fixtures/data/phrase.bin
|
223
|
+
- vendor/riddle/spec/fixtures/data/rank_mode.bin
|
216
224
|
- vendor/riddle/spec/fixtures/data/simple.bin
|
217
225
|
- vendor/riddle/spec/fixtures/data/sort.bin
|
218
226
|
- vendor/riddle/spec/fixtures/data/update_simple.bin
|
219
227
|
- vendor/riddle/spec/fixtures/data/weights.bin
|
228
|
+
- vendor/riddle/spec/fixtures/data_generator.php
|
220
229
|
- vendor/riddle/spec/fixtures/sphinx/configuration.erb
|
230
|
+
- vendor/riddle/spec/fixtures/sphinxapi.php
|
221
231
|
- vendor/riddle/spec/fixtures/sql/conf.example.yml
|
222
232
|
- vendor/riddle/spec/fixtures/sql/data.sql
|
223
233
|
- vendor/riddle/spec/fixtures/sql/structure.sql
|
metadata.gz.sig
CHANGED
Binary file
|