Search results page and Search API results show fewer fields that match users' search terms
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
What steps does it take to reproduce the issue?
-
When does this issue occur?
When searching for datasets without specifying a metadata field:
-
Such as typing search terms in the "general" search field:
-
Or when using the Search API to search without specifying a metadata field and using the "show_relevance" parameter so that the results also show which metadata fields have values that match the search term, such as
https://demo.dataverse.org/api/search?q=covid&show_relevance=true
-
-
Which page(s) does it occurs on?
On search pages and in search API results
-
What happens?
For users of Dataverse repositories that are using Dataverse v6.6, search results pages and search API results show fewer fields that match users' search terms.
For example, when I use the UI to search on Demo Dataverse for "Beques Universitat URV" without specifying a metadata field, https://demo.dataverse.org/dataverse/demo/?q="Beques+Universitat+URV", the results include the dataset that has "Beques Universitat URV" in its metadata fields. But I can't see what metadata fields have the matching value.
And when I use the Search API, https://demo.dataverse.org/api/search?q="Beques+Universitat+URV"&show_relevance=True, the results also include the dataset that has "Beques Universitat URV" in one of its metadata fields. But the "matches" key is empty or maybe full of space characters:
-
To whom does it occur (all users, curators, superusers)?
All users
-
What did you expect to happen?
In v6.5 and earlier versions of Dataverse, when a user uses the UI to search without specifying a metadata field, the search results page shows which metadata field has values that match the search term. And when a user uses the Search API and the show_relevance parameter, those results also include which metadata field has values that match the search term
We can see this in the University of Virginia Dataverse. It's running v6.5 as of this writing, and when I use the Search API to search for "NIAID" without specifying a field, https://dataverse.lib.virginia.edu/api/search?q=NIAID&show_relevance=True, the results include the dataset that has "NIAID" in one of its metadata fields, and the "matches" key shows that the Funding Information Agency field (grantNumberAgency) has a value that matches the search term:
And on the search results page, https://dataverse.lib.virginia.edu/dataverse/uva?q=NIAID, I can see that the matching value is in the Funding Information Agency field:
The Search API used to work this way in Demo Dataverse and in Harvard Dataverse when they were running v6.5 and earlier versions of Dataverse.
Which version of Dataverse are you using?
v6.6
Any related open or closed issues to this bug report?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the search results pages and Search API entry points, reproducing the issue on Dataverse v6.6 with an unspecified metadata field and show_relevance enabled. Compare the returned matching fields with the documented v6.5 behavior; done means the UI and API again identify the metadata fields whose values match the search terms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100