Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5053 apis custom homepage #5249

Merged
merged 59 commits into from
Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
79af0ea
Reorder metric endpoints in code, create stub #5053
matthew-a-dunlap Sep 27, 2018
abd892d
First new metric, more code reorg #5053
matthew-a-dunlap Sep 27, 2018
61a2607
Working dataversesBySubject #5053
matthew-a-dunlap Sep 27, 2018
fe144bc
Search multiple subtrees, incomplete #5053
matthew-a-dunlap Sep 28, 2018
af7f0eb
Pass multiple dataverses into SearchServiceBean #5053
matthew-a-dunlap Sep 28, 2018
02f0f03
Merge branch 'develop' into 5053-apis-custom-homepage
matthew-a-dunlap Oct 2, 2018
bc74eab
fix old facet name in advanced search example #5053
matthew-a-dunlap Oct 2, 2018
2d05740
Test javascript for homepage & prototyping search tweaks #5053
matthew-a-dunlap Oct 4, 2018
5bf34ec
Merge branch 'develop' into 5053-apis-custom-homepage
matthew-a-dunlap Oct 9, 2018
db87186
Display thumbnails via thumbnail api #5053
matthew-a-dunlap Oct 9, 2018
8896b61
Fix subtree permissions bug #5053
matthew-a-dunlap Oct 10, 2018
a95902c
Expose entity query option for search #5053
matthew-a-dunlap Oct 11, 2018
60987f9
IT Tests for subtrees #5053
matthew-a-dunlap Oct 11, 2018
ea722b8
Restore old search call with retrieveEntities default #5053
matthew-a-dunlap Oct 11, 2018
654ccb6
More homepage queries in html page #5053
matthew-a-dunlap Oct 11, 2018
a91a8b5
Initial commit for new dynamic custom homepage template [ref #5053]
mheppler Oct 12, 2018
c22b655
Prototype with all the queries, or as close as possible #5053
matthew-a-dunlap Oct 12, 2018
e58df99
Revised javascript to use HTML template, still need to wire up subjec…
mheppler Oct 16, 2018
79a242c
Minor homepage tweaks before demo #5053
matthew-a-dunlap Oct 16, 2018
81e72b9
More homepage tweaks, fixed dataverses bySubject parsing #5053
matthew-a-dunlap Oct 16, 2018
8c97ae9
Metrics restructure, count all without month #5053
matthew-a-dunlap Oct 17, 2018
00cb6e6
Metrics restructure forgotten doc change #5053
matthew-a-dunlap Oct 17, 2018
d4ebca8
Metrics restructure forgot all-time #5053
matthew-a-dunlap Oct 17, 2018
5256dc7
Revised column layout of recent datasets in custom hmpg template [ref…
mheppler Oct 18, 2018
67a8849
Added metric endpoint for counts over the past X days #5053
matthew-a-dunlap Oct 18, 2018
f51378b
homepage use downloads not files. Also wire new endpoint #5053
matthew-a-dunlap Oct 18, 2018
878d978
Add DV Category to dataset w/ update #5053
matthew-a-dunlap Oct 22, 2018
7e94cf5
Add DV Category to files #5053
matthew-a-dunlap Oct 22, 2018
d622c3a
Updated homepage for category indexed on datasets #5053
matthew-a-dunlap Oct 22, 2018
d4115bb
Forgot count limit on homepage #5053
matthew-a-dunlap Oct 22, 2018
8abd1f6
Switch dataset/file dvCategory to different solr field #5053
matthew-a-dunlap Oct 23, 2018
008de4b
Sort/cleanup subjects. Correct ds category links #5053
matthew-a-dunlap Oct 23, 2018
60ee4f8
Added subject column ordering to custom hmpg, removed jquery link and…
mheppler Oct 23, 2018
db82f9d
Cleaned out older code in custom hmpg [ref #5053]
mheppler Oct 23, 2018
a811c8c
Nested Subtree test, better createDataverse IT func #5053
matthew-a-dunlap Oct 23, 2018
f38d31c
Add error when no thumbnail via api, use in homepage #5053
matthew-a-dunlap Oct 24, 2018
6fa8c96
Better date string, dynamic (no) base url string #5053
matthew-a-dunlap Oct 24, 2018
96fa7e8
Added static links to custom hmpg [ref #5053]
mheppler Oct 24, 2018
3c772a7
Remove upped testing result limit for search #5053
matthew-a-dunlap Oct 24, 2018
5fdb1eb
Moved custom hmpg template to static file dir, also minor text and la…
mheppler Oct 25, 2018
115a990
More custom hmpg layout improvements, added initial attemp at roundin…
mheppler Oct 25, 2018
a8c76ed
index/reindex parent dataverse alias/name for datasets #5053
matthew-a-dunlap Oct 25, 2018
0892572
dynamic dataset count search bar #5053
matthew-a-dunlap Oct 26, 2018
2936aa3
doc changes #5053
matthew-a-dunlap Oct 26, 2018
8c06694
Merge branch 'develop' into 5053-apis-custom-homepage
matthew-a-dunlap Oct 26, 2018
7e7eb38
Improve responsive layout of custom hmpg [ref #5053]
mheppler Oct 29, 2018
e891490
Fixed docs formatting warnings. Revised Custom Homepage section of In…
mheppler Oct 29, 2018
32b2ea5
Fixed broken link in custom hmpg [ref #5053]
mheppler Oct 29, 2018
f2eed5c
Fixed responsive subject cols in custom hmpg [ref #5053]
mheppler Oct 30, 2018
17c0116
Updated link for other repositories on custom hmpg [ref #5053]
mheppler Oct 30, 2018
2f52f13
Date sort for category search #5053
Oct 30, 2018
65b70a0
Cleaned up layout of custom hmpg [ref #5053]
mheppler Oct 30, 2018
79e3d51
Update search thumbnail test for error response #5053
matthew-a-dunlap Oct 30, 2018
f45eec8
Added comments about thumbnail test #5053
matthew-a-dunlap Oct 30, 2018
b1e685e
Greatly simplified metrics guide page #5053
matthew-a-dunlap Oct 30, 2018
024fc4b
Null search scope (dataverse) searches root #5053
matthew-a-dunlap Nov 2, 2018
7fa49d0
post-discussion metrics formatting #5053
matthew-a-dunlap Nov 2, 2018
9df9c07
Doc typo #5053
matthew-a-dunlap Nov 2, 2018
91dca3d
Merge branch 'develop' into 5053-apis-custom-homepage
matthew-a-dunlap Nov 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion conf/solr/7.3.0/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@
<field name="dvDescription" type="text_en" stored="true" indexed="true" multiValued="false"/>

<field name="dvCategory" type="string" stored="true" indexed="true" multiValued="false"/>

<field name="categoryOfDataverse" type="string" stored="true" indexed="true" multiValued="false"/>
<field name="identifierOfDataverse" type="string" stored="true" indexed="true" multiValued="false"/>

<field name="publicationDate" type="string" stored="true" indexed="true" multiValued="false"/>
<field name="dsPublicationDate" type="string" stored="true" indexed="true" multiValued="false"/>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@

<style>
/* Custom CSS for the custom homepage... */
.lite-header {font-weight: normal;}
div.hmpg-action-block {padding-top:1em;}
.btn-harvard {
color: #A51C30;
background: #FFFFFF;
font-weight: bold;
}
.btn-harvard:hover,
.btn-harvard:focus,
.btn-harvard:active,
.btn-harvard.active,
.open .dropdown-toggle.btn-harvard {
color: #7F000A;
background: #FFFFFF;
font-weight: bold;
}

div.search-widget {padding-bottom: 2em;}

@media (min-width: 768px) {
#dataversesBySubject {-webkit-column-count: 3; -moz-column-count: 3; column-count: 3;}
}
#dataversesBySubject p.browse-subjects {display:inline-block; width:100%; padding:0 2px;}
#dataversesBySubject p.browse-subjects a {color: #C55B28;}
#dataversesBySubject p.browse-subjects a:focus, p.browse-subjects a:hover {color: #9F3502;}

div.hmpg-recent-col div.col-xs-2.hmpg-recent-thumb {width: 48px !important;padding: 0 !important;}
div.hmpg-recent-col div.hmpg-recent-thumb img {max-height:48px;max-width:48px;}
div.hmpg-recent-col div.hmpg-recent-thumb span {font-size:38px;}

div.hmpg-activity-block .row .lite-header {margin-left:1em;}
</style>

<!-- ACTIONS -->
<div class="row hmpg-action-block">
<div class="col-sm-6 col-xs-12">
<div class="h4 lite-header">Deposit and share your data. Get academic credit.</div>
<p class="text-muted margin-bottom">Harvard Dataverse is a digital repository. Deposit data and code here.</p>
<a class="btn btn-default btn-harvard margin-top margin-bottom" href="/dataset.xhtml?ownerId=1">
Add data to Harvard Dataverse <span class="glyphicon glyphicon-plus"></span>
</a>
</div>
<div class="col-sm-6 col-xs-12">
<div class="h4 lite-header">Organize datasets and gather metrics in your own virtual archive.</div>
<p class="text-muted margin-bottom">A dataverse is a virtual archive. A dataverse can contain dataverses, datasets, files and metadata.</p>
<a class="btn btn-default btn-harvard margin-top margin-bottom" href="/dataverse.xhtml?ownerId=1">
Create my own dataverse <span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
</div>

<hr/>

<!-- SEARCH + BROWSE + RECENT -->
<div class="row hmpg-browse-block">

<!-- SEARCH -->
<div class="col-xs-12">
<div class="h4 lite-header margin-bottom">Find data across research fields, preview metadata, and download files.</div>
<div class="row">
<div class="col-md-5 col-sm-6 col-xs-11">
<div class="search-widget input-group">
<input id="inputDataverseSearch" class="form-control" type="text" placeholder="Search over 75,000 datasets..." onkeydown="if (event.keyCode == 13) document.getElementById('btnDataverseSearch').click();">
<span class="input-group-btn">
<button id="btnDataverseSearch" class="btn btn-default" type="button" onclick="window.location = '/dataverse/root?q=' + document.getElementById('inputDataverseSearch').value;return false;"><span class="glyphicon glyphicon-search"></span> Find</button>
</span>
</div>
</div>
</div>
</div>

<!-- BROWSE SUBJECT -->
<div class="col-xs-12">
<p class="text-muted">Browse dataverses in this repository by subject.</p>
<div class="row margin-bottom">
<div id="dataversesBySubject" class="col-xs-12">

</div>
</div>
</div>

<!-- RECENT CATEGORY -->
<div class="col-xs-12">
<div class="row">
<div class="col-sm-6 col-xs-12 hmpg-recent-col">
<div class="h4 lite-header margin-bottom">Datasets from journal articles</div>

<hr class="col-xs-11 no-margin-top"/>

<!-- JOURNAL RESULTS -->
<div id="journals" class="row col-xs-12">Loading...</div>

<!-- VIEW ALL -->
<div class="row col-xs-12">
<p class="small text-muted"><a href="/dataverse/root?q=%28categoryOfDataverse%3A%22Journal%22%29&types=datasets&sort=dateSort&order=desc">ALL RECENT JOURNAL ACTIVITY</a> <span class="glyphicon glyphicon-chevron-right"></span></p>
</div>
</div>

<div class="col-sm-6 col-xs-12 hmpg-recent-col">
<div class="h4 lite-header margin-bottom">Datasets from research projects, groups and researchers</div>

<hr class="col-xs-11 no-margin-top"/>

<!-- RESEARCHERS RESULTS -->
<div id="researchers" class="row col-xs-12">Loading...</div>

<!-- VIEW ALL -->
<div class="row col-xs-12">
<p class="small text-muted"><a href= "/dataverse/root?q=%28categoryOfDataverse%3A%22Research+Project%22+OR+categoryOfDataverse%3A%22Researcher%22+OR+categoryOfDataverse%3A%22Research+Group%22%29&types=datasets&sort=dateSort&order=desc">ALL RECENT RESEARCHERS ACTIVITY</a> <span class="glyphicon glyphicon-chevron-right"></span></p>
</div>
</div>
</div>
</div>
</div>

<hr/>

<!-- ACTIVITY -->
<div class="row hmpg-activity-block">
<div class="col-xs-12">
<div class="h4 lite-header margin-bottom">Activity</div>
</div>
<div class="col-xs-12 row">
<div class="col-sm-6 col-xs-12">
<p><span class="highlightBold">All Files</span> <span class="h4 lite-header" id="activityAllTimeDatasetsValue"></span> datasets added <span class="h4 lite-header" id="activityAllTimeFilesValue"></span> file downloads</p>
</div>
<div class="col-sm-6 col-xs-12">
<p><span class="highlightBold">Past 30 Days</span> <span class="h4 lite-header" id="activity30DaysDatasetsValue"></span> datasets added <span class="h4 lite-header" id="activity30DaysFilesValue"></span> file downloads</p>
</div>
</div>
</div>

<hr/>

<!-- OTHER LINKS -->
<div class="row hmpg-other-block">
<div class="col-xs-12">
<div class="h4 lite-header margin-bottom">Looking for other online repositories at Harvard?</div>
<p class="text-muted"><a href="https://library.harvard.edu/services-tools/dash" target="_blank">Harvard DASH central, open-access repository</a> <span class="glyphicon glyphicon-chevron-right"></span> &#160;&#160; <a href="https://library.harvard.edu/services-tools/harvard-library-apis-datasets" target="_blank">Other data at Harvard</a> <span class="glyphicon glyphicon-chevron-right"></span></p>
</div>
</div>

<script type="text/javascript">
//<![CDATA[

//switch baseUrl to point to a different server than the local box
var baseUrl = "";

var thumbBaseURL = baseUrl + "/api/datasets/:persistentId/thumbnail" + "?persistentId=";
var metricBaseUrl = baseUrl + "/api/info/metrics/";
var simpleCatSearch = baseUrl + "/api/search?q=*&type=dataset&sort=dateSort&order=desc&fq=categoryOfDataverse:";

function writeRecentDatasetsInDataverses(fqString, resultCount, elm) {
$.get(simpleCatSearch + fqString + "&per_page=" + resultCount, function(jData) {
var resultHtml = "";
jData.data.items.forEach(function(item){
var date = new Date(item.published_at);
resultHtml += "<div class=\"row col-xs-12\">";
resultHtml += "<div class=\"col-xs-2 text-center hmpg-recent-thumb\"><a href=\"/dataset.xhtml?persistentId=" + item.global_id + "\">";
resultHtml += "<object data=\"" + thumbBaseURL + item.global_id + "\" type=\"image/png\"/><span class=\"icon-dataset\"></span></object></div>";
resultHtml += "<div class=\"col-xs-9 col-md-10 hmpg-recent-metadata\"><p><a href=\"/dataset.xhtml?persistentId=" + item.global_id + "\">" + item.name + "</a></p><p class=\"small text-muted\"><a href=\"/dataverse/" + item.identifier_of_dataverse + "\">" + item.name_of_dataverse + "</a> - " + date.toDateString() + "</p></div>";
resultHtml += "<hr class=\"col-xs-12\"/></div>";
});
document.getElementById(elm).innerHTML = resultHtml;
});
}

//For metrics that return simple json with a count
function queryMetricSimple(metricRelPath, month, elm) {
$.get(metricBaseUrl + metricRelPath + month, function(jData) {
var resultCount = jData.data.count;
document.getElementById(elm).innerHTML = resultCount;
});
}

function queryMetricSearch(metricRelPath, month) {
$.get(metricBaseUrl + metricRelPath + month, function(jData) {
var resultCount = jData.data.count;
var roundedDatasetCount = Math.floor(resultCount / 100) * 100;
var dynamicSearchPlaceholder = "Search over " + roundedDatasetCount + " datasets...";
$("#inputDataverseSearch").attr({"placeholder" : dynamicSearchPlaceholder});
});
}

function querySubject(elm) {
$.get(metricBaseUrl + "dataverses/bySubject", function(jData) {
var subArray = [];
var resultHtml = "";
jData.data.forEach(function(item) {
if(item.subject !== "N/A")
subArray.push([item.subject, item.count]);
});
subArray.sort();
subArray.forEach(function(subject){
resultHtml += "<p class=\"browse-subjects\"><a href=\"/dataverse/root?q=&fq0=subject_ss%3A%22" + subject[0] + "%22&types=datasets&sort=dateSort&order=desc\">" + subject[0] + "</a> <span class=\"text-muted\">" + subject[1] + "</span></p>";
});
document.getElementById(elm).innerHTML = resultHtml;
});
}

writeRecentDatasetsInDataverses("(Journal)" , 3, "journals");
writeRecentDatasetsInDataverses("(\"Research+Project\"%20OR%20Researcher%20OR%20\"Research+Group\")" , 3, "researchers");

queryMetricSimple("datasets", "", "activityAllTimeDatasetsValue");
queryMetricSimple("downloads", "", "activityAllTimeFilesValue");

queryMetricSimple("datasets/pastDays", "/30", "activity30DaysDatasetsValue");
queryMetricSimple("downloads/pastDays", "/30", "activity30DaysFilesValue");

querySubject("dataversesBySubject");
queryMetricSearch("datasets", "");

//]]>
</script>
3 changes: 2 additions & 1 deletion doc/sphinx-guides/source/api/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ We encourage anyone interested in building tools that interoperate with Datavers
How This Guide is Organized
---------------------------

We document the Dataverse API in four sections:
We document the Dataverse API in five sections:

- :doc:`sword`: For depositing data using a standards-based approach rather than the :doc:`native-api`.
- :doc:`search`: For searching dataverses, datasets, and files.
- :doc:`dataaccess`: For downloading and subsetting data.
- :doc:`native-api`: For performing most tasks that are possible in the GUI.
- :doc:`metrics`: For query statisics about usage of a Dataverse installation.

We use the term "native" to mean that the API is not based on any standard. For this reason, the :doc:`search` and :doc:`dataaccess` could also be considered "native" and in the future we may reorganize the API Guide to split the :doc:`native-api` section into "Datasets API", "Files" API, etc.

Expand Down
76 changes: 51 additions & 25 deletions doc/sphinx-guides/source/api/metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,78 @@ Metrics API
.. contents:: |toctitle|
:local:

The Metrics API

.. note:: |CORS| The Metrics API can be used from scripts running in web browsers, as it allows cross-origin resource sharing (CORS).

.. note:: For all metrics `besides` Past Days Count (``/pastDays/$days``), Database setting ``MetricsCacheTimeoutMinutes`` defines how long the cached value will be returned by subsequent queries.

.. _CORS: https://www.w3.org/TR/cors/

dataverses/toMonth
----------------------
Total
-----

Returns a count of various objects in dataverse over all-time::

GET https://$SERVER/api/info/metrics/$type

``$type`` can be set to ``dataverses``, ``datasets``, ``files`` or ``downloads``.

Example: ``curl https://demo.dataverse.org/api/info/metrics/downloads``

To-Month
--------

Returns a count of various objects in dataverse up to a specified month ``$YYYY-DD`` in YYYY-MM format (i.e. ``2018-01``)::

GET https://$SERVER/api/info/metrics/$type/toMonth/$YYYY-DD

``$type`` can be set to ``dataverses``, ``datasets``, ``files`` or ``downloads``.

Example: ``curl https://demo.dataverse.org/api/info/metrics/dataverses/toMonth/2018-01``


Past Days
---------

Returns a count of various objects in dataverse for the past ``$days`` (i.e. ``30``)::

GET https://$SERVER/api/info/metrics/$type/pastDays/$days

``$type`` can be set to ``dataverses``, ``datasets``, ``files`` or ``downloads``.

Returns a count up to the current month or append a date in YYYY-MM format (i.e. ``/2018-01``) for a specific month.
Example: ``curl https://demo.dataverse.org/api/info/metrics/datasets/pastDays/30``

``curl https://demo.dataverse.org/api/info/metrics/dataverses/toMonth``

datasets/toMonth
------------------------
Dataverse Specific Commands
---------------------------

Returns a count up to the current month or append a date in YYYY-MM format (i.e. ``/2018-01``) for a specific month.
By Subject
~~~~~~~~~~~~~~~

``curl https://demo.dataverse.org/api/info/metrics/datasets/toMonth``
Returns the number of dataverses by each subject::

files/toMonth
------------------------
GET https://$SERVER/api/info/metrics/dataverses/bySubject

Returns a count up to the current month or append a date in YYYY-MM format (i.e. ``/2018-01``) for a specific month.

``curl https://demo.dataverse.org/api/info/metrics/files/toMonth``
By Category
~~~~~~~~~~~~~~~~~~~~~~

downloads/toMonth
------------------------
Returns the number of dataverses by each category::

Returns a count up to the current month or append a date in YYYY-MM format (i.e. ``/2018-01``) for a specific month.
GET https://$SERVER/api/info/metrics/dataverses/byCategory

``curl https://demo.dataverse.org/api/info/metrics/downloads/toMonth``

dataverses/byCategory
------------------------
Dataset Specific Commands
-------------------------

``curl https://demo.dataverse.org/api/info/metrics/dataverses/byCategory``
By Subject
~~~~~~~~~~~~~~~

datasets/bySubject
------------------------
Returns the number of datasets by each subject::

``curl https://demo.dataverse.org/api/info/metrics/datasets/bySubject``
GET https://$SERVER/api/info/metrics/datasets/bySubject

.. |CORS| raw:: html

<span class="label label-success pull-right">
CORS
</span>
</span>
7 changes: 4 additions & 3 deletions doc/sphinx-guides/source/api/search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Search API

The Search API supports the same searching, sorting, and faceting operations as the Dataverse web interface.

Unlike the web interface, this new API is limited to *published* data until `issue 1299 <https://github.com/IQSS/dataverse/issues/1299>`_ is resolved.
Unlike the web interface, this new API is limited to *published* data.

The parameters and JSON response are partly inspired by the `GitHub Search API <https://developer.github.com/v3/search/>`_.

Expand All @@ -26,7 +26,7 @@ Name Type Description
=============== ======= ===========
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
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
subtree string The identifier of the dataverse to which the search should be narrowed. The subtree of this dataverse and all its children will be searched. For example, https://demo.dataverse.org/api/search?q=data&subtree=birds
subtree string The identifier of the dataverse to which the search should be narrowed. The subtree of this dataverse and all its children will be searched. Multiple "subtree" parameters can be used to include multiple Dataverses. For example, https://demo.dataverse.org/api/search?q=data&subtree=birds&subtree=cats .
sort string The sort field. Supported values include "name" and "date". See example under "order".
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
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>`.
Expand All @@ -35,6 +35,7 @@ show_relevance boolean Whether or not to show details of which fields were ma
show_facets boolean Whether or not to show facets that can be operated on by the "fq" parameter. False by default. See :ref:`advanced search example <advancedsearch-example>`.
fq string A filter query on the search term. Multiple "fq" parameters can be used. See :ref:`advanced search example <advancedsearch-example>`.
show_entity_ids boolean Whether or not to show the database IDs of the search results (for developer use).
query_entities boolean Whether entities are queried via direct database calls (for developer use).
=============== ======= ===========

Basic Search Example
Expand Down Expand Up @@ -107,7 +108,7 @@ Advanced Search Example

https://demo.dataverse.org/api/search?q=finch&show_relevance=true&show_facets=true&fq=publicationDate:2016&subtree=birds

In this example, ``show_relevance=true`` matches per field are shown. Available facets are shown with ``show_facets=true`` and of the facets is being used with ``fq=publication_date_s:2015``. The search is being narrowed to the dataverse with the identifier "birds" with the parameter ``subtree=birds``.
In this example, ``show_relevance=true`` matches per field are shown. Available facets are shown with ``show_facets=true`` and of the facets is being used with ``fq=publicationDate:2016``. The search is being narrowed to the dataverse with the identifier "birds" with the parameter ``subtree=birds``.

.. code-block:: json

Expand Down