Closed lkhamsurenl-zz closed 8 years ago
LGTM
So the site supports OR, but we are not leveraging that. Going to look at this a bit closer.
If you go there and do "phrase OR phrase" then that works as expected, but this provider does not support that.
This is working to: http://arxiv.org/find/all/1/all:{query}/0/1/0/all/0/1
Yes you can do or operation if you want, I assume that most of the time people would just search for exact phrase like: Deep convolutional network. We can add support for or in future if people request, what do you guys think?
Why not just type:
$ s "blue OR green AND red" -p arxiv
@lkhamsurenl sure, but you did include that in the code so that is where the confusion is from.
@KeizerDev: with this PR that won't work. Thats what I was commenting on. Right now it only supports AND which seems ok as a first pass.
@zquestz: Ikr
I personally do not think it's user friendly to allow users to manually enter AND or OR ops in the query. For instance:
We might be able to parse the query to enter AND into the query, but what if the user was searching for exact query with or in the query (but they did not intend to mean it's optional).
I was thinking that without an operator we default to AND, but then use OR if specified.
So "deep learning" would work fine. Or you can do "deep learning or machine learning"
Actually for the first pass this is fine. I can live. We can extend to an OR operator if anyone wants it in a subsequent PR. Thanks for the contribution!
Yep that might be the best solution. The only thing I can think of is in case user was searching for exact phrase with word or in it, like "Human computer interaction in space or in water". We would make it optional. But I think it'd still return the exact matching phrase as one of the search answers, since all we're doing is just making it optional. I can update PR with the changes :)
So the one thing I do want for this provider is some basic tests. I know we haven't tested most providers but this one actually has some logic that deserves a basic test or two.
Very good point. I've updated the PR with test cases and support for the "or" operation. Please let me know if you see any issue.
The syntax they use is super weird, but this is looking good. Thanks for the contribution and the test!
I know right? Thank YOU for the great tool, I love it!
Arxiv.org is a repo for e-prints, very useful for searching scientific papers.