-
Notifications
You must be signed in to change notification settings - Fork 726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GHSearchBuilder terms are cumulative when I expected them to overwrite previous one #314
Comments
You'd expect Between the backward compatibility & obvious "work around", I'm not going to change this. |
Yea, backwards compatibility and work arounds probably make this not worth
changing. For calls like `repo()` it only makes sense to have one repo.
Maybe pointer in the docs would help.
…On Sat, Nov 26, 2016 at 5:52 PM, Kohsuke Kawaguchi ***@***.*** > wrote:
You'd expect search.q("foo").q("bar").list() to search "foo" and "bar",
so I'm not sure if the overwriting is expected. Perhaps your point is more
about making list() reset the terms?
Between the backward compatibility & obvious "work around", I'm not going
to change this.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#314 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAdVbaLBKTi4GyC1FUVlipF3VHjA92fiks5rCLgUgaJpZM4K8tix>
.
--
David Xia
davidxia.com
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This isn't a huge deal, but I thought I'd point out something I didn't expect as a user.
I thought that if I reused
GHContentSearchBuilder
which extendsGHSearchBuilder
, it'srepo()
method would overwrite previous calls ofrepo()
. I was confused when my search results from the second call below was the same as the first.The reason is because calling
repo()
(and other methods likein()
, etc) add terms instead of overwriting previous ones. See above comments.Consider overwriting as that seems more intuitive?
The text was updated successfully, but these errors were encountered: