You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2012/04/22 22:08:53 UTC

svn commit: r1328962 - in /lucene/dev/trunk: dev-tools/scripts/ lucene/analysis/common/src/java/org/apache/lucene/analysis/commongrams/ lucene/benchmark/src/java/org/apache/lucene/benchmark/quality/ lucene/core/src/java/org/apache/lucene/index/ lucene/...

Author: mikemccand
Date: Sun Apr 22 20:08:53 2012
New Revision: 1328962

URL: http://svn.apache.org/viewvc?rev=1328962&view=rev
Log:
improve broken link checker; fix some broken links

Modified:
    lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py
    lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/commongrams/CommonGramsFilter.java
    lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/quality/package.html
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
    lucene/dev/trunk/lucene/misc/src/java/org/apache/lucene/store/NativeUnixDirectory.java
    lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
    lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java
    lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj

Modified: lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py?rev=1328962&r1=1328961&r2=1328962&view=diff
==============================================================================
--- lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py (original)
+++ lucene/dev/trunk/dev-tools/scripts/checkJavadocLinks.py Sun Apr 22 20:08:53 2012
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 import traceback
 import os
 import sys
@@ -62,6 +77,7 @@ class FindHyperlinks(HTMLParser):
       self.printed = True
                    
 def parse(baseURL, html):
+  global failures
   parser = FindHyperlinks(baseURL)
   try:
     parser.feed(html)
@@ -70,17 +86,22 @@ def parse(baseURL, html):
     parser.printFile()
     print '  WARNING: failed to parse:'
     traceback.print_exc()
+    failures = True
     return [], []
   
   #print '    %d links, %d anchors' % \
   #      (len(parser.links), len(parser.anchors))
   return parser.links, parser.anchors
 
+failures = False
+
 def checkAll(dirName):
   """
   Checks *.html (recursively) under this directory.
   """
 
+  global failures
+
   # Find/parse all HTML files first
   print
   print 'Crawl/parse...'
@@ -150,6 +171,13 @@ def checkAll(dirName):
           print
           print fullPath
         print '  BROKEN ANCHOR: %s' % origLink
+
+    failures = failures or printed
+    
+  if failures:
+    sys.exit(1)
+  else:
+    sys.exit(0)
         
 if __name__ == '__main__':
   checkAll(sys.argv[1])

Modified: lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/commongrams/CommonGramsFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/commongrams/CommonGramsFilter.java?rev=1328962&r1=1328961&r2=1328962&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/commongrams/CommonGramsFilter.java (original)
+++ lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/commongrams/CommonGramsFilter.java Sun Apr 22 20:08:53 2012
@@ -44,7 +44,7 @@ import org.apache.lucene.util.Version;
  */
 public final class CommonGramsFilter extends TokenFilter {
 
-  static final String GRAM_TYPE = "gram";
+  public static final String GRAM_TYPE = "gram";
   private static final char SEPARATOR = '_';
 
   private final CharArraySet commonWords;

Modified: lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/quality/package.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/quality/package.html?rev=1328962&r1=1328961&r2=1328962&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/quality/package.html (original)
+++ lucene/dev/trunk/lucene/benchmark/src/java/org/apache/lucene/benchmark/quality/package.html Sun Apr 22 20:08:53 2012
@@ -23,7 +23,7 @@ This package allows to benchmark search 
 <p>
 In order to use this package you should provide:
 <ul>
-  <li>A <a href="../../search/Searcher.html">searcher</a>.</li>
+  <li>A <a href="{@docRoot}/../core/org/apache/lucene/search/IndexSearcher.html">IndexSearcher</a>.</li>
   <li><a href="QualityQuery.html">Quality queries</a>.</li>
   <li><a href="Judge.html">Judging object</a>.</li>
   <li><a href="utils/SubmissionReport.html">Reporting object</a>.</li>

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java?rev=1328962&r1=1328961&r2=1328962&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java Sun Apr 22 20:08:53 2012
@@ -397,7 +397,7 @@ public abstract class DirectoryReader ex
    *
    * <p>If instead this reader is a near real-time reader
    * (ie, obtained by a call to {@link
-   * IndexWriter#getReader}, or by calling {@link #openIfChanged}
+   * IndexReader#open(IndexWriter,boolean)}, or by calling {@link #openIfChanged}
    * on a near real-time reader), then this method checks if
    * either a new commmit has occurred, or any new
    * uncommitted changes have taken place via the writer.

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java?rev=1328962&r1=1328961&r2=1328962&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java Sun Apr 22 20:08:53 2012
@@ -2517,7 +2517,7 @@ public class IndexWriter implements Clos
   /** Commits all changes to the index, specifying a
    *  commitUserData Map (String -> String).  This just
    *  calls {@link #prepareCommit(Map)} (if you didn't
-   *  already call it) and then {@link #finishCommit}.
+   *  already call it) and then {@link #commit}.
    *
    * <p><b>NOTE</b>: if this method hits an OutOfMemoryError
    * you should immediately close the writer.  See <a
@@ -3719,13 +3719,14 @@ public class IndexWriter implements Clos
     directory.makeLock(IndexWriter.WRITE_LOCK_NAME).release();
   }
 
-  /** If {@link #getReader} has been called (ie, this writer
-   *  is in near real-time mode), then after a merge
-   *  completes, this class can be invoked to warm the
-   *  reader on the newly merged segment, before the merge
-   *  commits.  This is not required for near real-time
-   *  search, but will reduce search latency on opening a
-   *  new near real-time reader after a merge completes.
+  /** If {@link IndexReader#open(IndexWriter,boolean)} has
+   *  been called (ie, this writer is in near real-time
+   *  mode), then after a merge completes, this class can be
+   *  invoked to warm the reader on the newly merged
+   *  segment, before the merge commits.  This is not
+   *  required for near real-time search, but will reduce
+   *  search latency on opening a new near real-time reader
+   *  after a merge completes.
    *
    * @lucene.experimental
    *

Modified: lucene/dev/trunk/lucene/misc/src/java/org/apache/lucene/store/NativeUnixDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/misc/src/java/org/apache/lucene/store/NativeUnixDirectory.java?rev=1328962&r1=1328961&r2=1328962&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/misc/src/java/org/apache/lucene/store/NativeUnixDirectory.java (original)
+++ lucene/dev/trunk/lucene/misc/src/java/org/apache/lucene/store/NativeUnixDirectory.java Sun Apr 22 20:08:53 2012
@@ -43,7 +43,7 @@ import org.apache.lucene.store.IOContext
  * to the provided Directory instance.
  *
  * <p>See <a
- * href="../../../../../contrib-misc/overview-summary.html#NativeUnixDirectory">Overview</a>
+ * href="{@docRoot}/overview-summary.html#NativeUnixDirectory">Overview</a>
  * for more details.
  *
  * <p>To use this you must compile

Modified: lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java?rev=1328962&r1=1328961&r2=1328962&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java (original)
+++ lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java Sun Apr 22 20:08:53 2012
@@ -88,7 +88,7 @@ public abstract class QueryParserBase {
   }
 
   /** Initializes a query parser.  Called by the QueryParser constructor
-   *  @param matchVersion  Lucene version to match. See <a href="#version">above</a>.
+   *  @param matchVersion  Lucene version to match. See <a href="QueryParser#version">here</a>.
    *  @param f  the default field for query terms.
    *  @param a   used to find terms in the query text.
    */

Modified: lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java?rev=1328962&r1=1328961&r2=1328962&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java (original)
+++ lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.java Sun Apr 22 20:08:53 2012
@@ -20,7 +20,7 @@ import org.apache.lucene.queryparser.sur
 
 /**
  * This class is generated by JavaCC.  The only method that clients should need
- * to call is <a href="#parse">parse()</a>.
+ * to call is {@link #parse}.
  */
 
 public class QueryParser implements QueryParserConstants {

Modified: lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj?rev=1328962&r1=1328961&r2=1328962&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj (original)
+++ lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParser.jj Sun Apr 22 20:08:53 2012
@@ -49,7 +49,7 @@ import org.apache.lucene.queryparser.sur
 
 /**
  * This class is generated by JavaCC.  The only method that clients should need
- * to call is <a href="#parse">parse()</a>.
+ * to call is {@link #parse}.
  */
 
 public class QueryParser {