Package nl.knaw.dans.lib.dataverse
Class SolrIndexApi
java.lang.Object
nl.knaw.dans.lib.dataverse.SolrIndexApi
API for Dataverse Solr index endpoints.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final nl.knaw.dans.lib.dataverse.HttpClientWrapperprotected static final String -
Method Summary
Modifier and TypeMethodDescriptionprotected Pathclear()Clears (deletes) the Solr index.Clears the index timestamps for all objects, causing them to be re-indexed on the next indexing run.getQueryParamsFromMetadataKeys(Map<String, String> metadataKeys) indexAll()Triggers a full reindex of all content in the Dataverse installation.indexDataset(int id) Indexes a specific dataset identified by its database id.indexDataset(String persistentId) Indexes a specific dataset identified by its persistent identifier.indexDataverse(int id) Indexes a specific dataverse identified by its database id.status()Returns the current status of the Solr index.toString()
-
Field Details
-
MDKEY_PARAM_NAME_PREFIX
- See Also:
-
httpClientWrapper
protected final nl.knaw.dans.lib.dataverse.HttpClientWrapper httpClientWrapper
-
-
Method Details
-
indexAll
public DataverseHttpResponse<DataMessageSolrIndex> indexAll() throws IOException, DataverseExceptionTriggers a full reindex of all content in the Dataverse installation.- Returns:
- the response message from Dataverse
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request- See Also:
-
status
Returns the current status of the Solr index.- Returns:
- the index status message
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request- See Also:
-
indexDataset
public DataverseHttpResponse<DataMessageSolrIndex> indexDataset(String persistentId) throws IOException, DataverseException Indexes a specific dataset identified by its persistent identifier.- Parameters:
persistentId- the persistent identifier of the dataset (e.g. doi:10.5072/FK2/ABCDEF)- Returns:
- the response message from Dataverse
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request- See Also:
-
indexDataset
public DataverseHttpResponse<DataMessageSolrIndex> indexDataset(int id) throws IOException, DataverseException Indexes a specific dataset identified by its database id.- Parameters:
id- the database id of the dataset- Returns:
- the response message from Dataverse
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request- See Also:
-
indexDataverse
public DataverseHttpResponse<DataMessage> indexDataverse(int id) throws IOException, DataverseException Indexes a specific dataverse identified by its database id.- Parameters:
id- the database id of the dataverse- Returns:
- the response message from Dataverse
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request- See Also:
-
clear
Clears (deletes) the Solr index.- Returns:
- the response message from Dataverse
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request- See Also:
-
clearTimestamps
Clears the index timestamps for all objects, causing them to be re-indexed on the next indexing run.- Returns:
- the response message from Dataverse
- Throws:
IOException- when I/O problems occur during the interaction with DataverseDataverseException- when Dataverse fails to perform the request- See Also:
-
toString
-
buildPath
-
getQueryParamsFromMetadataKeys
-