Skip to content

Search API: document "score" option under "sort" parameter#12160

Merged
pdurbin merged 2 commits intoIQSS:developfrom
superpegaso2703:patch-1
Feb 13, 2026
Merged

Search API: document "score" option under "sort" parameter#12160
pdurbin merged 2 commits intoIQSS:developfrom
superpegaso2703:patch-1

Conversation

@superpegaso2703
Copy link
Copy Markdown
Member

@superpegaso2703 superpegaso2703 commented Feb 12, 2026

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:

@pdurbin pdurbin moved this to Ready for Triage in IQSS Dataverse Project Feb 13, 2026
Copy link
Copy Markdown
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some quick feedback.

Comment thread doc/sphinx-guides/source/api/search.rst Outdated
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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread doc/sphinx-guides/source/api/search.rst Outdated
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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm not sure this note is necessary. 🤷

Updated search.rst, now it includes score floating point value in sort parameter
@pdurbin pdurbin changed the title Update search.rst (https://github.com/IQSS/dataverse/issues/11105) Search API: document "score" option under "sort" parameter Feb 13, 2026
Copy link
Copy Markdown
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@superpegaso2703 looks great! Thanks! Merging!

@github-project-automation github-project-automation Bot moved this from Ready for Triage to Ready for QA ⏩ in IQSS Dataverse Project Feb 13, 2026
@pdurbin pdurbin merged commit bef0f83 into IQSS:develop Feb 13, 2026
8 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for QA ⏩ to Merged 🚀 in IQSS Dataverse Project Feb 13, 2026
@pdurbin pdurbin added this to the 6.10 milestone Feb 13, 2026
@superpegaso2703 superpegaso2703 deleted the patch-1 branch February 16, 2026 21:13
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Docs: Search API sort=score

3 participants