CrossRef / rest-api-doc

Documentation for Crossref's REST API. For questions or suggestions, see https://community.crossref.org/
Other
736 stars 269 forks source link

confusing results using from-pub-date or from-published-date #582

Open andreaspacher opened 1 year ago

andreaspacher commented 1 year ago

Hello, thanks for the great service with the CrossRef API!

When I use a query like this ...

https://api.crossref.org/journals/1942-7786/works?query=from-pub-date:2019-06-01&select=is-referenced-by-count,DOI,title,published&rows=1000&cursor=*&debug=true

... I would expect to see all publications from ISSN 1942-7786 published since 1 June 2019.

However, the list includes publication dates before 2019 (like from 2009, from 2010 etc.), and it actually omits publications that should be listed, such as this one: https://api.crossref.org/works/10.1177/1942778620918041​ (published 2020).

Is there anything wrong with my query? When I replace from-pub-date with from-published-date, the results do not change.

By the way, I notice similar issues with other ISSNs as well, so the confusing results do not seem to be grounded in the journal.

Thank you for your help!

dtkaczyk commented 1 year ago

Hi @andreaspacher

Thanks for using the API!

In this case, a filter should be used: ?filter=from-pub-date:2019-06-01&.... This will have the effect of filtering based on the value of a specific field.

In your current version, a query performs a full text search using given terms, in this case "from", "pub", "date", "2019", "06, "01". It does not interpret the value in any way. This is probably not what you want.

andreaspacher commented 1 year ago

Thank you for your help! You are right, I get the correct results now. Thanks a lot!