I indexed it like this.

define_index do

  indexes "LOWER(listings.name)", :as => :listing_name, :sortable =>
true

end

and it works perfect.

On Jan 19, 12:40 pm, luckydev <[email protected]> wrote:
> I have indexed my model like
>
> define_index do
>
>     indexes :name, :as => :listing_name, :sortable => true
>
>     set_property :enable_star => 1
>     set_property :min_infix_len => 1
>
> end
>
> I have indexed name field in my table and am forming the search query
> like this
>
> search("accomodation",:order => "listing_name ASC", :sort_mode
> => :extended)
>
> And I get it sorted alphabetically. BUT the problem is the sort order
> by name gets me
> results like this ..
>
> A, B, C, D ...Z, a, b, c, ..
>
> I guess it is ordering based on ascii values. I want the names to be
> ordered like
>
> A, a, B, b, C, c, ...
>
> Can i do this.. how..? please help.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to