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

Search does not work at all #43

Open
pali opened this issue Apr 18, 2018 · 1 comment
Open

Search does not work at all #43

pali opened this issue Apr 18, 2018 · 1 comment

Comments

@pali
Copy link

pali commented Apr 18, 2018

https://grep.metacpan.org/search?q=db2ANSI

Result for query db2ANSI is:

found 3 distributions and 6 files matching your query !

with output:

 DBD-drizzle 1 match - lib/DBD/drizzle.pm

Which contradict information itself. How can be there just one matched file, if there there was found 3 distributions and 6 files?

Also I'm sure that there are lot of other matches in different packages with above query. Therefore search does not work at all.

And JSON API gives me same wrong result:

$ curl -s -X GET 'https://grep.metacpan.org/api/search?q=db2ANSI&qd=&qft=' | json_xs
{
   "time_elapsed" : 0.51662,
   "is_a_known_distro" : 0,
   "version" : "1.00-cache-1.03-grep-7fa205e-cpan-68326bef5dd",
   "results" : [
      {
         "files" : [
            "lib/DBD/drizzle.pm"
         ],
         "distro" : "DBD-drizzle",
         "prefix" : "distros/D/DBD-drizzle",
         "matches" : [
            {
               "file" : "lib/DBD/drizzle.pm",
               "blocks" : [
                  {
                     "matchlines" : [
                        189
                     ],
                     "start_at" : "184",
                     "code" : "\npackage DBD::drizzle::db; # ====== DATABASE ======\nuse strict;\nuse DBI qw(:sql_types);\n\n%DBD::drizzle::db::db2ANSI = (\"INT\"   =>  \"INTEGER\",\n\t\t\t   \"CHAR\"  =>  \"CHAR\",\n\t\t\t   \"REAL\"  =>  \"REAL\",\n\t\t\t   \"IDENT\" =>  \"DECIMAL\"\n                          );\n\n"
                  }
               ]
            }
         ]
      }
   ],
   "search_in_progress" : 0,
   "is_incomplete" : 0,
   "match" : {
      "distros" : "3",
      "files" : "6"
   }
}

There are "distros" : "3", "files" : "6" and just one result.

@atoomic
Copy link
Member

atoomic commented May 24, 2018

thanks for reporting this, there is obviously something fundamentally wrong there, this needs investigation

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

2 participants