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

Sonatype Nexus using the nuget totalHits properly incorrectly #418

Open
steviecoaster opened this issue Jul 1, 2024 · 2 comments
Open
Assignees
Labels
triage Issues that need to be investigated, replicated

Comments

@steviecoaster
Copy link

steviecoaster commented Jul 1, 2024

This is in relation to testing using the Chocolatey GUI application.

The issue is that an incorrect value for the totalHits property is returned. This should always return all the packages on the server that match the search criteria that was used. However, Nexus seems to be returning exactly 1. As a result, Chocolatey GUI can't show the next/previous buttons for the feed, since it doesn't know how many pages of data there are.

For the totalHits query, it is really quite a simple query. We are doing the following:
https://localhost:8081/repository/testing/v3/query/beta?q=&skip=0&take=1&prerelease=false&semVerLevel=2.0.0

When you run this query against Nexus, you get the following response:

internal_nexus_totalhits

There are over 50 packages on that feed, and the totalHits should record the total number of packages that match the query, in this case, there is no search team, so it should return the total count of all packages on the feed.

If i do the same query against nuget.org, you can see that I get a totalHits of 304967:

totalhits_nuget org

And, another example using feedz.io, where it shows I have 53 hits:

feez io

As per the NuGet Search documentation, the important piece of information is this one:

totalhits_property_docs

It seems like Nexus is returning what we ask for in the take which is not correct

This occurs on Nexus version 3.51.0-01 and higher.

@yogurtjohn
Copy link

We are also experiencing this issue. It would be very helpful if this got resolved.

@mrprescott mrprescott added triage Issues that need to be investigated, replicated and removed pending labels Jul 9, 2024
@mrprescott
Copy link

Thanks for filing this, we're adding it to our triage to reproduce. I know there were some issues nailing this down way back when we built out our original NuGet v2 support for Nexus 3, so there may be a similar pattern occurring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issues that need to be investigated, replicated
Projects
None yet
Development

No branches or pull requests

4 participants