swh.search.api.client module

class swh.search.api.client.RemoteSearch(url, api_exception=None, timeout=None, chunk_size=4096, reraise_exceptions=None, **kwargs)[source]

Bases: swh.core.api.RPCClient

Proxy to a remote search API

backend_class

alias of swh.search.interface.SearchInterface

check()

Dedicated method to execute some specific check per implementation.

flush() → None

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

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.

origin_update(documents: Iterable[Dict]) → None

Persist documents to the search backend.