From 15908474e33729cd7b6c3726578c7603409d3203 Mon Sep 17 00:00:00 2001 From: Pat Allan Date: Fri, 10 Aug 2012 22:08:37 +0100 Subject: [PATCH] 1.4.13 --- HISTORY | 4 +++- lib/thinking_sphinx/bundled_search.rb | 20 ++++++++++---------- lib/thinking_sphinx/version.rb | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/HISTORY b/HISTORY index 000859b62..2d1bad816 100644 --- a/HISTORY +++ b/HISTORY @@ -1,4 +1,6 @@ -Edge: +1.4.13 - August 10th 2012 +* Sphinx 2.0.5 support. +* Hard retries for Sphinx exceptions (Andrew Hunter). * Add support for association-filtered faceting (Andrew White). * Cast PostgreSQL timestamps to their floored integers (instead of rounding up). * Don't add array_accum to PostgreSQL v80311 (8.3.?) or newer. diff --git a/lib/thinking_sphinx/bundled_search.rb b/lib/thinking_sphinx/bundled_search.rb index e5ebef46b..0fd0f23b5 100644 --- a/lib/thinking_sphinx/bundled_search.rb +++ b/lib/thinking_sphinx/bundled_search.rb @@ -1,41 +1,41 @@ module ThinkingSphinx class BundledSearch attr_reader :client - + def initialize @searches = [] end - + def search(*args) @searches << ThinkingSphinx.search(*args) @searches.last.append_to client end - + def search_for_ids(*args) @searches << ThinkingSphinx.search_for_ids(*args) @searches.last.append_to client end - + def searches populate @searches end - + private - + def client @client ||= ThinkingSphinx::Configuration.instance.client end - + def populated? @populated end - + def populate return if populated? - + @populated = true - + client.run.each_with_index do |results, index| searches[index].populate_from_queue results end diff --git a/lib/thinking_sphinx/version.rb b/lib/thinking_sphinx/version.rb index 699414a8d..3d3ced636 100644 --- a/lib/thinking_sphinx/version.rb +++ b/lib/thinking_sphinx/version.rb @@ -1,3 +1,3 @@ module ThinkingSphinx - Version = '1.4.12' + Version = '1.4.13' end