Skip to content

No working Search for static feeds #607

Closed

Description

@tmat

Hi! Thanks for reporting this feature/bug/question!

Please keep / fill in the relevant info from this template so that we can help you as best as possible.

Type (choose one):

  • Bug

NPE version: (e.g. 5.x) (see Help -> about)

5.0.132+f33e9c233d

OS version: (Windows 7, 10 - 1803/17134, etc)

Windows 10

Installed from: Microsoft Store

*Repro
Open feed https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json.

Enter Arcade into search box and hit enter.

After a while the package list refreshes but contains all packages, not just those that include "Arcade".

Activity

  1. clairernovotny commented on Jan 4, 2019

    @clairernovotny
    Member

    What happens in Visual Studio if you try the same?

    We're just using the NuGet search API and that relies on a server-side filter. I suspect that searching doesn't work on static feeds....

  2. tmat commented on Jan 4, 2019

    @tmat
    Author

    I see. Would it be possible to detect this case and do client side search?

  3. clairernovotny commented on Jan 4, 2019

    @clairernovotny
    Member

    I'm a bit hesitant to replicate search logic that NuGet has; we don't really know what kind of feed it is. If this replicates on VS, can you file a bug on the NuGet issue tracker?

  4. vatsan-madhavan commented on Jan 17, 2019

    @vatsan-madhavan

    I've been hitting this same problem and I wish we could have a temporary client-side workaround until Nuget fixes it.

  5. AdamYoblick commented on Jan 17, 2019

    @AdamYoblick

    +1

    search has never worked for us in the Nuget Package Explorer. :)

  6. vatsan-madhavan commented on Jul 10, 2019

    @vatsan-madhavan

    There is a related discussion here that could be of interest - emgarten/Sleet#79

    This doesn't work in Visual Studio either.

    Since it's possible to detect when a feed is a static + sleet feed, I'm wondering if it would be possible to turn on client-side searching for those types of feeds. Not sure if this is the most maintainable approach for solving this problem...

  7. changed the title [-]Search broken in dotnet-core feed[/-] [+]Search broken for static feed[/+] on Aug 3, 2019
  8. 304NotModified commented on Aug 3, 2019

    @304NotModified
    Collaborator

    the performance is also bad with static feeds (duh, paging wont work). (see also #747)

    @vatsan-madhavan what's a sleet feed? How should we detect is static? One thing is to do a search a see you get the same results, but that need at least 2 downloads

    edit: or maybe if we get more then 15 feeds if we request 15... ;)

  9. 304NotModified commented on Aug 3, 2019

    @304NotModified
    Collaborator

    edit: or maybe if we get more then 15 feeds if we request 15... ;)

    working on this

  10. changed the title [-]Search broken for static feed[/-] [+]No working Search for static feeds[/+] on Aug 3, 2019
  11. 304NotModified commented on Aug 3, 2019

    @304NotModified
    Collaborator

    For the search the ordering is also important.

    Does anyone know a good algorithm?

    I think we should at least search on these fields: Title, Description, Tags.

    (Maybe also the summary?)

    A first simple approach could be:

    full match title: 50,
    found in title: 20, found in description: 10, found in tags: 5. Summarize and order.

  12. 304NotModified commented on Aug 3, 2019

    @304NotModified
    Collaborator

    FYI, I have the basics working. Need some refactoring and details for the search & ordering. Will try to finalize it upcoming week.

  13. clairernovotny commented on Aug 3, 2019

    @clairernovotny
    Member

    Awesome. I'll get a new release out now and update with this when you have it.

  14. loic-sharma commented on Aug 3, 2019

    @loic-sharma

    @304NotModified Hey, I'm a developer from the team that runs nuget.org. We're currently working on improving our search on top of Azure Search. Here's an info dump on how we rank results using Azure Search. Note that this stuff may change drastically as we continue to iterate :)

    Index Definition
    The PackageId field contains the name of a package, like "Newtonsoft.Json". This field has a weight of 2 and is used to boost package results whose "id" exactly match the search query.

    The TokenizedPackageId field also contains the name of a package. We split this field's tokens on non-alphanumeric characters and case changes to support finer grain matches. This field has a weight of 5.

    The DownloadScore field is derived from a package's download count:

    DownloadScore = sqrt(package's download count) / 220
    

    For example, the package "Newtonsoft.Json" has 255 million downloads, resulting in a DownloadScore of ~72.6. Download scores range from [0-100) as the most downloaded package has less than 500 million downloads.

    This field is used in a magnitude scoring function with linear interpolation and a boost of 3000. This scoring function increases quickly at first, and then becomes approximately linear near the upper bound of download counts. In other words, packages get a strong boost from additional downloads, but this effect tapers. We may revisit this scoring function to include favor recent downloads.

    Azure Search query generation
    We've improved our results by favoring results that match all terms in the inputted query. Given the following input query:

    entity framework

    We will generate the following Azure Search query using Lucene query syntax:

    entity framework (+entity +framework)^3

    References

  15. clairernovotny commented on Aug 3, 2019

    @clairernovotny
    Member

    @loic-sharma thanks for the details!

    Are there any plans to do any of this client-side in the NuGet libraries to make static feeds searchable in Visual Studio?

  16. loic-sharma commented on Aug 3, 2019

    @loic-sharma

    The client team is considering a dotnet search command that needs a similar feature (you have to rank results from multiple feeds). I’m not sure when/how they’ll tackle this.

  17. clairernovotny commented on Aug 3, 2019

    @clairernovotny
    Member

    @loic-sharma is there an issue to follow for that?

  18. loic-sharma commented on Aug 4, 2019

    @loic-sharma

    I can’t seem to find an issue tracking this... we had an early design meeting on this. I’ll ask the client team on Monday.

  19. 304NotModified commented on Aug 5, 2019

    @304NotModified
    Collaborator

    @loic-sharma really thanks for sharing in detail!
    Do I understand it correctly that the search isn't searching in the summary/description? Or do I missed something?

  20. loic-sharma commented on Aug 5, 2019

    @loic-sharma

    Those fields are indeed searchable (see this and this), but they are unweighted. Sorry for the confusion :)

  21. 304NotModified commented on Aug 5, 2019

    @304NotModified
    Collaborator

    unweighted means weight=1, isn't? So summary and description has the same weight?

    I also think longer search term match should weight more, eg.

    ab -> weight 1
    abcdef -> weight 3
    
  22. loic-sharma commented on Aug 5, 2019

    @loic-sharma

    unweighted means weight=1, isn't? So summary and description has the same weight?

    Yup, that's correct.

    I also think longer search term match should weight more, eg.

    Term length is likely an interesting factor. Generally, search rankings score off term frequency (if ab is a common term it produces a lower score than a less common term like abcdef). For example: core is common in package names, but mvc is not. Term length would give you the opposite effect here.

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions