aldryn/aldryn-search — pull request #7 by qris (2014-01-16 16:31:33+00:00)
Title: Fix realtime title indexing

_backend_alias has to be set before we call prepare(). Currently it is
only set when index_queryset() is called, which happens when the
update_index management command is used. But it is not called by
RealTimeSearchIndex.

RealTimeSearchIndex does call update object, so we can set _backend_alias
there.

Stop using TitleProxy, so that RealTimeSearchIndex will pick up the changes when CMS Titles are
updated - with the RealTimeSearchIndex it will check the model of the index
so when a Title is saved, the get_model() method needs to return Title for
the page to be re-indexed.

The downside of this way of fixing is that the verbose_name will refer to
titles rather than pages, but that seems the lesser of two evils. Fixing
both properly might require small extensions to haystack itself.