Skip to content

search

pyDataverse.dataverse.search

A search result from the Dataverse search API.

Attributes

NameTypeDescription
datasetsDatasetViewReturn a view of all datasets in the search results.
collectionsCollectionViewReturn a view of all collections (dataverses) in the search results.

Methods

__init__(self, search_response: SearchResponse, dataverse: 'Dataverse', **kwargs)

Initialize SearchResult from a SearchResponse.

Parameters

NameTypeDescription
search_responseSearchResponseThe SearchResponse object containing search results.
dataverse'Dataverse'The Dataverse instance.
**kwargsAdditional arguments passed to ContentBase. (default: {})
update_metadata(self, **kwargs) -> None

Update metadata for the search result.

This method is not implemented because SearchResult objects are read-only representations of search results from the Dataverse API. To update metadata, access the underlying dataset or collection objects and update them directly.

Raises

ExceptionDescription
NotImplementedErrorAlways raised, as this operation is not supported for search results.