Hi there,
I've applied a tiny patch to our ThinkingSphinx setup to fix a small
issue. When a sphinx-result could not be found in the database, a nil-
value would be included in the results. Simply compacting the result
fixes this:
Index: lib/thinking_sphinx/collection.rb
===================================================================
--- lib/thinking_sphinx/collection.rb (revision 1960)
+++ lib/thinking_sphinx/collection.rb (working copy)
@@ -43,7 +43,7 @@
) : []
ids.collect { |obj_id|
instances.detect { |obj|
obj.id == obj_id }
- }
+ }.compact
end
def self.instance_from_match(match, options)
Hope this helps anybody,
Cheers,
Menno van der Sman