Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Package: added dist_version field
Added the field 'dist_version' to hold the version parsed of
the file value (dist, author, ...).

This is needed as the entries hold the module version which
doesn't always match the distribution one.
  • Loading branch information
mickeyn committed May 11, 2017
1 parent 21eb7e1 commit 69bf4ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/MetaCPAN/Script/Mapping/CPAN/Package.pm
Expand Up @@ -17,6 +17,11 @@ sub mapping {
"index" : "not_analyzed",
"type" : "string"
},
"dist_version" : {
"ignore_above" : 2048,
"index" : "not_analyzed",
"type" : "string"
},
"author" : {
"ignore_above" : 2048,
"index" : "not_analyzed",
Expand Down
1 change: 1 addition & 0 deletions lib/MetaCPAN/Script/Package.pm
Expand Up @@ -63,6 +63,7 @@ sub index_packages {
file => $file,
author => $distinfo->cpanid,
distribution => $distinfo->dist,
dist_version => $distinfo->version,
};

$bulk_helper->update(
Expand Down

0 comments on commit 69bf4ee

Please sign in to comment.