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


alias of swh.search.interface.SearchInterface


Dedicated method to execute some specific check per implementation.


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

Searches for origins matching the url_pattern.

  • url_pattern – Part of the URL to search for

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

  • visit_types – Only origins having any of the provided visit types (e.g. git, svn, pypi) will be returned

  • page_token – Opaque value used for pagination

  • limit – number of results to return


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[swh.search.interface.OriginDict])None

Persist documents to the search backend.