search.integration

Classes

SearchApp

Provides elasticsearch and postgres integration for

Functions

process_indexer_tween_factory(...)

Module Contents

class search.integration.SearchApp[source]

Bases: morepath.App

Provides elasticsearch and postgres integration for 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
schema: str[source]

Configures the postgres fulltext search integration.

The following configuration options are accepted:

Enable_search:

If True, postgres fulltext search is enabled (defaults to True).

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.

property fts_languages: set[str][source]
indexable_base_models() set[type[onegov.search.Searchable | onegov.core.orm.Base]][source]
perform_reindex(fail: bool = False) None[source]

Re-indexes all content.

This is a heavy operation and should be run with consideration.

By default, all exceptions during reindex are silently ignored.

search.integration.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][source]