Hi Gustavo,
On Thu, 13 Nov 2014, Gustavo Narea wrote:
> I just realized that it'd be impossible to search across cores because
> Solr doesn't support it.
>
> I suppose the other option would be to somehow get Haystack to map 2
> models to a single index, which is what I wanted to do in the first
> place.
>
> Does this mean that I cannot use Haystack?
No, it's not required that you specify a model to search for, or combine
the two different models into one. Just use a SearchForm instead of a
ModelSearchForm, and it will return all results of any type. If you want
all results from User and Article and nothing else, look at the
implementation of ModelSearchForm and construct your query the same way,
with an OR on the contenttype.
Cheers, Chris.
--
Aptivate |
http://www.aptivate.org | Phone:
+44 1223 967 838
25 Signet Court, Swanns Road, Cambridge, CB5 8LA, UK
Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.