swh.search.interface module

class swh.search.interface.SearchInterface[source]

Bases: object

check()[source]

Dedicated method to execute some specific check per implementation.

flush() → None[source]

Blocks until all previous calls to _update() are completely applied.

origin_update(documents: Iterable[Dict]) → None[source]

Persist documents to the search backend.

Searches for origins matching the url_pattern.

Parameters
  • url_pattern – Part of the URL to search for

  • with_visit – Whether origins with no visit are to be filtered out

  • page_token – Opaque value used for pagination

  • limit – number of results to return

Returns

PagedResult of origin dicts matching the search criteria. If next_page_token is None, there is no longer data to retrieve.