lukasschwab / arxiv.py

Python wrapper for the arXiv API
MIT License
1.07k stars 120 forks source link

Add unencoded nontrivial query example to README.md #122

Closed gmontana closed 11 months ago

gmontana commented 1 year ago

I am trying to run a complex query, e.g. query = "cat:cs.CV+OR+cat:cs.LG+OR+cat:cs.CL+OR+cat:cs.AI+OR+cat:cs.NE+OR+cat:cs.RO" but I noticed that any query involving the AND/OR does not return anything. I am able to run those queries from Python in other ways so the query expression is definitely correct. Am I doing something wrong? Thanks.

gmontana commented 1 year ago

apologies, I just saw the relevant comment in the code: This should be unencoded. Use au:del_maestro AND ti:checkerboard, not au:del_maestro+AND+ti:checkerboard.

lukasschwab commented 1 year ago

No need to apologize! I think this is common enough that I should lift a more complex query example into the README docs.

mdfwn commented 11 months ago

I think if you provide an API that wraps the arxiv.org API you should lift the user's burden of understanding the construction of queries and provide arguments like "authors", "categories", etc to the Search method.

lukasschwab commented 11 months ago

@mdfwn #84 was an initiative to that end, but it didn't yield a preferable interface. If you wind up writing a set of helpers you think might be generally applicable, I'm open to reviewing a PR.