ads icon indicating copy to clipboard operation
ads copied to clipboard

support for Positional Field Searches

Open richardgmcmahon opened this issue 2 years ago • 0 comments

I would like to run some positional searches to identify papers with the author is second or third as described here

https://ui.adsabs.harvard.edu/help/search/positional

e.g.

pos(author:”Oort, J”,2) | papers which have “J. Oort” as the second author

I tried q='pos(author:”Oort, J”,2)'

papers = list(ads.SearchQuery(q=q, fl=['id', 'first_author', 'title', 'year', 'citation_count], sort='citation_count desc'))

This returns:

Traceback (most recent call last): File "", line 1, in File "/Users/rgm/anaconda3/lib/python3.7/site-packages/ads/search.py", line 501, in next self.execute() File "/Users/rgm/anaconda3/lib/python3.7/site-packages/ads/search.py", line 533, in execute self.session.get(self.HTTP_ENDPOINT, params=self.query) File "/Users/rgm/anaconda3/lib/python3.7/site-packages/ads/base.py", line 94, in load_http_response raise APIResponseError(http_response.text)

richardgmcmahon avatar May 02 '22 19:05 richardgmcmahon