choco icon indicating copy to clipboard operation
choco copied to clipboard

Explain search by tags behavior

Open jirkapok opened this issue 7 years ago • 3 comments

Steps to reproduce

Having following command line chat with chocolatey 0.10.9:

PS> choco list git
60 packages found.
PS> choco list git --by-tag-only msysgit
0 packages found.
PS> choco list --by-tag-only git msysgit
0 packages found.
PS> choco list --by-tag-only msysgit git
msysgit 1.7.10.20120526 [Approved]
1 packages found.
PS> choco list --by-tag-only msysgit
5 packages found.

In this example there are multiple packages which fit to search by name "git" and also multiple packages from this list contain both tags "git msysgit" in chocolatey.org (official public) source.

  • See also https://github.com/chocolatey/choco/wiki/CommandsList
  • Documentation doesn't mention how to use the filter nor examples

What is the expected behavior?

Use cases:

  • If both name and tag is provided, does it mean choco returns packages which fit NAME AND TAG?
  • If tag only is provided should it return all packages with that tag?
  • How to provide multiple tags, what is the separator?
  • If multiple tags are provided:
    • does the order meter?
    • choco returns only packages where OR or AND operator is applied for all tags?

jirkapok avatar Apr 19 '18 10:04 jirkapok

@jirkapok based on the source code here:

https://github.com/chocolatey/choco/blob/0c11effebeadbd6bec1d1a16206942aef4204446/src/chocolatey/infrastructure.app/nuget/NugetList.cs#L82

And the fact that the Tags collection would each separate tag, it doesn't look like providing multiple tags in the search criteria is supported. I agree that this needs to be clearly documented though.

There are still some discrepancies in the results that are returned though, so perhaps some other work is required here.

gep13 avatar Apr 19 '18 10:04 gep13

Is there an update on this.. We are also having issues when we tag our own packages, with multiple tags, we can only search for the first tag in the list, which is rather useless for us.

Claustn avatar Oct 03 '18 12:10 Claustn

Related request to #1484

TheCakeIsNaOH avatar Jul 30 '22 01:07 TheCakeIsNaOH