Manybubbles has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/81115


Change subject: Stop double counting redirects.
......................................................................

Stop double counting redirects.

Since redirects are already listed in the pagelinks table we don't need
to count them separately.

Change-Id: I6790d026a58fd1cb8fa3fe0a536777cb7f6a91ec
---
M CirrusSearchUpdater.php
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/15/81115/1

diff --git a/CirrusSearchUpdater.php b/CirrusSearchUpdater.php
index 5555a4e..096457a 100644
--- a/CirrusSearchUpdater.php
+++ b/CirrusSearchUpdater.php
@@ -104,11 +104,10 @@
                                        'title' => $redirect->getText()
                                );
                        }
-                       // Count redirects as links and links to those 
redirects as links.
+                       // Count links to redirects
                        // Note that we don't count redirect to redirects here 
because that seems a bit much.
                        $redirectBacklinkCache = new Backlinkcache( $redirect );
                        $redirectLinks += $redirectBacklinkCache->getNumLinks( 
'pagelinks' );
-                       $links += 1;
                }
 
                $doc = new \Elastica\Document( $revision->getPage(), array(

-- 
To view, visit https://gerrit.wikimedia.org/r/81115
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6790d026a58fd1cb8fa3fe0a536777cb7f6a91ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to