On Fri, Jul 13, 2007 at 05:14:22PM +0200, Mike Mangino wrote:
> Jens Kraemer wrote:
> > On Fri, Jul 13, 2007 at 02:51:00PM +0200, Mike Mangino wrote:
> >> Jens Kraemer wrote:
> > 
> > [..]
> > 
> >> 
> >> 
> >> There were some fields with the text "0". I wonder if it was guessing 
> >> the wrong type of index? I cleaned up that data and I'm rebuilding the 
> >> index now.
> > 
> > That sounds like a really good explanation to me.
> 
> If only it were true :)
> 
> >> Event.find(:all).select {|e| /^[0-9]+$/.match(e.city_for_sort)}
> => []
> >> Event.find(:all).select {|e| /^[0-9\.]+$/.match(e.city_for_sort)}
> => []
> >> 
> 
> but the problem still exists.
> 
> According to 
> http://ferret.davebalmain.com/trac/browser/trunk/c/src/sort.c, it looks 
> like that should fix it.
> 
> When I use the Sort and SortField I get the DRB error I reported 
> previously because it can't marshall those objects:
> 
> Event.find_by_contents("marathon",:sort=>Ferret::Search::arch::SortField.new(:city_for_sort)]),:offset=>400).map(&:city_for_sort)
> 
> DRb::DRbConnError: DRb::DRbServerNotFound
> 
> 
> Is there an easy fix for this?

Do you already use acts_as_ferret's trunk? 

If yes and this problem still exists, your best bet is to extend
local_index.rb and add a custom search method that constructs your sort
objects based on additional parameters (that are no sort objects, to
avoid the drb probs) you hand it over. This method will be then
reachable via the ferret_index property of your model class.


Jens



-- 
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
 
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to