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

Order of search results #66

Open
jqno opened this issue Mar 22, 2022 · 2 comments
Open

Order of search results #66

jqno opened this issue Mar 22, 2022 · 2 comments

Comments

@jqno
Copy link

jqno commented Mar 22, 2022

Thanks for making such a nice tool, I love it!

I was wondering if it's possible to add some order to the search results of mcs class-search. Specifically, if it's possible to show the results in descending order of Last updated.

For instance:

└─❯ mcs class-search EqualsVerifier
Searching for artifacts containing EqualsVerifier...
Found 196 results (showing 20)

  Coordinates                                   Last updated
  ===========                                   ============
  org.atlanmod.commons:commons-testing:1.0.6    13 Oct 2020 at 08:45 (CEST)
  org.atlanmod.commons:commons-testing:1.0.5    10 May 2020 at 18:18 (CEST)
  name.didier.david:ndd-test4j:0.2.0            06 Mar 2014 at 22:05 (CET)
  name.didier.david:ndd-test4j:0.3.1            03 Jun 2014 at 09:58 (CEST)
  name.didier.david:ndd-test4j:0.3.0            28 May 2014 at 23:21 (CEST)
  name.didier.david:ndd-test4j:0.3.3            10 Jun 2014 at 21:55 (CEST)
  name.didier.david:ndd-test4j:0.3.2            06 Jun 2014 at 23:30 (CEST)
  name.didier.david:ndd-test4j:0.4.0            16 Nov 2016 at 14:33 (CET)
  name.didier.david:ndd-test4j:0.3.6            25 Feb 2015 at 18:38 (CET)
  name.didier.david:ndd-test4j:0.3.5            26 Sep 2014 at 19:30 (CEST)
  name.didier.david:ndd-test4j:0.3.4            26 Jun 2014 at 10:33 (CEST)
  nl.jqno.equalsverifier:equalsverifier:1.4.1   18 Mar 2014 at 12:30 (CET)
  nl.jqno.equalsverifier:equalsverifier:1.4     27 Dec 2013 at 13:12 (CET)
  nl.jqno.equalsverifier:equalsverifier:1.3.1   09 Jun 2013 at 17:05 (CEST)
  nl.jqno.equalsverifier:equalsverifier:1.3     09 Jun 2013 at 15:54 (CEST)
  nl.jqno.equalsverifier:equalsverifier:1.2     26 Mar 2013 at 19:15 (CET)
  nl.jqno.equalsverifier:equalsverifier:1.1.4   14 Jan 2013 at 16:27 (CET)
  nl.jqno.equalsverifier:equalsverifier:1.1.3   21 Apr 2012 at 15:00 (CEST)
  nl.jqno.equalsverifier:equalsverifier:1.1.2   01 Mar 2012 at 21:08 (CET)
  nl.jqno.equalsverifier:equalsverifier:1.1.1   21 Feb 2012 at 11:08 (CET)

The most recent result here is from 2020, and the most recent one that is actually from EqualsVerifier itself, is from 2014. I happen to know that the most recent version of EqualsVerifier is less than a day old at the time of writing 😉

Of course I don't know how the search is implemented and if this is even possible (or feasible), but it sure would be nice.

@mthmulders
Copy link
Owner

I happen to know that the most recent version of EqualsVerifier is less than a day old at the time of writing

And you are a very trustworthy source on this 👍🏻

On-topic: I was about to say this may be caused by the fact that mcs uses search.maven.org under the hood, and their sometimes lags behind a bit. But to my surprise, the second page of search results on their website does include more recent releases of EqualsVerifier. So that doesn't quite make sense....

I'll have a better look if their REST API allows for sorting. Of course, mcs could do it client-side, but that would mean it should fetch all pages from the server before sorting could take place. So that'd be quite a performance hit...

@jqno
Copy link
Author

jqno commented Mar 22, 2022

Hm, yeah, if you have to download everything and the sort it, that would probably not make sense. Let's hope search.maven.org has a sorting feature. Or perhaps the possibility to show only 1 version of each groupId/artifactId combination; that would also bring more relevant results to the top of the list, I suppose.

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