1 |
On Thu, May 17, 2012 at 2:02 AM, Kent Fredric <kentfredric@×××××.com> wrote: |
2 |
> On 13 May 2012 07:43, Torsten Veller <tove@g.o> wrote: |
3 |
>> * Corentin Chary <corentin.chary@×××××.com>: |
4 |
>>> On Sat, Apr 21, 2012 at 03:33:18PM +1200, Kent Fredric wrote: |
5 |
>>> > { "term": { "status":"latest"} }, |
6 |
>>> > { "term": { "module.authorized":"true"}} |
7 |
>> |
8 |
>> What does this mean? |
9 |
>> - "latest"? this term looks like maintenance work. |
10 |
>> - what is "authorized"? |
11 |
> |
12 |
> "latest" means that it will fetch metadata for whatever is deemed the |
13 |
> most recent non-dev release, which is really the only sane option to |
14 |
> go for if you want a list of modules that currently pertain to the |
15 |
> distribution. You could request *all* releases and then find a union |
16 |
> of elements ... but that would be both erroneous and very time |
17 |
> consuming. |
18 |
> |
19 |
>> It doesn't even list "Moose" for Moose? |
20 |
> |
21 |
> Its probably falling outside the initial 10 results, I forgot it did that, |
22 |
> |
23 |
>> 02packages.details.txt.gz lists 72 package names for Moose-2.0602. |
24 |
>> |
25 |
> |
26 |
> Need to bolt on a { "size": 100 } to the query to expand how may |
27 |
> results it will return. |
28 |
|
29 |
Updated remotesid.py to use that, correctly add Moose in the diff now ! |
30 |
|
31 |
> curl -XPOST 'http://api.metacpan.org/module/_search' -d ' |
32 |
> { |
33 |
> "fields": [ |
34 |
> "module.name", |
35 |
> "release" |
36 |
> ], |
37 |
> "query": { |
38 |
> "constant_score": { |
39 |
> "filter" : { |
40 |
> "and" : [ |
41 |
> { "term": { "distribution":"Moose" } }, |
42 |
> { "term": { "status":"latest"} }, |
43 |
> { "term": { |
44 |
> "mime":"text/x-script.perl-module"}}, |
45 |
> { "term": { "indexed":"true"}}, |
46 |
> { "term": { "module.authorized":"true"}} |
47 |
> ] |
48 |
> |
49 |
> } |
50 |
> } |
51 |
> }, |
52 |
> "size": 100 |
53 |
> } |
54 |
> |
55 |
> ^ that | grep module.name | wc -l # 83 |
56 |
> |
57 |
> -- |
58 |
> Kent |
59 |
> |
60 |
> perl -e "print substr( \"edrgmaM SPA NOcomil.ic\\@tfrken\", \$_ * 3, |
61 |
> 3 ) for ( 9,8,0,7,1,6,5,4,3,2 );" |
62 |
> |
63 |
> http://kent-fredric.fox.geek.nz |
64 |
> |