Are you sorting by the same "name" field each time, or is it by different
fields?

> From: Michael Leung <[EMAIL PROTECTED]>
> Reply-To: [email protected]
> Date: Mon, 2 Oct 2006 06:12:02 +0200
> To: [email protected]
> Subject: [Ferret-talk] Strange Sorting Issues
> 
> Hi there,
> 
> I'm having some strange sorting stuff goign on. Here's my search method:
> 
> 
> sort_fields = []
> sort_fields << Ferret::Search::SortField.new("name",
>  :reverse => :false)
> @results = Listing.find_by_contents @search_criteria, :limit => :all,
> :sort => sort_fields
> 
> page = (params[:page] ||= 1).to_i
> items_per_page = 9
> offset = (page - 1) * items_per_page
> @pages = Paginator.new(self, @results.length, items_per_page, page)
> @results = @results[offset..(offset + items_per_page - 1)]
> 
> For some queries, the sorting is correct. Other times, it's not. I'm not
> sure what's causing this. Any help would be greatly appreciated!
> 
> We're using ferret 10.3, I believe.
> 
> Thanks.
> 
> -- 
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ferret-talk mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ferret-talk
> 

_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to