Gentoo Archives: gentoo-dev

From: Kent Fredric <kentfredric@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: RFC: Add new remote-id types in metadata.dtd
Date: Thu, 17 May 2012 00:04:08
Message-Id: CAATnKFB8kxzMrNyyEET14P9zUKqSAZ+5X10tzMO6Txd9nB0fXA@mail.gmail.com
In Reply to: [gentoo-dev] Re: RFC: Add new remote-id types in metadata.dtd by Torsten Veller
On 13 May 2012 07:43, Torsten Veller <tove@g.o> wrote:
> * Corentin Chary <corentin.chary@×××××.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. 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

Replies

Subject Author
Re: [gentoo-dev] Re: RFC: Add new remote-id types in metadata.dtd Corentin Chary <iksaif@g.o>