You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ko...@apache.org on 2011/02/06 00:52:43 UTC
svn commit: r1067552 - in /lucene/dev/branches/branch_3x: ./
dev-tools/prettify/ lucene/
lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/
lucene/contrib/queries/src/java/org/apache/lucene/search/similar/
lucene/contrib/spat...
Author: koji
Date: Sat Feb 5 23:52:42 2011
New Revision: 1067552
URL: http://svn.apache.org/viewvc?rev=1067552&view=rev
Log:
LUCENE-2894: Use google-code-prettify for syntax highlighting in javadocs
Added:
lucene/dev/branches/branch_3x/dev-tools/prettify/
- copied from r1067551, lucene/dev/trunk/dev-tools/prettify/
lucene/dev/branches/branch_3x/dev-tools/prettify/lang-apollo.js
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/lang-apollo.js
lucene/dev/branches/branch_3x/dev-tools/prettify/lang-css.js
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/lang-css.js
lucene/dev/branches/branch_3x/dev-tools/prettify/lang-hs.js
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/lang-hs.js
lucene/dev/branches/branch_3x/dev-tools/prettify/lang-lisp.js
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/lang-lisp.js
lucene/dev/branches/branch_3x/dev-tools/prettify/lang-lua.js
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/lang-lua.js
lucene/dev/branches/branch_3x/dev-tools/prettify/lang-ml.js
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/lang-ml.js
lucene/dev/branches/branch_3x/dev-tools/prettify/lang-proto.js
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/lang-proto.js
lucene/dev/branches/branch_3x/dev-tools/prettify/lang-sql.js
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/lang-sql.js
lucene/dev/branches/branch_3x/dev-tools/prettify/lang-vb.js
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/lang-vb.js
lucene/dev/branches/branch_3x/dev-tools/prettify/lang-wiki.js
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/lang-wiki.js
lucene/dev/branches/branch_3x/dev-tools/prettify/prettify.css
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/prettify.css
lucene/dev/branches/branch_3x/dev-tools/prettify/prettify.js
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/prettify.js
lucene/dev/branches/branch_3x/dev-tools/prettify/stylesheet+prettify.css
- copied unchanged from r1067551, lucene/dev/trunk/dev-tools/prettify/stylesheet+prettify.css
Modified:
lucene/dev/branches/branch_3x/ (props changed)
lucene/dev/branches/branch_3x/lucene/ (props changed)
lucene/dev/branches/branch_3x/lucene/CHANGES.txt
lucene/dev/branches/branch_3x/lucene/NOTICE.txt
lucene/dev/branches/branch_3x/lucene/common-build.xml
lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html
lucene/dev/branches/branch_3x/lucene/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java
lucene/dev/branches/branch_3x/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashUtils.java
lucene/dev/branches/branch_3x/lucene/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java
lucene/dev/branches/branch_3x/lucene/src/java/overview.html
lucene/dev/branches/branch_3x/solr/ (props changed)
lucene/dev/branches/branch_3x/solr/NOTICE.txt
lucene/dev/branches/branch_3x/solr/build.xml
lucene/dev/branches/branch_3x/solr/common-build.xml
lucene/dev/branches/branch_3x/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/ClusteringComponent.java
lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java
lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java
lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/handler/component/TermsComponent.java
lucene/dev/branches/branch_3x/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
Modified: lucene/dev/branches/branch_3x/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/CHANGES.txt?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/branch_3x/lucene/CHANGES.txt Sat Feb 5 23:52:42 2011
@@ -691,6 +691,9 @@ Documentation
* LUCENE-2625: Add a note to IndexReader.termDocs() with additional verbiage
that the TermEnum must be seeked since it is unpositioned.
(Adriano Crestani via Robert Muir)
+
+* LUCENE-2894: Use google-code-prettify for syntax highlighting in javadoc.
+ (Koji Sekiguchi)
================== Release 2.9.4 / 3.0.3 2010-12-03 ====================
Modified: lucene/dev/branches/branch_3x/lucene/NOTICE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/NOTICE.txt?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/NOTICE.txt (original)
+++ lucene/dev/branches/branch_3x/lucene/NOTICE.txt Sat Feb 5 23:52:42 2011
@@ -64,3 +64,6 @@ The class org.apache.lucene.SorterTempla
the same name. The implementation part is mainly done using pre-existing
Lucene sorting code. In-place stable mergesort was borrowed from CGLIB,
which is Apache-licensed.
+
+The Google Code Prettify is Apache License 2.0.
+See http://code.google.com/p/google-code-prettify/
Modified: lucene/dev/branches/branch_3x/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/common-build.xml?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/common-build.xml (original)
+++ lucene/dev/branches/branch_3x/lucene/common-build.xml Sat Feb 5 23:52:42 2011
@@ -25,6 +25,9 @@
<dirname file="${ant.file.common}" property="common.dir"/>
+ <property name="dev-tools.dir" value="../dev-tools"/>
+ <property name="prettify.dir" value="${dev-tools.dir}/prettify"/>
+
<!-- Give user a chance to override without editing this file
(and without typing -D each time it compiles it -->
<property file="${user.home}/lucene.build.properties"/>
@@ -701,6 +704,9 @@
<attribute name="destdir"/>
<attribute name="title" default="${Name} ${version} API"/>
<sequential>
+ <copy todir="@{destdir}/../prettify" overwrite="false">
+ <fileset dir="${prettify.dir}"/>
+ </copy>
<javadoc
overview="${src.dir}/overview.html"
packagenames="org.apache.lucene.*"
@@ -716,6 +722,7 @@
link="${javadoc.link}"
windowtitle="${Name} ${version} API"
doctitle="@{title}"
+ stylesheetfile="@{destdir}/../prettify/stylesheet+prettify.css"
maxmemory="${javadoc.maxmemory}"
bottom="Copyright &copy; ${year} Apache Software Foundation. All Rights Reserved.">
<tag name="lucene.experimental"
@@ -723,6 +730,10 @@
<tag name="lucene.internal"
description="NOTE: This API is for Lucene internal purposes only and might change in incompatible ways in the next release."/>
<link offline="true" packagelistLoc="${javadoc.dir}"/>
+ <header><![CDATA[
+ <script src="{@docRoot}/../prettify/prettify.js" type="text/javascript"></script>
+ <script language="JavaScript">window.onload=function(){windowTitle();prettyPrint();}</script>
+ ]]></header>
<sources />
Modified: lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/highlighter/src/java/org/apache/lucene/search/vectorhighlight/package.html Sat Feb 5 23:52:42 2011
@@ -66,7 +66,7 @@ sample text.</p>
<h3>Step 1.</h3>
<p>In Step 1, Fast Vector Highlighter generates {@link org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap} from the user query.
<code>QueryPhraseMap</code> consists of the following members:</p>
-<pre>
+<pre class="prettyprint">
public class QueryPhraseMap {
boolean terminal;
int slop; // valid if terminal == true and phraseHighlight == true
Modified: lucene/dev/branches/branch_3x/lucene/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/queries/src/java/org/apache/lucene/search/similar/MoreLikeThis.java Sat Feb 5 23:52:42 2011
@@ -93,20 +93,20 @@ import org.apache.lucene.util.Version;
* if you want pseudo code, the simplest possible usage is as follows. The bold
* fragment is specific to this class.
*
- * <code><pre>
+ * <pre class="prettyprint">
*
* IndexReader ir = ...
* IndexSearcher is = ...
- * <b>
+ *
* MoreLikeThis mlt = new MoreLikeThis(ir);
- * Reader target = ... </b><em>// orig source of doc you want to find similarities to</em><b>
+ * Reader target = ... // orig source of doc you want to find similarities to
* Query query = mlt.like( target);
- * </b>
+ *
* Hits hits = is.search(query);
- * <em>// now the usual iteration thru 'hits' - the only thing to watch for is to make sure
- * you ignore the doc if it matches your 'target' document, as it should be similar to itself </em>
+ * // now the usual iteration thru 'hits' - the only thing to watch for is to make sure
+ * //you ignore the doc if it matches your 'target' document, as it should be similar to itself
*
- * </pre></code>
+ * </pre>
*
* Thus you:
* <ol>
Modified: lucene/dev/branches/branch_3x/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashUtils.java?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashUtils.java (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/geohash/GeoHashUtils.java Sat Feb 5 23:52:42 2011
@@ -22,7 +22,7 @@ import java.util.Map;
/**
* Utilities for encoding and decoding geohashes. Based on
- * http://en.wikipedia.org/wiki/Geohash.
+ * <a href="http://en.wikipedia.org/wiki/Geohash">http://en.wikipedia.org/wiki/Geohash</a>.
*/
public class GeoHashUtils {
Modified: lucene/dev/branches/branch_3x/lucene/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/wordnet/src/java/org/apache/lucene/wordnet/SynonymMap.java Sat Feb 5 23:52:42 2011
@@ -52,15 +52,17 @@ import java.util.TreeSet;
* high-frequency lookups of medium size synonym tables.
* <p>
* Example Usage:
- * <pre>
+ * <pre class="prettyprint">
* String[] words = new String[] { "hard", "woods", "forest", "wolfish", "xxxx"};
* SynonymMap map = new SynonymMap(new FileInputStream("samples/fulltext/wn_s.pl"));
* for (int i = 0; i < words.length; i++) {
* String[] synonyms = map.getSynonyms(words[i]);
* System.out.println(words[i] + ":" + java.util.Arrays.asList(synonyms).toString());
* }
- *
+ * </pre>
+ * <b/>
* Example output:
+ * <pre class="prettyprint">
* hard:[arduous, backbreaking, difficult, fermented, firmly, grueling, gruelling, heavily, heavy, intemperately, knockout, laborious, punishing, severe, severely, strong, toilsome, tough]
* woods:[forest, wood]
* forest:[afforest, timber, timberland, wood, woodland, woods]
Modified: lucene/dev/branches/branch_3x/lucene/src/java/overview.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/java/overview.html?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/src/java/overview.html (original)
+++ lucene/dev/branches/branch_3x/lucene/src/java/overview.html Sat Feb 5 23:52:42 2011
@@ -45,48 +45,36 @@ to check if the results are what we expe
<!-- = Java Sourcecode to HTML automatically converted code = -->
<!-- = Java2Html Converter 5.0 [2006-03-04] by Markus Gebhard markus@jave.de = -->
<!-- = Further information: http://www.java2html.de = -->
-<div align="left" class="java">
-<table border="0" cellpadding="3" cellspacing="0" bgcolor="#ffffff">
- <tr>
- <!-- start source code -->
- <td nowrap="nowrap" valign="top" align="left">
- <code>
-<font color="#ffffff"> </font><font color="#000000">Analyzer analyzer = </font><font color="#7f0055"><b>new </b></font><font color="#000000">StandardAnalyzer</font><font color="#000000">(</font><font color="#000000">Version.LUCENE_CURRENT</font><font color="#000000">)</font><font color="#000000">;</font><br />
-<font color="#ffffff"></font><br />
-<font color="#ffffff"> </font><font color="#3f7f5f">// Store the index in memory:</font><br />
-<font color="#ffffff"> </font><font color="#000000">Directory directory = </font><font color="#7f0055"><b>new </b></font><font color="#000000">RAMDirectory</font><font color="#000000">()</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><font color="#3f7f5f">// To store an index on disk, use this instead:</font><br />
-<font color="#ffffff"> </font><font color="#3f7f5f">//Directory directory = FSDirectory.open("/tmp/testindex");</font><br />
-<font color="#ffffff"> </font><font color="#000000">IndexWriter iwriter = </font><font color="#7f0055"><b>new </b></font><font color="#000000">IndexWriter</font><font color="#000000">(</font><font color="#000000">directory, analyzer, true,</font><br />
-<font color="#ffffff"> </font><font color="#7f0055"><b>new </b></font><font color="#000000">IndexWriter.MaxFieldLength</font><font color="#000000">(</font><font color="#990000">25000</font><font color="#000000">))</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><font color="#000000">Document doc = </font><font color="#7f0055"><b>new </b></font><font color="#000000">Document</font><font color="#000000">()</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><font color="#000000">String text = </font><font color="#2a00ff">"This is the text to be indexed."</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><font color="#000000">doc.add</font><font color="#000000">(</font><font color="#7f0055"><b>new </b></font><font color="#000000">Field</font><font color="#000000">(</font><font color="#2a00ff">"fieldname"</font><font color="#000000">, text, Field.Store.YES,</font><br />
-<font color="#ffffff"> </font><font color="#000000">Field.Index.ANALYZED</font><font color="#000000">))</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><font color="#000000">iwriter.addDocument</font><font color="#000000">(</font><font color="#000000">doc</font><font color="#000000">)</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><font color="#000000">iwriter.close</font><font color="#000000">()</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><br />
-<font color="#ffffff"> </font><font color="#3f7f5f">// Now search the index:</font><br />
-<font color="#ffffff"> </font><font color="#000000">IndexSearcher isearcher = </font><font color="#7f0055"><b>new </b></font><font color="#000000">IndexSearcher</font><font color="#000000">(</font><font color="#000000">directory, </font><font color="#7f0055"><b>true</b></font><font color="#000000">)</font><font color="#000000">; </font><font color="#3f7f5f">// read-only=true</font><br />
-<font color="#ffffff"> </font><font color="#3f7f5f">// Parse a simple query that searches for "text":</font><br />
-<font color="#ffffff"> </font><font color="#000000">QueryParser parser = </font><font color="#7f0055"><b>new </b></font><font color="#000000">QueryParser</font><font color="#000000">(</font><font color="#2a00ff">"fieldname"</font><font color="#000000">, analyzer</font><font color="#000000">)</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><font color="#000000">Query query = parser.parse</font><font color="#000000">(</font><font color="#2a00ff">"text"</font><font color="#000000">)</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><font color="#000000">ScoreDoc</font><font color="#000000">[] </font><font color="#000000">hits = isearcher.search</font><font color="#000000">(</font><font color="#000000">query, null, </font><font color="#990000">1000</font><font color="#000000">)</font><font color="#000000">.scoreDocs;</font><br />
-<font color="#ffffff"> </font><font color="#000000">assertEquals</font><font color="#000000">(</font><font color="#990000">1</font><font color="#000000">, hits.length</font><font color="#000000">)</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><font color="#3f7f5f">// Iterate through the results:</font><br />
-<font color="#ffffff"> </font><font color="#7f0055"><b>for </b></font><font color="#000000">(</font><font color="#7f0055"><b>int </b></font><font color="#000000">i = </font><font color="#990000">0</font><font color="#000000">; i < hits.length; i++</font><font color="#000000">) {</font><br />
-<font color="#ffffff"> </font><font color="#000000">Document hitDoc = isearcher.doc</font><font color="#000000">(</font><font color="#000000">hits</font><font color="#000000">[</font><font color="#000000">i</font><font color="#000000">]</font><font color="#000000">.doc</font><font color="#000000">)</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><font color="#000000">assertEquals</font><font color="#000000">(</font><font color="#2a00ff">"This is the text to be indexed."</font><font color="#000000">, hitDoc.get</font><font color="#000000">(</font><font color="#2a00ff">"fieldname"</font><font color="#000000">))</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><font color="#000000">}</font><br />
-<font color="#ffffff"> </font><font color="#000000">isearcher.close</font><font color="#000000">()</font><font color="#000000">;</font><br />
-<font color="#ffffff"> </font><font color="#000000">directory.close</font><font color="#000000">()</font><font color="#000000">;</font></code>
-
- </td>
- <!-- end source code -->
- </tr>
+<pre class="prettyprint">
+ Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_CURRENT);
-</table>
-</div>
+ // Store the index in memory:
+ Directory directory = new RAMDirectory();
+ // To store an index on disk, use this instead:
+ //Directory directory = FSDirectory.open("/tmp/testindex");
+ IndexWriter iwriter = new IndexWriter(directory, analyzer, true,
+ new IndexWriter.MaxFieldLength(25000));
+ Document doc = new Document();
+ String text = "This is the text to be indexed.";
+ doc.add(new Field("fieldname", text, Field.Store.YES,
+ Field.Index.ANALYZED));
+ iwriter.addDocument(doc);
+ iwriter.close();
+
+ // Now search the index:
+ IndexSearcher isearcher = new IndexSearcher(directory, true); // read-only=true
+ // Parse a simple query that searches for "text":
+ QueryParser parser = new QueryParser("fieldname", analyzer);
+ Query query = parser.parse("text");
+ ScoreDoc[] hits = isearcher.search(query, null, 1000).scoreDocs;
+ assertEquals(1, hits.length);
+ // Iterate through the results:
+ for (int i = 0; i < hits.length; i++) {
+ Document hitDoc = isearcher.doc(hits[i].doc);
+ assertEquals("This is the text to be indexed.", hitDoc.get("fieldname"));
+ }
+ isearcher.close();
+ directory.close();</pre>
<!-- = END of automatically generated HTML code = -->
<!-- ======================================================== -->
Modified: lucene/dev/branches/branch_3x/solr/NOTICE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/NOTICE.txt?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/NOTICE.txt (original)
+++ lucene/dev/branches/branch_3x/solr/NOTICE.txt Sat Feb 5 23:52:42 2011
@@ -156,7 +156,6 @@ This product includes software developed
See http://project.carrot2.org/
-
=========================================================================
== Guava Notice ==
=========================================================================
@@ -168,6 +167,16 @@ This product includes software developed
See http://code.google.com/p/guava-libraries/
=========================================================================
+== Prettify Notice ==
+=========================================================================
+
+Copyright ???? Google, Inc.
+
+This product includes software developed by the Google Prettify project.
+
+See http://code.google.com/p/google-code-prettify/
+
+=========================================================================
== Jackson Notice ==
=========================================================================
Copyright ????
Modified: lucene/dev/branches/branch_3x/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/build.xml?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/build.xml (original)
+++ lucene/dev/branches/branch_3x/solr/build.xml Sat Feb 5 23:52:42 2011
@@ -18,6 +18,8 @@
-->
<project name="solr" default="usage" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">
+
+ <property name="solr-path" value="." />
<import file="common-build.xml"/>
Modified: lucene/dev/branches/branch_3x/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/common-build.xml?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/common-build.xml (original)
+++ lucene/dev/branches/branch_3x/solr/common-build.xml Sat Feb 5 23:52:42 2011
@@ -33,6 +33,9 @@
<property name="name" value="${ant.project.name}"/>
+ <property name="dev-tools.dir" value="${solr-path}/../dev-tools"/>
+ <property name="prettify.dir" value="${dev-tools.dir}/prettify"/>
+
<tstamp>
<format property="year" pattern="yyyy"/>
<format property="DSTAMP" pattern="yyyy-MM-dd"/>
@@ -342,6 +345,9 @@
<attribute name="destdir"/>
<attribute name="title" default="${Name} ${version} API (${specversion})"/>
<sequential>
+ <copy todir="@{destdir}/../prettify" overwrite="false">
+ <fileset dir="${prettify.dir}"/>
+ </copy>
<javadoc
packagenames="org.apache.solr.*"
failonerror="true"
@@ -355,6 +361,7 @@
link="${javadoc.link.java}"
windowtitle="${Name} ${version} API"
doctitle="@{title}"
+ stylesheetfile="@{destdir}/../prettify/stylesheet+prettify.css"
bottom="Copyright &copy; ${year} Apache Software Foundation. All Rights Reserved.">
<tag name="todo" description="To Do:"/>
<tag name="uml.property" description="UML Property:"/>
@@ -366,6 +373,10 @@
<link href="${javadoc.link.java}"/>
<link href="${javadoc.link.junit}"/>
<link href="${javadoc.link.lucene}"/>
+ <header><![CDATA[
+ <script src="{@docRoot}/../prettify/prettify.js" type="text/javascript"></script>
+ <script language="JavaScript">window.onload=function(){windowTitle();prettyPrint();}</script>
+ ]]></header>
<sources />
Modified: lucene/dev/branches/branch_3x/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/ClusteringComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/ClusteringComponent.java?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/ClusteringComponent.java (original)
+++ lucene/dev/branches/branch_3x/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/ClusteringComponent.java Sat Feb 5 23:52:42 2011
@@ -46,6 +46,13 @@ import java.util.Set;
* <p/>
* This engine is experimental. Output from this engine is subject to change in future releases.
*
+ * <pre class="prettyprint" >
+ * <searchComponent class="org.apache.solr.handler.clustering.ClusteringComponent" name="clustering">
+ * <lst name="engine">
+ * <str name="name">default</str>
+ * <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
+ * </lst>
+ * </searchComponent></pre>
*/
public class ClusteringComponent extends SearchComponent implements SolrCoreAware {
private transient static Logger log = LoggerFactory.getLogger(ClusteringComponent.class);
Modified: lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java (original)
+++ lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/analysis/StopFilterFactory.java Sat Feb 5 23:52:42 2011
@@ -29,6 +29,15 @@ import java.util.Set;
import java.io.IOException;
/**
+ * Factory for {@link StopFilter}.
+ * <pre class="prettyprint" >
+ * <fieldType name="text_stop" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
+ * <analyzer>
+ * <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+ * <filter class="solr.StopFilterFactory" ignoreCase="true"
+ * words="stopwords.txt" enablePositionIncrements="true"/>
+ * </analyzer>
+ * </fieldType></pre>
* @version $Id$
*/
public class StopFilterFactory extends BaseTokenFilterFactory implements ResourceLoaderAware {
Modified: lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java (original)
+++ lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java Sat Feb 5 23:52:42 2011
@@ -58,6 +58,20 @@ import java.util.Map;
* term, frequency, position, offset, IDF.
* <p/>
* <b>Note</b> Returning IDF can be expensive.
+ *
+ * <pre class="prettyprint">
+ * <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
+ *
+ * <requestHandler name="/terms" class="solr.SearchHandler">
+ * <lst name="defaults">
+ * <bool name="tv">true</bool>
+ * </lst>
+ * <arr name="last-component">
+ * <str>tvComponent</str>
+ * </arr>
+ * </requestHandler></pre>
+ *
+ * @version $Id$
*/
public class TermVectorComponent extends SearchComponent implements SolrCoreAware {
Modified: lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/handler/component/TermsComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/handler/component/TermsComponent.java?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/handler/component/TermsComponent.java (original)
+++ lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/handler/component/TermsComponent.java Sat Feb 5 23:52:42 2011
@@ -41,9 +41,22 @@ import java.util.regex.Pattern;
/**
* Return TermEnum information, useful for things like auto suggest.
+ *
+ * <pre class="prettyprint">
+ * <searchComponent name="termsComponent" class="solr.TermsComponent"/>
+ *
+ * <requestHandler name="/terms" class="solr.SearchHandler">
+ * <lst name="defaults">
+ * <bool name="terms">true</bool>
+ * </lst>
+ * <arr name="components">
+ * <str>termsComponent</str>
+ * </arr>
+ * </requestHandler></pre>
*
* @see org.apache.solr.common.params.TermsParams
* See Lucene's TermEnum class
+ * @version $Id$
*/
public class TermsComponent extends SearchComponent {
public static final int UNLIMITED_MAX_COUNT = -1;
Modified: lucene/dev/branches/branch_3x/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java?rev=1067552&r1=1067551&r2=1067552&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java (original)
+++ lucene/dev/branches/branch_3x/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java Sat Feb 5 23:52:42 2011
@@ -61,6 +61,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
+ * The {@link CommonsHttpSolrServer} uses the Apache Commons HTTP Client to connect to solr.
+ * <pre class="prettyprint" >SolrServer server = new CommonsHttpSolrServer( url );</pre>
*
* @version $Id$
* @since solr 1.3