swh.search.elasticsearch module

swh.search.elasticsearch.token_encode(index_to_tokenize: Dict[bytes, Any]) → str[source]

Tokenize as string an index page result from a search

swh.search.elasticsearch.token_decode(page_token: str) → Dict[bytes, Any][source]

Read the page_token

class swh.search.elasticsearch.ElasticSearch(hosts: List[str])[source]

Bases: object

check()[source]
deinitialize() → None[source]

Removes all indices from the Elasticsearch backend

initialize() → None[source]

Declare Elasticsearch indices and mappings

flush() → None[source]
origin_update(documents: Iterable[Dict]) → None[source]
origin_dump() → Iterator[swh.model.model.Origin][source]