Skip to content

Commit bef0f83

Browse files
authored
Merge pull request #12160 from superpegaso2703/patch-1
Search API: document "score" option under "sort" parameter
2 parents d022e3e + cb5d7ee commit bef0f83

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

doc/sphinx-guides/source/api/search.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ The parameters and JSON response are partly inspired by the `GitHub Search API <
1717

1818
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.
1919

20-
2120
Parameters
2221
----------
2322

@@ -27,7 +26,7 @@ Name Type Description
2726
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).
2827
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
2928
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.
3130
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
3231
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>`.
3332
start int A cursor for paging through search results. See :ref:`iteration example <iteration-example>`.

0 commit comments

Comments
 (0)