diff --git a/build.xml b/build.xml index b69babc3ae3..ed44a6ecd6f 100644 --- a/build.xml +++ b/build.xml @@ -25,7 +25,7 @@ + depends="check-svn-working-copy,validate,documentation-lint"/> @@ -47,16 +47,16 @@ - + - + - + @@ -305,7 +305,7 @@ - + @@ -325,11 +325,11 @@ description="Runs the nightly Maven build on Jenkins, including artifact deployment"/> - - - + + + - - + + diff --git a/lucene/build.xml b/lucene/build.xml index 05b28485e36..3a45c758587 100644 --- a/lucene/build.xml +++ b/lucene/build.xml @@ -225,7 +225,7 @@ - + diff --git a/lucene/site/xsl/index.xsl b/lucene/site/xsl/index.xsl index f0d2d904101..08352bcdb82 100644 --- a/lucene/site/xsl/index.xsl +++ b/lucene/site/xsl/index.xsl @@ -35,7 +35,7 @@ <xsl:text>Apache Lucene </xsl:text><xsl:value-of select="$version"/><xsl:text> Documentation</xsl:text> -
+
Lucene

Apache Lucene Documentation

Lucene is a Java full-text search engine. Lucene is not a complete application, but rather a code library and API that can easily be used to add search capabilities diff --git a/solr/README.txt b/solr/README.txt index f8c2c287aa9..8869318dd1b 100644 --- a/solr/README.txt +++ b/solr/README.txt @@ -31,7 +31,7 @@ Getting Started See the "example" directory for an example Solr setup. A tutorial using the example setup can be found at http://lucene.apache.org/solr/tutorial.html -or linked from "docs/api/index.html" in a binary distribution. +or linked from "docs/index.html" in a binary distribution. Also, there are Solr clients for many programming languages, see http://wiki.apache.org/solr/IntegratingSolr @@ -54,7 +54,7 @@ dist/apache-solr-XX.jar Apache Solr Plugins (see http://wiki.apache.org/solr/SolrPlugins for more information). -docs/api/index.html +docs/index.html The Apache Solr Javadoc API documentation and Tutorial diff --git a/solr/build.xml b/solr/build.xml index 8d1c5e2c5bb..a666bb208ab 100644 --- a/solr/build.xml +++ b/solr/build.xml @@ -26,7 +26,7 @@ - + @@ -138,9 +138,42 @@ + depends="javadocs-solr-core,javadocs-solrj,javadocs-test-framework,javadocs-contrib"/> + + + + + + + + + + + + + + + + + + + + + + + @@ -154,11 +187,6 @@ - - - - - @@ -430,7 +458,7 @@ dist/solrj-lib/* dist/test-framework/**" excludes="**/*.tgz **/*.zip **/*.md5 **/*src*.jar **/*docs*.jar **/*.sha1" /> - @@ -496,66 +524,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + diff --git a/solr/common-build.xml b/solr/common-build.xml index 25de5735eee..fa481282425 100644 --- a/solr/common-build.xml +++ b/solr/common-build.xml @@ -25,9 +25,6 @@ - - - @@ -37,16 +34,16 @@ - + - - - - + + + + @@ -200,22 +197,53 @@ - + - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + @@ -240,29 +268,26 @@ + - - - - - - - - - - - - - - - + + @@ -393,10 +418,15 @@ + + + + + diff --git a/solr/contrib/dataimporthandler-extras/build.xml b/solr/contrib/dataimporthandler-extras/build.xml index 3821c56174e..9ba37a5d281 100644 --- a/solr/contrib/dataimporthandler-extras/build.xml +++ b/solr/contrib/dataimporthandler-extras/build.xml @@ -65,6 +65,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ContextImpl.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ContextImpl.java index 19a37cdef6c..bc70136066b 100644 --- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ContextImpl.java +++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ContextImpl.java @@ -193,7 +193,7 @@ public class ContextImpl extends Context { } } - public void setDoc(DocBuilder.DocWrapper docWrapper) { + void setDoc(DocBuilder.DocWrapper docWrapper) { this.doc = docWrapper; } diff --git a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java index 96f3c462cd0..1f0049802d5 100644 --- a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java +++ b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/SolrUIMAConfiguration.java @@ -40,7 +40,7 @@ public class SolrUIMAConfiguration { private String logField; - public SolrUIMAConfiguration(String aePath, String[] fieldsToAnalyze, boolean fieldsMerging, + SolrUIMAConfiguration(String aePath, String[] fieldsToAnalyze, boolean fieldsMerging, Map> typesFeaturesFieldsMapping, Map runtimeParameters, boolean ignoreErrors, String logField) { this.aePath = aePath; @@ -60,7 +60,7 @@ public class SolrUIMAConfiguration { return fieldsMerging; } - public Map> getTypesFeaturesFieldsMapping() { + Map> getTypesFeaturesFieldsMapping() { return typesFeaturesFieldsMapping; } diff --git a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAToSolrMapper.java b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAToSolrMapper.java index 59bf196e1ac..4a4cd38c0a1 100644 --- a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAToSolrMapper.java +++ b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAToSolrMapper.java @@ -54,7 +54,7 @@ public class UIMAToSolrMapper { * @param typeName name of UIMA type to map * @param featureFieldsmapping */ - public void map(String typeName, Map featureFieldsmapping) throws FieldMappingException { + void map(String typeName, Map featureFieldsmapping) throws FieldMappingException { try { Type type = cas.getTypeSystem().getType(typeName); for (FSIterator iterator = cas.getFSIndexRepository().getAllIndexedFS(type); iterator diff --git a/solr/core/build.xml b/solr/core/build.xml index 3137cf3bdf0..bff9ead936b 100644 --- a/solr/core/build.xml +++ b/solr/core/build.xml @@ -25,5 +25,21 @@ + + + + + + + + + + + + + + + + diff --git a/solr/core/src/java/overview.html b/solr/core/src/java/overview.html index f73c36f9751..83f5070e3dc 100644 --- a/solr/core/src/java/overview.html +++ b/solr/core/src/java/overview.html @@ -16,6 +16,6 @@ --> -Apache Solr Search Server, new users should familiarize themselves with the Solr Tutorial. +Apache Solr Search Server (Core Javadocs). diff --git a/solr/site/html/solr.png b/solr/site/html/solr.png new file mode 100644 index 00000000000..05f1abd4e51 Binary files /dev/null and b/solr/site/html/solr.png differ diff --git a/solr/core/src/java/doc-files/tutorial.html b/solr/site/html/tutorial.html similarity index 100% rename from solr/core/src/java/doc-files/tutorial.html rename to solr/site/html/tutorial.html diff --git a/solr/site/xsl/index.xsl b/solr/site/xsl/index.xsl new file mode 100644 index 00000000000..f5babeca9da --- /dev/null +++ b/solr/site/xsl/index.xsl @@ -0,0 +1,93 @@ + + + + + + + + + + + + <xsl:text>Apache Solr </xsl:text><xsl:value-of select="$version"/><xsl:text> Documentation</xsl:text> + + +

Solr
+

Apache Solr Documentation

+

Solr is the popular, blazing fast open source enterprise search platform from the Apache Lucene project. + Its major features include powerful full-text search, hit highlighting, faceted search, dynamic clustering, + database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly scalable, + providing distributed search and index replication, and it powers the search and navigation features of many + of the world's largest internet sites.

+

Solr is written in Java and runs as a standalone full-text search server within a servlet container such as + Jetty. Solr uses the Lucene Java search library at its core for full-text indexing and search, and has REST-like + HTTP/XML and JSON APIs that make it easy to use from virtually any programming language. Solr's powerful external + configuration allows it to be tailored to almost any type of application without Java coding, and it has an extensive + plugin architecture when more advanced customization is required.

+

+ This is the official documentation for Apache Solr + . Additional documentation is available in the + Wiki. +

+

Reference Documents

+ +

API Javadocs

+ + + + + + +
    + + + + + + + + + + + +
  • + + font-size:larger; margin-bottom:.5em; + + + : + +
  • +
    +
+
+ + diff --git a/solr/solrj/build.xml b/solr/solrj/build.xml index 96bca6d1aea..429f4032348 100644 --- a/solr/solrj/build.xml +++ b/solr/solrj/build.xml @@ -33,6 +33,19 @@ + + + + + + + + + + + + + @@ -42,12 +55,5 @@ - - - - - - - diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java index b1425358487..eed1eaa2da6 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java @@ -21,7 +21,6 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeoutException; import org.apache.solr.common.SolrException; -import org.apache.zookeeper.SolrZooKeeper; import org.apache.zookeeper.WatchedEvent; import org.apache.zookeeper.Watcher; import org.apache.zookeeper.Watcher.Event.KeeperState; diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/DefaultConnectionStrategy.java b/solr/solrj/src/java/org/apache/solr/common/cloud/DefaultConnectionStrategy.java index 5805d59e655..2348ff3744a 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/DefaultConnectionStrategy.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/DefaultConnectionStrategy.java @@ -21,7 +21,6 @@ import java.io.IOException; import java.util.concurrent.TimeoutException; import org.apache.solr.common.SolrException; -import org.apache.zookeeper.SolrZooKeeper; import org.apache.zookeeper.Watcher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java index edb47210a42..c2227165828 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java @@ -39,7 +39,6 @@ import org.apache.solr.common.cloud.ZkClientConnectionStrategy.ZkUpdate; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.KeeperException.NoNodeException; -import org.apache.zookeeper.SolrZooKeeper; import org.apache.zookeeper.Watcher; import org.apache.zookeeper.ZooDefs; import org.apache.zookeeper.ZooKeeper; diff --git a/solr/solrj/src/java/org/apache/zookeeper/SolrZooKeeper.java b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZooKeeper.java similarity index 63% rename from solr/solrj/src/java/org/apache/zookeeper/SolrZooKeeper.java rename to solr/solrj/src/java/org/apache/solr/common/cloud/SolrZooKeeper.java index 74e287e6240..9201dc29c73 100644 --- a/solr/solrj/src/java/org/apache/zookeeper/SolrZooKeeper.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZooKeeper.java @@ -1,4 +1,4 @@ -package org.apache.zookeeper; +package org.apache.solr.common.cloud; /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -18,16 +18,18 @@ package org.apache.zookeeper; */ import java.io.IOException; -import java.nio.channels.SocketChannel; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CopyOnWriteArrayList; +import java.lang.reflect.Field; +import java.nio.channels.SelectionKey; +import java.util.Set; +import java.util.concurrent.CopyOnWriteArraySet; + +import org.apache.zookeeper.ClientCnxn; +import org.apache.zookeeper.Watcher; +import org.apache.zookeeper.ZooKeeper; // we use this class to expose nasty stuff for tests public class SolrZooKeeper extends ZooKeeper { - List spawnedThreads = new CopyOnWriteArrayList(); + final Set spawnedThreads = new CopyOnWriteArraySet(); // for test debug //static Map clients = new ConcurrentHashMap(); @@ -48,32 +50,43 @@ public class SolrZooKeeper extends ZooKeeper { * @param ms the number of milliseconds to pause. */ public void pauseCnxn(final long ms) { - Thread t = new Thread() { + final Thread t = new Thread() { public void run() { try { + final ClientCnxn cnxn = getConnection(); synchronized (cnxn) { try { - ((SocketChannel) cnxn.sendThread.sockKey.channel()).socket() - .close(); + final Field sendThreadFld = cnxn.getClass().getDeclaredField("sendThread"); + sendThreadFld.setAccessible(true); + Object sendThread = sendThreadFld.get(cnxn); + if (sendThread != null) { + final Field sockKeyFld = sendThread.getClass().getDeclaredField("sockKey"); + sockKeyFld.setAccessible(true); + final SelectionKey sockKey = (SelectionKey) sockKeyFld.get(sendThread); + if (sockKey != null) { + sockKey.channel().close(); + } + } } catch (Exception e) { + throw new RuntimeException("Closing Zookeeper send channel failed.", e); } Thread.sleep(ms); } - - // Wait a long while to make sure we properly clean up these threads. - Thread.sleep(500000); - } catch (InterruptedException e) {} + } catch (InterruptedException e) { + // ignore + } finally { + spawnedThreads.remove(this); + } } }; - t.start(); spawnedThreads.add(t); + t.start(); } @Override public synchronized void close() throws InterruptedException { - //clients.remove(this); for (Thread t : spawnedThreads) { - t.interrupt(); + if (t.isAlive()) t.interrupt(); } super.close(); } diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkClientConnectionStrategy.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkClientConnectionStrategy.java index f6e1ec8ef35..2a6eb37f767 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkClientConnectionStrategy.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkClientConnectionStrategy.java @@ -23,7 +23,6 @@ import java.util.List; import java.util.concurrent.TimeoutException; import org.apache.solr.common.SolrException; -import org.apache.zookeeper.SolrZooKeeper; import org.apache.zookeeper.Watcher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/solr/test-framework/build.xml b/solr/test-framework/build.xml index ead58797469..d9c3ea52411 100644 --- a/solr/test-framework/build.xml +++ b/solr/test-framework/build.xml @@ -37,7 +37,7 @@ - + @@ -48,7 +48,7 @@ - + - - - - - - +