lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject svn commit: r1542013 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/build.xml lucene/site/ lucene/site/xsl/index.xsl
Date Thu, 14 Nov 2013 18:51:25 GMT
Author: sarowe
Date: Thu Nov 14 18:51:25 2013
New Revision: 1542013

URL: http://svn.apache.org/r1542013
Log:
LUCENE-5341: automate default codec package extraction for use in the generated Lucene documentation's
link to the index file format documentation (merged trunk r1542012)

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/build.xml   (contents, props changed)
    lucene/dev/branches/branch_4x/lucene/site/   (props changed)
    lucene/dev/branches/branch_4x/lucene/site/xsl/index.xsl

Modified: lucene/dev/branches/branch_4x/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/build.xml?rev=1542013&r1=1542012&r2=1542013&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/build.xml (original)
+++ lucene/dev/branches/branch_4x/lucene/build.xml Thu Nov 14 18:51:25 2013
@@ -274,6 +274,24 @@
     <makeurl property="process-webpages.buildfiles" separator="|">
       <fileset dir="." includes="**/build.xml" excludes="build.xml,analysis/*,build/**,tools/**,backwards/**,site/**"/>
     </makeurl>
+    <property name="Codec.java" location="core/src/java/org/apache/lucene/codecs/Codec.java"/>
+    <loadfile srcfile="${Codec.java}" property="defaultCodecPackage">
+      <filterchain>
+        <tokenfilter>
+          <filetokenizer/>
+          <scriptfilter language="groovy">
+            <classpath>
+              <path refid="groovy.classpath"/>
+            </classpath><![CDATA[
+            //                   private static Codec defaultCodec   =   Codec    .   forName
   (   "Lucene46"   )   ;
+            defaultCodecMatcher = self.getToken() =~ /defaultCodec\s*=\s*Codec\s*\.\s*forName\s*\(\s*"([^"]+)"\s*\)\s*;/
+            self.setToken(defaultCodecMatcher[0][1].toLowerCase());
+            ]]>
+          </scriptfilter>
+        </tokenfilter>
+      </filterchain>
+    </loadfile>
+
     <!--
       The XSL input file is ignored completely, but XSL expects one to be given,
       so we pass ourself (${ant.file}) here. The list of module build.xmls is given
@@ -286,6 +304,7 @@
       <outputproperty name="indent" value="yes"/>
       <param name="buildfiles" expression="${process-webpages.buildfiles}"/>
       <param name="version" expression="${version}"/>
+      <param name="defaultCodecPackage" expression="${defaultCodecPackage}"/>
     </xslt>
     
     <pegdown todir="${javadoc.dir}">

Modified: lucene/dev/branches/branch_4x/lucene/site/xsl/index.xsl
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/site/xsl/index.xsl?rev=1542013&r1=1542012&r2=1542013&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/site/xsl/index.xsl (original)
+++ lucene/dev/branches/branch_4x/lucene/site/xsl/index.xsl Thu Nov 14 18:51:25 2013
@@ -22,6 +22,7 @@
 >
   <xsl:param name="buildfiles"/>
   <xsl:param name="version"/>
+  <xsl:param name="defaultCodecPackage"/>
   
   <!--
     NOTE: This template matches the root element of any given input XML document!
@@ -75,7 +76,7 @@
             <li><a href="SYSTEM_REQUIREMENTS.html">System Requirements</a>:
Minimum and supported Java versions.</li>
             <li><a href="MIGRATE.html">Migration Guide</a>: What changed
in Lucene 4; how to migrate code from Lucene 3.x.</li>
             <li><a href="JRE_VERSION_MIGRATION.html">JRE Version Migration</a>:
Information about upgrading between major JRE versions.</li>
-            <li><a href="core/org/apache/lucene/codecs/lucene45/package-summary.html#package_description">File
Formats</a>: Guide to the supported index format used by Lucene.  This can be customized
by using <a href="core/org/apache/lucene/codecs/package-summary.html#package_description">an
alternate codec</a>.</li>
+            <li><a href="core/org/apache/lucene/codecs/{$defaultCodecPackage}/package-summary.html#package_description">File
Formats</a>: Guide to the supported index format used by Lucene.  This can be customized
by using <a href="core/org/apache/lucene/codecs/package-summary.html#package_description">an
alternate codec</a>.</li>
             <li><a href="core/org/apache/lucene/search/package-summary.html#package_description">Search
and Scoring in Lucene</a>: Introduction to how Lucene scores documents.</li>
             <li><a href="core/org/apache/lucene/search/similarities/TFIDFSimilarity.html">Classic
Scoring Formula</a>: Formula of Lucene's classic <a href="http://en.wikipedia.org/wiki/Vector_Space_Model">Vector
Space</a> implementation. (look <a href="core/org/apache/lucene/search/similarities/package-summary.html#package_description">here</a>
for other models)</li>
             <li><a href="queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description">Classic
QueryParser Syntax</a>: Overview of the Classic QueryParser's syntax and features.</li>



Mime
View raw message