You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bug introduced in Dataverse 6.8 that makes attempts to replace non-tabular files via the current Dataverse UI fail has been fixed. (The bug would also cause the replace API to fail if an empty dataFileTags array is sent.)
The API returning information about datasets (`/api/datasets/{id}`) now includes a `locks` field containing a list of the types of all existing locks, e.g. `"locks": ["InReview"]`.
(assuming the earlier PRs have been merged, tehre will be a section on indexing improvements already)
2
+
This release also avoids creating unused Solr entries for files in drafts of new versions of published datasets (decreasing the Solr db size and thereby improving performance).
It came to our attention that the [Dataverse Uploader GitHub Action](https://guides.dataverse.org/en/6.10/admin/integrations.html#github) was [failing](https://github.com/IQSS/dataverse-uploader/issues/28) with an "unhashable type" error. This has been fixed in a new release, [v1.7](https://github.com/IQSS/dataverse-uploader/releases/tag/v1.7).
Copy file name to clipboardExpand all lines: doc/sphinx-guides/source/api/search.rst
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@ The parameters and JSON response are partly inspired by the `GitHub Search API <
17
17
18
18
Please note that in Dataverse Software 4.3 and older the "citation" field wrapped the persistent ID URL in an ``<a>`` tag but this has been changed to plaintext. If you want the old value with HTML in it, a new field called "citationHtml" can be used.
19
19
20
-
21
20
Parameters
22
21
----------
23
22
@@ -27,7 +26,7 @@ Name Type Description
27
26
q string The search term or terms. Using "title:data" will search only the "title" field. "*" can be used as a wildcard either alone or adjacent to a term (i.e. "bird*"). For example, https://demo.dataverse.org/api/search?q=title:data . For a list of fields to search, please see https://github.com/IQSS/dataverse/issues/2558 (for now).
28
27
type string Can be either "dataverse", "dataset", or "file". Multiple "type" parameters can be used to include multiple types (i.e. ``type=dataset&type=file``). If omitted, all types will be returned. For example, https://demo.dataverse.org/api/search?q=*&type=dataset
29
28
subtree string The identifier of the Dataverse collection to which the search should be narrowed. The subtree of this Dataverse collection and all its children will be searched. Multiple "subtree" parameters can be used to include multiple Dataverse collections. For example, https://demo.dataverse.org/api/search?q=data&subtree=birds&subtree=cats .
30
-
sort string The sort field. Supported values include "name", "date" and "relevance". See example under "order".
29
+
sort string The sort field. Supported values include "name", "date", and "score". Sorting by "score" orders by **relevance** and is the default if this parameter is omitted.
31
30
order string The order in which to sort. Can either be "asc" or "desc". For example, https://demo.dataverse.org/api/search?q=data&sort=name&order=asc
32
31
per_page int The number of results to return per request. The default is 10. The max is 1000. See :ref:`iteration example <iteration-example>`.
33
32
start int A cursor for paging through search results. See :ref:`iteration example <iteration-example>`.
* When the query was configured to return Long, it was returning Integer. The query has been changed to return Integer now. The code here is robust if that changes in the future.
logger.finest("Converted non-Long result to Long: " + result + " of type " + result.getClass().getName());
1453
-
} catch (NumberFormatExceptione) {
1454
-
logger.warning("Could not convert query result to Long: " + result);
1455
-
}
1456
-
}
1457
-
}
1458
-
}
1444
+
solrIndexService.populateChangedFileIds(
1445
+
dataset.getReleasedVersion().getId(),
1446
+
datasetVersion.getId(),
1447
+
changedFileIds);
1459
1448
logger.fine(
1460
1449
"We are indexing a draft version of a dataset that has a released version. We'll be checking file metadatas if they are exact clones of the released versions.");
1461
1450
} elseif (datasetVersion.isDraft()) {
1462
1451
// Add all file metadata ids to changedFileMetadataIds
1463
-
changedFileMetadataIds.addAll(
1452
+
changedFileIds.addAll(
1464
1453
fileMetadatas.stream()
1465
-
.map(FileMetadata::getId)
1454
+
.map(fm -> fm.getDataFile().getId())
1466
1455
.collect(Collectors.toList())
1467
1456
);
1468
1457
}
@@ -1526,7 +1515,7 @@ public SolrInputDocuments toSolrDocs(IndexableDataset indexableDataset, Set<Long
1526
1515
}
1527
1516
booleanindexThisFile = false;
1528
1517
1529
-
if (indexThisMetadata && (isReleasedVersion || changedFileMetadataIds.contains(fileMetadata.getId()))) {
1518
+
if (indexThisMetadata && (isReleasedVersion || changedFileIds.contains(datafile.getId()))) {
1530
1519
indexThisFile = true;
1531
1520
} elseif (indexThisMetadata) {
1532
1521
// Draft version, file is not new or all file metadata matches the released version
Stringmsg = "No-op. Unexpected condition reached: There is no published version and the latest published version is neither " + DatasetVersion.VersionState.DRAFT + " nor " + DatasetVersion.VersionState.DEACCESSIONED + ". Its state is " + latestVersionState + ".";
118
-
logger.info(msg);
119
-
}
120
-
} elseif (atLeastOnePublishedVersion == true) {
121
-
if (latestVersionState.equals(DatasetVersion.VersionState.RELEASED)
0 commit comments