Closed Palwol closed 1 year ago
viewpoint로 검색했을 때, 첫페이지는 아래와 같은 정보가 나오는군용 url: https://api.crossref.org/works?query=viewpoint&select=title,author
{
"status": "ok",
"message-type": "work-list",
"message-version": "1.0.0",
"message": {
"facets": {},
"total-results": 26925,
"items": [
{
"title": ["Pacific Viewpoint"]
},
{
"title": ["Introducing Pacific Viewpoint"],
"author": [
{
"family": "The Editor",
"sequence": "first",
"affiliation": []
}
]
},
{
"title": ["Pacific Viewpoint: TwentyFive Years On"]
},
{
"title": ["Refashioning a Pacific Viewpoint"],
"author": [
{
"given": "Overton",
"family": "John",
"sequence": "first",
"affiliation": [
{
"name": "Institute of Development Studies, Massey University"
}
]
},
{
"given": "Roche",
"family": "Michael",
"sequence": "additional",
"affiliation": [
{
"name": "Department of Geography at Massey University"
}
]
}
]
},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{}
],
"items-per-page": 20,
"query": {
"start-index": 0,
"search-terms": "viewpoint"
}
}
}
즉, title이 없는 정보에 대해 filter를 걸다보니, page별로 아예 정보가 없을 수도 있는 상황이네요~
이 문제를 해결하려면,, 2가지정도 방법이 있을 것 같아요.
/search
할 때는 우리 서비스의 db만 조회하고, db에 논문정보를 집어넣을 때, 적절한 논문(title이 있는)만 집어넣는다.
10,000+
처럼 표시하는 부분이 필요할 것 같아요.
이슈 내용
특정 검색어에 대해서 검색 결과가 rows에 설정한 갯수보다 적게 오는 현상이 발생합니다.
아래 스크린샷에서, rows가 20으로 설정되어 있음에도 불구하고 react-query dev tool에서 결과 데이터는 4개만 있습니다.
아래 스크린샷은 위와 동일하게 'viewpoint'로 검색하고 2번 페이지로 이동한 것인데, Articles가 26000개가 있었음에도 불구하고 데이터가 오지 않습니다.
crossref api 응답에서 title이 없는 논문이 제외하고 클라이언트에 데이터를 보내주고 있는데, title이 없는 논문이 많은 경우 이런 문제가 발생하는 것으로 보입니다.
아래와 같이 crossref api에서 viewpoint를 검색하면 title이 없는 논문이 많은 것을 알 수 있습니다. (offset=20)
기대 결과