On Thu, May 17, 2012 at 2:02 AM, Kent Fredric <kentfred...@gmail.com> wrote: > On 13 May 2012 07:43, Torsten Veller <t...@gentoo.org> wrote: >> * Corentin Chary <corentin.ch...@gmail.com>: >>> On Sat, Apr 21, 2012 at 03:33:18PM +1200, Kent Fredric wrote: >>> > { "term": { "status":"latest"} }, >>> > { "term": { >>> > "module.authorized":"true"}} >> >> What does this mean? >> - "latest"? this term looks like maintenance work. >> - what is "authorized"? > > "latest" means that it will fetch metadata for whatever is deemed the > most recent non-dev release, which is really the only sane option to > go for if you want a list of modules that currently pertain to the > distribution. You could request *all* releases and then find a union > of elements ... but that would be both erroneous and very time > consuming. > >> It doesn't even list "Moose" for Moose? > > Its probably falling outside the initial 10 results, I forgot it did that, > >> 02packages.details.txt.gz lists 72 package names for Moose-2.0602. >> > > Need to bolt on a { "size": 100 } to the query to expand how may > results it will return.
Updated remotesid.py to use that, correctly add Moose in the diff now ! > curl -XPOST 'http://api.metacpan.org/module/_search' -d ' > { > "fields": [ > "module.name", > "release" > ], > "query": { > "constant_score": { > "filter" : { > "and" : [ > { "term": { "distribution":"Moose" } }, > { "term": { "status":"latest"} }, > { "term": { > "mime":"text/x-script.perl-module"}}, > { "term": { "indexed":"true"}}, > { "term": { "module.authorized":"true"}} > ] > > } > } > }, > "size": 100 > } > > ^ that | grep module.name | wc -l # 83 > > -- > Kent > > perl -e "print substr( \"edrgmaM SPA NOcomil.ic\\@tfrken\", \$_ * 3, > 3 ) for ( 9,8,0,7,1,6,5,4,3,2 );" > > http://kent-fredric.fox.geek.nz >