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 extends GHSearchBuilder, it's repo() method would overwrite previous calls of repo(). I was confused when my search results from the second call below was the same as the first.
final GHContentSearchBuilder searcher;
searcher.repo("foo").q("query1").list(); // terms are repo:foo, query1
searcher.repo("bar").q("query2").list(); // terms are repo:foo, query1, repo:bar, query2
The reason is because calling repo() (and other methods like in(), etc) add terms instead of overwriting previous ones. See above comments.
Consider overwriting as that seems more intuitive?
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
GHContentSearchBuilderwhich 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?