friendlyfashion-thinking-sphinx 2.0.13.1 → 2.0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/thinking_sphinx/search.rb +15 -15
- data/lib/thinking_sphinx/version.rb +1 -1
- metadata +2 -2
@@ -423,28 +423,28 @@ module ThinkingSphinx
|
|
423
423
|
retries = hard_retries
|
424
424
|
|
425
425
|
begin
|
426
|
-
|
427
|
-
|
428
|
-
|
426
|
+
retry_on_stale_index do
|
427
|
+
begin
|
428
|
+
retry_on_index_not_preread do
|
429
429
|
log query do
|
430
430
|
@results = client.query query, indexes, comment
|
431
431
|
end
|
432
|
-
|
433
|
-
|
432
|
+
end
|
433
|
+
total = @results[:total_found].to_i
|
434
|
+
log "Found #{total} result#{'s' unless total == 1}"
|
434
435
|
|
435
|
-
|
436
|
+
log "Sphinx Daemon returned warning: #{warning}" if warning?
|
436
437
|
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
end
|
441
|
-
rescue Errno::ECONNREFUSED => err
|
442
|
-
raise ThinkingSphinx::ConnectionError,
|
443
|
-
'Connection to Sphinx Daemon (searchd) failed.'
|
438
|
+
if error?
|
439
|
+
log "Sphinx Daemon returned error: #{error}"
|
440
|
+
raise SphinxError.new(error, @results) unless options[:ignore_errors]
|
444
441
|
end
|
445
|
-
|
446
|
-
|
442
|
+
rescue Errno::ECONNREFUSED => err
|
443
|
+
raise ThinkingSphinx::ConnectionError,
|
444
|
+
'Connection to Sphinx Daemon (searchd) failed.'
|
447
445
|
end
|
446
|
+
|
447
|
+
compose_results
|
448
448
|
end
|
449
449
|
rescue => e
|
450
450
|
log 'Caught Sphinx exception: %s (%s %s left)' % [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: friendlyfashion-thinking-sphinx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.13.
|
4
|
+
version: 2.0.13.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|