I made a blunder - implemented some models in our application as plain Django models (but Indexable) instead of Page models.
Now the client would like to see a unified search results page (so a faceted search is not adequate)... so I am completely stuck.
We are using the PostgreSQL backend. The s.search() function requires a model or queryset; and you cannot combine PostgresSearchResults query sets. If I convert the 2 result sets to list and combine them I lose the relevancy of the results.
Any ideas?
For the purposes of rendering non-homogenuous search results, you can use:
from itertools import chainAnd let's say you've searched pages, documents, images, and also have some other results - you can do this (including pagination since you'll need that too):
and then return your
resultsfrom your view and render in the template with{% for result in results %}