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

Query to endpoint /package returns sometimes version property with string value of undef #1136

Open
jackdeguest opened this issue Sep 20, 2023 · 0 comments

Comments

@jackdeguest
Copy link

When issuing a query to the endpoint /v1/package?q=HTTP, this returns some results, including one set for the package (for example), Test::HTTP::Syntax, or Protocol::HTTP::Message, or Protocol::HTTP::Request whose dataset property version has a string value, in JSON, of undef. I think this was meant to be null so that it translates in Perl as undef.

Below is the JSON output:

{
   "hits" : {
      "hits" : [
         {
            "_score" : 2.6572695,
            "_type" : "package",
            "_index" : "cpan_v1_01",
            "_source" : {
               "version" : "0.22",
               "file" : "M/MM/MML/Test-HTTP/Test-HTTP-0.22.tar.gz",
               "author" : "MML",
               "distribution" : "Test-HTTP",
               "dist_version" : "0.22",
               "module_name" : "Test::HTTP"
            },
            "_id" : "Test::HTTP"
         },
         {
            "_source" : {
               "module_name" : "HTTP::AnyUA::Backend::HTTP::AnyUA",
               "distribution" : "HTTP-AnyUA",
               "dist_version" : "0.904",
               "file" : "C/CC/CCM/HTTP-AnyUA-0.904.tar.gz",
               "author" : "CCM",
               "version" : "0.904"
            },
            "_type" : "package",
            "_index" : "cpan_v1_01",
            "_score" : 2.3152514,
            "_id" : "HTTP::AnyUA::Backend::HTTP::AnyUA"
         },
         {
            "_id" : "HTTP::AnyUA::Backend::AnyEvent::HTTP",
            "_score" : 2.301661,
            "_source" : {
               "author" : "CCM",
               "file" : "C/CC/CCM/HTTP-AnyUA-0.904.tar.gz",
               "version" : "0.904",
               "distribution" : "HTTP-AnyUA",
               "dist_version" : "0.904",
               "module_name" : "HTTP::AnyUA::Backend::AnyEvent::HTTP"
            },
            "_index" : "cpan_v1_01",
            "_type" : "package"
         },
         {
            "_id" : "HTTP::AnyUA::Backend::HTTP::Tiny",
            "_type" : "package",
            "_index" : "cpan_v1_01",
            "_source" : {
               "module_name" : "HTTP::AnyUA::Backend::HTTP::Tiny",
               "distribution" : "HTTP-AnyUA",
               "dist_version" : "0.904",
               "file" : "C/CC/CCM/HTTP-AnyUA-0.904.tar.gz",
               "version" : "0.904",
               "author" : "CCM"
            },
            "_score" : 2.301661
         },
         {
            "_score" : 2.301661,
            "_source" : {
               "module_name" : "Test::HTTP::Syntax",
               "distribution" : "Test-HTTP",
               "dist_version" : "0.22",
               "file" : "M/MM/MML/Test-HTTP/Test-HTTP-0.22.tar.gz",
               "version" : "undef",
               "author" : "MML"
            },
            "_type" : "package",
            "_index" : "cpan_v1_01",
            "_id" : "Test::HTTP::Syntax"
         },
         {
            "_score" : 2.3012629,
            "_source" : {
               "version" : "1.023",
               "author" : "AKALINUX",
               "file" : "A/AK/AKALINUX/HTTP-MultiGet-1.023.tar.gz",
               "distribution" : "HTTP-MultiGet",
               "dist_version" : "1.023",
               "module_name" : "HTTP::MultiGet"
            },
            "_type" : "package",
            "_index" : "cpan_v1_01",
            "_id" : "HTTP::MultiGet"
         },
         {
            "_id" : "HTTP::MultiGet::Role",
            "_source" : {
               "author" : "AKALINUX",
               "version" : "undef",
               "file" : "A/AK/AKALINUX/HTTP-MultiGet-1.023.tar.gz",
               "dist_version" : "1.023",
               "distribution" : "HTTP-MultiGet",
               "module_name" : "HTTP::MultiGet::Role"
            },
            "_index" : "cpan_v1_01",
            "_type" : "package",
            "_score" : 2.3012629
         },
         {
            "_id" : "Protocol::HTTP",
            "_index" : "cpan_v1_01",
            "_type" : "package",
            "_source" : {
               "module_name" : "Protocol::HTTP",
               "author" : "SYBER",
               "file" : "S/SY/SYBER/Protocol-HTTP-1.1.5.tar.gz",
               "version" : "1.001005",
               "dist_version" : "1.1.5",
               "distribution" : "Protocol-HTTP"
            },
            "_score" : 2.3012629
         },
         {
            "_id" : "Protocol::HTTP::Message",
            "_type" : "package",
            "_index" : "cpan_v1_01",
            "_source" : {
               "file" : "S/SY/SYBER/Protocol-HTTP-1.1.5.tar.gz",
               "version" : "undef",
               "author" : "SYBER",
               "dist_version" : "1.1.5",
               "distribution" : "Protocol-HTTP",
               "module_name" : "Protocol::HTTP::Message"
            },
            "_score" : 2.3012629
         },
         {
            "_id" : "Protocol::HTTP::Request",
            "_source" : {
               "distribution" : "Protocol-HTTP",
               "dist_version" : "1.1.5",
               "file" : "S/SY/SYBER/Protocol-HTTP-1.1.5.tar.gz",
               "author" : "SYBER",
               "version" : "undef",
               "module_name" : "Protocol::HTTP::Request"
            },
            "_type" : "package",
            "_index" : "cpan_v1_01",
            "_score" : 2.3012629
         }
      ],
      "max_score" : 2.6572695,
      "total" : 1671
   },
   "_shards" : {
      "failed" : 0,
      "total" : 3,
      "successful" : 3
   },
   "timed_out" : false,
   "took" : 6
}
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

1 participant