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

Add advanced search filters #2636

Closed
VPashkov opened this issue Aug 18, 2015 · 11 comments
Closed

Add advanced search filters #2636

VPashkov opened this issue Aug 18, 2015 · 11 comments

Comments

@VPashkov
Copy link

When user searching for a package at nuget.org the results sorted by relevance.
It would be nice to have an option to sort result by popularity and upload date.
For example chocolatey.org have that option. There is a "Sort By" dropdown on search results page with Relevance, Popularity, A-Z and Recent options.

@ghost
Copy link

ghost commented Sep 2, 2015

I would like to work on this issue if no one else is working in it.

@maartenba
Copy link
Contributor

@HBrock Word of warning: it's not a trivial fix. It is for database-related gallery, but for NuGet.org it's not. We are calling into the search service - more specifically https://github.com/NuGet/NuGet.Services.Metadata/blob/master/src/NuGet.Indexing/GalleryServiceImpl.cs, which currently does not support sorting.

We are working on a transition to the V3 search service (the one VS2015 also uses - https://github.com/NuGet/NuGet.Services.Metadata/blob/master/src/NuGet.Indexing/ServiceImpl.cs), which would be a great prerequisite to have before venturing on supporting sorts in the gallery.

Both search service implementations currently do not have sorting built in. The Lucene framework does support sorting when running a query, so the best starting point would probably be in https://github.com/NuGet/NuGet.Services.Metadata.

@ghost
Copy link

ghost commented Sep 2, 2015

Maybe I should start with a smaller task first

@maartenba
Copy link
Contributor

That would be most welcome!

@skofman1
Copy link
Contributor

@SQL-MisterMagoo wrote in #4124:

Possible filters/sorts would be :
Dependencies
Last updated
Author
License
Download total
Downloads in last 90 days
Prerelease flag
Tags
Basically any information you have decided would be useful to show me on the package view would potentially be useful in a search

@anangaur anangaur added the Feature suggestion DevCom Suggestion label Jun 13, 2019
@anangaur
Copy link
Member

@Jericho
Copy link

Jericho commented Aug 29, 2019

+1 for this feature.

In my scenario I use the API to find packages with a name containing a certain keyword and a simple alphabetical sort would be perfect because it’s predictable and consistent. I don’t care about “relevance” because it’s not predictable and a package might change position in a subsequent search. Again, in my scenario predictability and consistency are more important than “relevance”.

@snickler
Copy link

I would love a sorting feature. I personally would love to see options for version sorting simply on the results, regardless of the Id. For instance, if I want to sort by latest version - I want to see all packages returned sorted by the latest version of that package.

Something - v3.0.1
Something.Extensions v3.0.0
Something.Interfaces v3.0.0
Blah.Unrelated v2.5

@joelverhagen
Copy link
Member

Mentioned by @donnie-msft on #7992:

Is your feature request related to a problem? Please describe.

NuGet Client request to allow sorting on the Browse tab will require Server changes as well.

Describe the solution you'd like

What changes would be necessary on Server to handle such a feature? Perhaps it should be limited to a single source?

Additional context

NuGet/Home#2585

Mentioned by @loic-sharma on #7992 (comment):

What changes would be necessary on Server to handle such a feature?

Cost-wise, it seems this feature would be similar to the package type filter feature. We would need to update:

  1. The protocol to declare whether the server supports sort ordering
  2. The search API to request different sort orders
  3. The search index to support ordering on the desired fields

We should figure out the sortable fields we'd like as some are easier than others. For example, it was suggested here that we support sorting by number of dependents. This information isn't in search today and would need to be added. In case you're interested, you can find the search index definition here. I would suggest we start with easy things like sort by "relevance", "downloads", "newest package", and "latest updated".

Perhaps it should be limited to a single source?

Could you explain this a little bit more?

How would the client handle two sources, one which supports ordering and another that does not?

Mentioned by @joelverhagen on #7992 (comment)

This has been a long time ask from customers. The pre-existing issue is here: #2636. It reads as specific to nuget.org but the implementation would have to go as deep as the search service and therefore be low hanging fruit for V3 API addition.

Let's merge this issue into the existing one and include the information mentioned here. It's clearer for users if there's a single issue to upvote and provide comments on. It's really one feature, which multiple stages/entry points.

When we implement it for nuget.org, we will consider both how it works on the website as well as how it is shaped in the V3 API (which PM UI would call).

Regarding the sorting, if you can detect that all sources support sorting (perhaps a new search @type in the service index), you can merge the results on client side, assuming the sort key is in the result set.

@loic-sharma loic-sharma added this to the Sprint 170 - 2020.05.04 milestone May 19, 2020
@loic-sharma loic-sharma changed the title Allow user to choose sorting method on search results page Add search sorting May 20, 2020
@loic-sharma loic-sharma removed this from the Sprint 170 - 2020.05.04 milestone May 20, 2020
@loic-sharma loic-sharma changed the title Add search sorting Add advanced search filters Jun 10, 2020
@shishirx34 shishirx34 added this to the Sprint 172 - 2020.06.15 milestone Jun 12, 2020
@michael-hawker
Copy link

+1 for having author/owner as additional search criterion. License could also be useful for folks.

@skofman1
Copy link
Contributor

Closing since we release the feature. If there are ideas for additional improvements, please open a new issue.

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

No branches or pull requests