LUCENE-5341: automate default codec package extraction for use in the generated Lucene documentation's link to the index file format documentation

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1542012 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Steven Rowe 2013-11-14 18:46:09 +00:00
parent e135619391
commit 0629d8b4a2
2 changed files with 21 additions and 1 deletions

View File

@ -274,6 +274,24 @@
<makeurl property="process-webpages.buildfiles" separator="|"> <makeurl property="process-webpages.buildfiles" separator="|">
<fileset dir="." includes="**/build.xml" excludes="build.xml,analysis/*,build/**,tools/**,backwards/**,site/**"/> <fileset dir="." includes="**/build.xml" excludes="build.xml,analysis/*,build/**,tools/**,backwards/**,site/**"/>
</makeurl> </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, 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 so we pass ourself (${ant.file}) here. The list of module build.xmls is given
@ -286,6 +304,7 @@
<outputproperty name="indent" value="yes"/> <outputproperty name="indent" value="yes"/>
<param name="buildfiles" expression="${process-webpages.buildfiles}"/> <param name="buildfiles" expression="${process-webpages.buildfiles}"/>
<param name="version" expression="${version}"/> <param name="version" expression="${version}"/>
<param name="defaultCodecPackage" expression="${defaultCodecPackage}"/>
</xslt> </xslt>
<pegdown todir="${javadoc.dir}"> <pegdown todir="${javadoc.dir}">

View File

@ -22,6 +22,7 @@
> >
<xsl:param name="buildfiles"/> <xsl:param name="buildfiles"/>
<xsl:param name="version"/> <xsl:param name="version"/>
<xsl:param name="defaultCodecPackage"/>
<!-- <!--
NOTE: This template matches the root element of any given input XML document! 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="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="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="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/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="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> <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>