Skip to content
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

Limit doesn't work as expected #97

Closed
dhinojosa opened this issue Jun 30, 2022 · 5 comments
Closed

Limit doesn't work as expected #97

dhinojosa opened this issue Jun 30, 2022 · 5 comments

Comments

@dhinojosa
Copy link

Hello. I just learned about this project today. I tried to use the limit flag, and I hope I am using it right, but only seems to still show 20 entries. An example is shown below. I used -l=3000 but it only showed 20

$ mcs search -l=3000 scalatest   
Searching for scalatest...
Found 1186 results

  Coordinates                                          Last updated
  ===========                                          ============
  org.scalatest:scalatest                              26 Apr 2011 at 10:47 (MDT)
  org.scala-tools.testing:scalatest                    05 Mar 2009 at 14:26 (MST)
  org.scalatest:scalatest_3                            21 Apr 2022 at 07:19 (MDT)
  org.scalatest:scalatest_0.27                         08 Sep 2020 at 07:55 (MDT)
  org.scalatest:scalatest_0.26                         21 Aug 2020 at 07:40 (MDT)
  org.scalatest:scalatest_0.24                         15 Jun 2020 at 08:41 (MDT)
  org.scalatest:scalatest_0.23                         08 May 2020 at 08:30 (MDT)
  org.scalatest:scalatest_0.22                         07 Mar 2020 at 01:16 (MST)
  org.scalatest:scalatest_0.17                         29 Nov 2019 at 08:10 (MST)
  org.scalatest:scalatest-flatspec_sjs1_3              21 Apr 2022 at 07:20 (MDT)
  org.scalatest:scalatest-refspec_sjs1_3               21 Apr 2022 at 07:20 (MDT)
  org.scalatest:scalatest-core_sjs1_3                  21 Apr 2022 at 07:20 (MDT)
  org.scalatest:scalatest_native0.4_3                  21 Apr 2022 at 07:20 (MDT)
  org.scalatest:scalatest-freespec_3                   21 Apr 2022 at 07:19 (MDT)
  org.scalatest:scalatest-wordspec_sjs1_3              21 Apr 2022 at 07:19 (MDT)
  org.scalatest:scalatest-diagrams_native0.4_3         21 Apr 2022 at 07:19 (MDT)
  org.scalatest:scalatest-shouldmatchers_3             21 Apr 2022 at 07:19 (MDT)
  org.scalatest:scalatest-diagrams_3                   21 Apr 2022 at 07:19 (MDT)
  org.scalatest:scalatest-mustmatchers_3               21 Apr 2022 at 07:19 (MDT)
  org.scalatest:scalatest-shouldmatchers_native0.4_3   21 Apr 2022 at 07:19 (MDT)
@dhinojosa
Copy link
Author

Seems that in order to get all the results in needs to use the start parameter. For example, https://search.maven.org/solrsearch/select?q=scalatest&rows=1186&wt=xml&start=40

@mthmulders
Copy link
Owner

Thanks for your detailed report, @dhinojosa. I think this is a bug indeed. I'm a bit busy at the moment so please don't expect a fix immediately, but I'm certainly going to look into it!

@mthmulders
Copy link
Owner

It turns out the maximum value for the rows parameter is 200. I guess so far I only tested with limits under that value, and never ran into this issue.

I think at some day I found a document by Sonatype saying they may throttle or even block you when you hit their API too often. This might indeed happen when the user would want to see all 3000 scalatest results :-). Blocking would not apply to MCS as a whole, but rather to the user of MCS (most likely, their IP address?).

@mthmulders
Copy link
Owner

mthmulders commented Aug 4, 2022

@dhinojosa, I have a working solution in #100. For quite some time, I felt the need to refactor it - and I still do - but I don't want the fix for this issue to depend on that.

Would you be comfortable trying out the fix yourself or would you like me to build a binary for you?

@mthmulders
Copy link
Owner

Fixed as of v0.2.2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants