class SearchBackend: """Common interface so views never branch on DB vendor directly — see apps/search/backends/__init__.py::get_backend().""" def search(self, query: str, user, limit: int = 50): """Returns an iterable of Article instances the user can see (scoped to their own subscriptions), matching ``query``, most relevant first.""" raise NotImplementedError