search.integration ================== .. py:module:: search.integration Classes ------- .. autoapisummary:: search.integration.SearchApp Functions --------- .. autoapisummary:: search.integration.process_indexer_tween_factory Module Contents --------------- .. py:class:: SearchApp Bases: :py:obj:`morepath.App` Provides elasticsearch and postgres integration for :class:`onegov.core.framework.Framework` based applications. The application must be connected to a database. Usage:: from onegov.core import Framework class MyApp(Framework, ESIntegration): pass .. py:attribute:: schema :type: str .. py:method:: configure_search(**cfg: Any) -> None Configures the postgres fulltext search integration. The following configuration options are accepted: :enable_search: If True, postgres fulltext search is enabled (defaults to True). .. py:method:: fts_may_use_private_search(request: onegov.core.request.CoreRequest) -> bool Returns True if the given request is allowed to access private search results. By default every logged in user has access to those. This method may be overwritten if this is not desired. .. py:property:: fts_languages :type: set[str] .. py:method:: indexable_base_models() -> set[type[onegov.search.Searchable | onegov.core.orm.Base]] .. py:method:: perform_reindex(fail: bool = False) -> None Re-indexes all content. This is a heavy operation and should be run with consideration. By default, all exceptions during reindex are silently ignored. .. py:function:: process_indexer_tween_factory(app: SearchApp, handler: collections.abc.Callable[[onegov.core.request.CoreRequest], webob.Response]) -> collections.abc.Callable[[onegov.core.request.CoreRequest], webob.Response]