Hello, Pat and guys,
1. yes, "has" works just fine :) I am able to get results out as expected
2. i have also added :order => :updated_at and :sort_mode =>desc so that
search results returned are sorted by the updated_at attribute in descending
order.
Problem solved as all results are returned in the expected order.
Thank you, Andrew France, Pat and everyone!
For reference, this is how my code looks like:
@search = Part.search(
params[:search][:by_keyword],
:with => { :status_id => Status.find_by_name('live').id },
:page => params[:page],
:per_page => 10,
:order => :updated_at,
:sort_mode => :desc
)
--
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.