Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/ranks/Links.java |
— | — | @@ -546,7 +546,7 @@ |
547 | 547 | int sum = 0; |
548 | 548 | for(Integer r : map.values()) |
549 | 549 | 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 |
551 | 551 | map.put(Title.titleFromKey(key),numInLinks); |
552 | 552 | if(!key.startsWith("0:")) |
553 | 553 | map.put(Title.textualFromKey(key,iid),numInLinks); |
— | — | @@ -789,10 +789,11 @@ |
790 | 790 | pq.add(new Term("links",key1)); |
791 | 791 | pq.add(new Term("links",key2)); |
792 | 792 | pq.setSlop(SplitAnalyzer.GROUP_GAP/2); |
793 | | - return searcher.search(pq).length(); |
| 793 | + return searcher.search(pq,10).totalHits; |
| 794 | + |
794 | 795 | } |
795 | 796 | |
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 |
797 | 798 | * |
798 | 799 | * @param key1 |
799 | 800 | * @param key2 |