[Bps-public-commit] cpan2rt branch, deploy, updated. deployed-14-g27e9eb7

Thomas Sibley trs at bestpractical.com
Sat Apr 20 02:55:13 EDT 2013


The branch, deploy has been updated
       via  27e9eb74e3c2af6f44bb0ee796378cc85f02f010 (commit)
      from  2380b5a1a31bf52da3bced2146df9078895c3f68 (commit)

Summary of changes:
 lib/CPAN2RT.pm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 27e9eb74e3c2af6f44bb0ee796378cc85f02f010
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Apr 19 23:41:08 2013 -0700

    Filter out dists with bugtrackers pointing to rt.cpan.org on the MetaCPAN API side
    
    This greatly reduces the number of results we have to fetch over the
    wire.  Note that releases with a non-rt.cpan.org mailto address and an
    rt.cpan.org web address are intentionally still be returned.
    
    In testing, 5min is more than enough time to process the scrolled set
    even with the added query complexity.

diff --git a/lib/CPAN2RT.pm b/lib/CPAN2RT.pm
index a5ccd61..e941409 100644
--- a/lib/CPAN2RT.pm
+++ b/lib/CPAN2RT.pm
@@ -334,15 +334,24 @@ sub _sync_bugtracker_cpan2rt {
         query       => { match_all => {} },
         size        => 100,
         search_type => 'scan',
-        scroll      => '5m', # XXX TODO: check that 5m is a long enough time!
+        scroll      => '5m',
         index       => 'v0',
         type        => 'release',
         fields  => [ "distribution" , "resources.bugtracker" ],
         filter  => {
             and => [{
                 or => [
-                    { exists => { field => "resources.bugtracker.mailto" }},
-                    { exists => { field => "resources.bugtracker.web" }},
+                    {
+                        and => [
+                            { exists => { field => "resources.bugtracker.mailto" }},
+                            { not    => { query => { wildcard => { "resources.bugtracker.mailto" => '*rt.cpan.org*' }}}},
+                        ],
+                    },{
+                        and => [
+                            { exists => { field => "resources.bugtracker.web" }},
+                            { not    => { query => { wildcard => { "resources.bugtracker.web" => '*://rt.cpan.org*' }}}},
+                        ],
+                    }
                 ]},
                 { term => { "release.status"   => "latest" }},
                 { term => { "release.maturity" => "released" }},

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list