You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2013/11/14 19:46:09 UTC
svn commit: r1542012 - in /lucene/dev/trunk/lucene: build.xml
site/xsl/index.xsl
Author: sarowe
Date: Thu Nov 14 18:46:09 2013
New Revision: 1542012
URL: http://svn.apache.org/r1542012
Log:
LUCENE-5341: automate default codec package extraction for use in the generated Lucene documentation's link to the index file format documentation
Modified:
lucene/dev/trunk/lucene/build.xml
lucene/dev/trunk/lucene/site/xsl/index.xsl
Modified: lucene/dev/trunk/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/build.xml?rev=1542012&r1=1542011&r2=1542012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/build.xml (original)
+++ lucene/dev/trunk/lucene/build.xml Thu Nov 14 18:46:09 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/trunk/lucene/site/xsl/index.xsl
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/site/xsl/index.xsl?rev=1542012&r1=1542011&r2=1542012&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/site/xsl/index.xsl (original)
+++ lucene/dev/trunk/lucene/site/xsl/index.xsl Thu Nov 14 18:46:09 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>