Hyphenated funder names not returning results in the rest api, staging and in production
Background
Users have found that hyphenated funder names are not being found in CRMDS. Upon further investigation, the rest api search for hyphenated names was also proving to be problematic.
Observed behavior
When I do a search on https://api.staging.crossref.org/funders?query=Università degli Studi Milano-Bicocca
, I get the following results:
{
"status": "ok",
"message-type": "funder-list",
"message-version": "1.0.0",
"message": {
"items-per-page": 20,
"query": {
"start-index": 0,
"search-terms": "\"Università degli Studi di Milano-Bicocca\""
},
"total-results": 0,
"items": []
}
}
, i.e.0 hits, as opposed to https://api.staging.crossref.org/funders?query="Università degli Studi di Milano"
which returns
{
"status": "ok",
"message-type": "funder-list",
"message-version": "1.0.0",
"message": {
"items-per-page": 20,
"query": {
"start-index": 0,
"search-terms": "\"Università degli Studi di Milano\""
},
"total-results": 2,
"items": [
{
"id": "501100002954",
"location": "Italy",
"name": "Università degli Studi di Milano-Bicocca",
"alt-names": [
"University of Milano-Bicocca"
],
"uri": "http://dx.doi.org/10.13039/501100002954",
"replaces": [],
"replaced-by": [],
"tokens": [
"università",
"degli",
"studi",
"di",
"milano",
"bicocca",
"university",
"of",
"milano",
"bicocca"
]
},
{
"id": "100012352",
"location": "Italy",
"name": "Università degli Studi di Milano",
"alt-names": [
"UniMi",
"La Statale",
"University of Milan",
"Universitas Studiorum Mediolanensis"
],
"uri": "http://dx.doi.org/10.13039/100012352",
"replaces": [],
"replaced-by": [],
"tokens": [
"università",
"degli",
"studi",
"di",
"milano",
"unimi",
"la",
"statale",
"university",
"of",
"milan",
"universitas",
"studiorum",
"mediolanensis"
]
}
]
}
}
In production: http://api.crossref.org/funders?query=Università degli Studi di Milano-Bicocca
also returns 0 hits. However, this search produces results: http://api.crossref.org/funders?query=Università degli Studi G. d'Annunzio Chieti - Pescara
on production while this one, in staging, doesn’t: https://api.staging.crossref.org/funders?query=Università degli Studi G. d'Annunzio Chieti - Pescara
, however both instances return no results if the search is on this term: Università degli Studi G. d'Annunzio Chieti-Pescara
Expected behavior
Search with hyphens regardless of spacing between terms should return results if the record with that term is indexed
Definition of ready
-
Product owner: @ppolischuk1 -
Tech lead: @dtkaczyk -
Service:: label applied -
Definition of done updated -
Acceptance testing plan: staging -
Weight applied
Definition of done
-
Unit tests identified, implemented, and passing -
Code reviewed -
Available via a staging URL -
Knowledge base reviewed and updated -
Consider any impacts to current or future architecture/infrastructure, and update specifications and documentation as needed -
Acceptance criteria met -
Records with funder names that include hyphens are returned if the hyphenated name is used as a search term in elasticsearch cayenne. Eg https://api.staging.crossref.org/funders?query=Università degli Studi Milano-Bicocca
should return"id": "501100002954"
in the results.
-
-
Acceptance testing passed -
Deployed to production