On Fri, Jul 13, 2007 at 02:51:00PM +0200, Mike Mangino wrote:
> Jens Kraemer wrote:
[..]
> However, when I specify a string sort, that seems to fix it:
>
> >> Event.find(results).map(&:city_for_sort)
> => ["bellevue", "baton rouge", "basalt", "bend", "bellevue", "bedford",
> "bend", "berlin", "berlin", "beijing, china"]
> >> total_hits =
> >> fidx.search_each("marathon",:sort=>Ferret::Search::Sort.new([Ferret::Search::SortField.new(:city_for_sort,:type=>:string)]),:offset=>400)
> >> do |hit,score|
> ?> doc = fidx[hit]
> >> results << doc[:id]
> >> end
> => 1887
>
>
> 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.
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