r108958 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108957‎ | r108958 | r108959 >
Date:05:37, 15 January 2012
Author:oren
Status:ok
Tags:
Comment:
documentation improvements
Modified paths:
  • /trunk/lucene-search-2/src/org/wikimedia/lsearch/config/GlobalConfiguration.java (modified) (history)
  • /trunk/lucene-search-2/src/org/wikimedia/lsearch/config/package.html (modified) (history)

Diff [purge]

Index: trunk/lucene-search-2/src/org/wikimedia/lsearch/config/GlobalConfiguration.java
@@ -8,14 +8,11 @@
99 import java.io.ByteArrayInputStream;
1010 import java.io.IOException;
1111 import java.io.InputStreamReader;
12 -import java.io.StringReader;
1312 import java.net.Inet4Address;
1413 import java.net.InetAddress;
1514 import java.net.MalformedURLException;
16 -import java.net.NetworkInterface;
1715 import java.net.URL;
1816 import java.net.UnknownHostException;
19 -import java.text.MessageFormat;
2017 import java.util.ArrayList;
2118 import java.util.Collection;
2219 import java.util.Collections;
@@ -23,15 +20,13 @@
2421 import java.util.HashMap;
2522 import java.util.HashSet;
2623 import java.util.Hashtable;
27 -import java.util.Iterator;
 24+import java.util.Map.Entry;
2825 import java.util.Properties;
2926 import java.util.Set;
30 -import java.util.Map.Entry;
3127 import java.util.regex.Matcher;
3228 import java.util.regex.Pattern;
3329
3430 import org.apache.lucene.search.ArticleNamespaceScaling;
35 -import org.apache.lucene.search.ArticleScaling;
3631 import org.wikimedia.lsearch.config.IndexId.AgeScaling;
3732 import org.wikimedia.lsearch.search.NamespaceFilter;
3833 import org.wikimedia.lsearch.util.Localization;
@@ -1269,7 +1264,7 @@
12701265 * @return lowercased db type
12711266 */
12721267 protected String getMainDBType(String dbname){
1273 - Enumeration e = ((Hashtable)database.get(dbname)).keys();
 1268+ Enumeration<String> e = database.get(dbname).keys();
12741269 while(e.hasMoreElements()){
12751270 String type = (String)e.nextElement();
12761271 if(type.equals("single") || type.equals("mainsplit") || type.equals("split"))
@@ -1369,7 +1364,7 @@
13701365 return namespacePrefixAll;
13711366 }
13721367
1373 - /** Check wether dbname has some of the suffixes */
 1368+ /** Check if dbname has some of the suffixes */
13741369 protected boolean checkSuffix(String[] suffixes, String dbname){
13751370 if(suffixes == null)
13761371 return false;
@@ -1391,7 +1386,7 @@
13921387 * the suffixes from the global configuration
13931388 *
13941389 * @param dbname
1395 - * @return
 1390+ * @return if keyword scoring should be used
13961391 */
13971392 public boolean useKeywordScoring(String dbname){
13981393 return checkSuffix(keywordScoringSuffixes,dbname);
@@ -1401,7 +1396,7 @@
14021397 * If this dbname is assigned an exact-case additional index.
14031398 *
14041399 * @param dbname
1405 - * @return
 1400+ * @return if this dbname is assigned an additional exact-case index
14061401 */
14071402 public boolean exactCaseIndex(String dbname){
14081403 return checkSuffix(exactCaseSuffix,dbname);
Index: trunk/lucene-search-2/src/org/wikimedia/lsearch/config/package.html
@@ -20,7 +20,6 @@
2121 <li>&lt;basedir&gt;/snapshot/&lt;iid&gt;/&lt;timestamp&gt; - clean snapshots of the index (on indexer hosts)
2222 <li>&lt;basedir&gt;/update/&lt;iid&gt;/&lt;timestamp&gt; - local copy of index snapshot (on searcher hosts)
2323 <li>&lt;basedir&gt;/search/&lt;iid&gt; - symlink to latest index update (on searcher hosts)
24 - </ul>
25 -<li>
 24+ </ul>
2625 </ul>
2726 </body></html>
\ No newline at end of file

Status & tagging log