Search API: document "score" option under "sort" parameter#12160
Merged
pdurbin merged 2 commits intoIQSS:developfrom Feb 13, 2026
Merged
Search API: document "score" option under "sort" parameter#12160pdurbin merged 2 commits intoIQSS:developfrom
pdurbin merged 2 commits intoIQSS:developfrom
Conversation
pdurbin
reviewed
Feb 13, 2026
| 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 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 . | ||
| sort string The sort field. Supported values include "name", "date" and "relevance". See example under "order". | ||
| sort string The sort field. Supported values include "name", "date", and "score". Sorting by "score" orders by **Relevance** (highest to lowest) and is the default if this parameter is omitted. |
Member
There was a problem hiding this comment.
Suggested change
| sort string The sort field. Supported values include "name", "date", and "score". Sorting by "score" orders by **Relevance** (highest to lowest) and is the default if this parameter is omitted. | |
| 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. |
I prefer lower-case "relevance".
Also, I'm suggesting we remove "highest to lowest" because that's controlled by order.
Comment on lines
+47
to
+49
| .. note:: **Relevance Scoring** | ||
| Every search result includes a ``score`` field (float). This value is calculated by the search engine (Solr) and represents how relevant the item is to the search query. Higher scores indicate a closer match. When ``sort`` is set to "score" (the default), results are returned in descending order of this value. | ||
|
|
Member
There was a problem hiding this comment.
Hmm, I'm not sure this note is necessary. 🤷
Updated search.rst, now it includes score floating point value in sort parameter
a05b307 to
cb5d7ee
Compare
pdurbin
approved these changes
Feb 13, 2026
Member
pdurbin
left a comment
There was a problem hiding this comment.
@superpegaso2703 looks great! Thanks! Merging!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated search.rst, now it includes score floating-point value in sort parameter
Preview at https://dataverse-guide--12160.org.readthedocs.build/en/12160/api/search.html
What this PR does / why we need it:
It updates search.rst in order to include score floating-point value calculated by Solr, sent with sort parameter.
Which issue(s) this PR closes:
Special notes for your reviewer:
No, just documentation being updated.
Suggestions on how to test this:
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?:
Additional documentation: