r110873 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110872‎ | r110873 | r110874 >
Date:21:12, 7 February 2012
Author:oren
Status:deferred
Tags:
Comment:
more changes to conform to Lucene 3.0 API
Modified paths:
  • /trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/ranks/Links.java (modified) (history)

Diff [purge]

Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/ranks/Links.java
@@ -546,7 +546,7 @@
547547 int sum = 0;
548548 for(Integer r : map.values())
549549 sum += r;
550 - // FIXME: numInLinks is document count, while anchors are counted in combined occurance/doc count form
 550+ // FIXME: numInLinks is document count, while anchors are counted in combined occurrence/doc count form
551551 map.put(Title.titleFromKey(key),numInLinks);
552552 if(!key.startsWith("0:"))
553553 map.put(Title.textualFromKey(key,iid),numInLinks);
@@ -789,10 +789,11 @@
790790 pq.add(new Term("links",key1));
791791 pq.add(new Term("links",key2));
792792 pq.setSlop(SplitAnalyzer.GROUP_GAP/2);
793 - return searcher.search(pq).length();
 793+ return searcher.search(pq,10).totalHits;
 794+
794795 }
795796
796 - /** return how many times article key1 and key2 co-occur in any article
 797+ /** return how many times article key1 and key2 cooccur in any article
797798 *
798799 * @param key1
799800 * @param key2

Status & tagging log