geodesic.boson.dataset.Dataset.reindex#

Dataset.reindex(timeout=None, force=False)[source]#

Issue a reindex command to this dataset’s provider.

Reindexes a dataset. This will reindex the dataset in the background, and will return immediately. If the kicking off reindexing is successful, this will return a message {“success”: True}, otherwise it will raise an exception with the error message.

Tabular and GeoParquet providers index their data for faster querying. If the underlying data has changed, it would be a good idea to reindex the dataset.

Parameters:
  • timeout (timedelta | str | None) – the maximum time to wait for the reindexing to complete. If None, will use the default timeout of 30 minutes.

  • force (bool) – if True, will force the reindex to run even if it has previously completed

Returns:

metadata about the submitted reindex command

Return type:

dict

Example

>>> # Reindex a dataset
>>> ds = geodesic.get_dataset('sentinel-2-l2a')
>>> ds.reindex()