adsabs / adsabs-dev-api

Developer API service description and example client code
162 stars 58 forks source link

Citation field is not filtered by citation count #94

Closed andresgur closed 1 week ago

andresgur commented 1 year ago

The problem appears in both on the API and on the search engine: property:refereed,article citation_count:[0 TO 1] year:1987

returns 191 papers with 0 to 1 citation

The number of paper citing these papers should be 191 or less as they all have 0 or 1 citations. But instead:

citations(property:refereed,article citation_count:[0 TO 1])

returns 8,928,552 results and in fact is insensitive to the value in citation_count. Thus the return values are not being filtered by the citation_count keyword. I could reproduce these same results using the API too with

r = requests.get("https://api.adsabs.harvard.edu/v1/search/query?q=year:1987&property:refereed,article&rows=2000&start=0&fl=citation&fq=citation_count:[0 TO 1]",\
            headers={'Authorization': 'Bearer ' + token})

This makes it difficult to retrieve the papers that cited papers with a given number of citations.

andresgur commented 1 year ago

I realized the issue was here:

property:(refereed AND article) instead of property:refereed,article

With that I find the expected behaviour.