Daniel may have a better way though!
Greg
On 30 June 2010 04:56, zweb <trader...@gmail.com> wrote:
> How can I order search results by model?
>
> --
> You received this message because you are subscribed to the Google Groups "django-haystack" group.
> To post to this group, send email to django-...@googlegroups.com.
> To unsubscribe from this group, send email to django-haysta...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-haystack?hl=en.
>
>
You can do ``SearchQuerySet().order_by('django_ct')``. As a
warning, this throws out relevancy. The only way to keep relevancy &
group by model is either to run many queries (one per model - usually
performant thanks to query caching) or to run the query and
post-process the results, regrouping them as you go.
Daniel