Hi Pat,
I already tried this. Not working
"ThinkingSphinx.search "this", :order=> :name"
This is whole model(property.rb) fields which I have indexed.
define_index do
indexes :name,:sortable => true
indexes description
indexes rate,:sortable => true
indexes neighbourhoods.name, :as=>:neighbourhood
where 'properties.deleted = 0'
has exclusive
has published
has created_at, updated_at
end
Is there any wrong in this?
Thanks,
Mike
On Aug 6, 5:53 pm, Pat Allan <[email protected]> wrote:
> Hi Mike
>
> When you're sorting, use :name, not "name" - if you're using a string, then
> Thinking Sphinx behaves a different way (using the extended sort mode,
> instead of attribute asc/desc sort mode).
>
> So, using a symbol should take care of it all.
>
> Cheers
>
> --
> Pat
>
> On 06/08/2010, at 10:12 PM, Mike Disuza wrote:
>
> > Hi,
> > No I have only property model and which have these fields to index.
> > Thanks,
> > Mike
>
> > On Aug 6, 4:43 pm, Jim Ruther Nill <[email protected]> wrote:
> >> do you any other indexed models?
>
> >> On Fri, Aug 6, 2010 at 7:36 PM, Mike Disuza <[email protected]> wrote:
> >>> Hi,
> >>> I have indexing as follows
> >>> "define_index do
> >>> indexes :name,:sortable => true
> >>> indexes description
> >>> has created_at, updated_at
> >>> end"
>
> >>> Whenever I am doing search like
> >>> " ThinkingSphinx.search "this" ". I am getting search result but
> >>> whenever I am doing sorting with name like
> >>> " ThinkingSphinx.search "this", :order => "name",:sort_mode=>:desc " I
> >>> am not getting any search result. It returns a blank array.
>
> >>> Can anyone tell me what is wrong with my code?
>
> >>> Thanks,
> >>> Tushar
>
> >>> --
> >>> 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]<thinking-sphinx%[email protected]>
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/thinking-sphinx?hl=en.
>
> >> --
> >> -------------------------------------------------------------
> >> visit my blog athttp://jimlabs.heroku.com
>
> > --
> > 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
> > athttp://groups.google.com/group/thinking-sphinx?hl=en.
--
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.