You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2012/09/21 19:22:27 UTC

svn commit: r1388574 [32/45] - in /lucene/dev/branches/LUCENE-2878: ./ dev-tools/ dev-tools/eclipse/ dev-tools/eclipse/dot.settings/ dev-tools/idea/ dev-tools/idea/.idea/ dev-tools/idea/.idea/libraries/ dev-tools/idea/lucene/ dev-tools/idea/lucene/anal...

Modified: lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java Fri Sep 21 17:21:34 2012
@@ -52,6 +52,7 @@ import com.carrotsearch.randomizedtestin
 import com.carrotsearch.randomizedtesting.generators.RandomPicks;
 import com.carrotsearch.randomizedtesting.rules.NoClassHooksShadowingRule;
 import com.carrotsearch.randomizedtesting.rules.NoInstanceHooksOverridesRule;
+import com.carrotsearch.randomizedtesting.rules.StaticFieldsInvariantRule;
 import com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule;
 
 import static com.carrotsearch.randomizedtesting.RandomizedTest.systemPropertyAsBoolean;
@@ -187,17 +188,19 @@ public abstract class LuceneTestCase ext
   public @interface Slow {}
 
   /**
-   * Annotation for tests that fail frequently. You can disable them
-   * if you want to run a long build and not stop on something that
-   * is a known problem.
+   * Annotation for tests that fail frequently and should
+   * be moved to a <a href="https://builds.apache.org/job/Lucene-BadApples-trunk-java7/">"vault" plan in Jenkins</a>.
+   *
+   * Tests annotated with this will be turned off by default. If you want to enable
+   * them, set:
    * <pre>
-   * -Dtests.badapples=false
+   * -Dtests.badapples=true
    * </pre>
    */
   @Documented
   @Inherited
   @Retention(RetentionPolicy.RUNTIME)
-  @TestGroup(enabled = true, sysProperty = SYSPROP_BADAPPLES)
+  @TestGroup(enabled = false, sysProperty = SYSPROP_BADAPPLES)
   public @interface BadApple {}
 
   /**
@@ -288,7 +291,7 @@ public abstract class LuceneTestCase ext
    * @see #classRules
    */
   private static final String [] IGNORED_INVARIANT_PROPERTIES = {
-    "user.timezone"
+    "user.timezone", "java.rmi.server.randomIDs"
   };
 
   /** Filesystem-based {@link Directory} implementations. */
@@ -310,9 +313,7 @@ public abstract class LuceneTestCase ext
     "MockFixedIntBlock",
     "MockVariableIntBlock",
     "MockSep",
-    "MockRandom",
-    "For",
-    "PFor"
+    "MockRandom"
   ));
   
   // -----------------------------------------------------------------
@@ -359,7 +360,7 @@ public abstract class LuceneTestCase ext
       } else {
         Logger.getLogger(LuceneTestCase.class.getSimpleName()).warning(
             "Property '" + SYSPROP_MAXFAILURES + "'=" + maxFailures + ", 'failfast' is" +
-            		" ignored.");
+            " ignored.");
       }
     }
 
@@ -367,6 +368,19 @@ public abstract class LuceneTestCase ext
   }
 
   /**
+   * Max 10mb of static data stored in a test suite class after the suite is complete.
+   * Prevents static data structures leaking and causing OOMs in subsequent tests.
+   */
+  private final static long STATIC_LEAK_THRESHOLD = 10 * 1024 * 1024;
+
+  /** By-name list of ignored types like loggers etc. */
+  private final static Set<String> STATIC_LEAK_IGNORED_TYPES = 
+      Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(
+      "org.slf4j.Logger",
+      "org.apache.solr.SolrLogFormatter",
+      EnumSet.class.getName())));
+
+  /**
    * This controls how suite-level rules are nested. It is important that _all_ rules declared
    * in {@link LuceneTestCase} are executed in proper order if they depend on each 
    * other.
@@ -377,6 +391,19 @@ public abstract class LuceneTestCase ext
     .around(ignoreAfterMaxFailures)
     .around(suiteFailureMarker)
     .around(new TestRuleAssertionsRequired())
+    .around(new StaticFieldsInvariantRule(STATIC_LEAK_THRESHOLD, true) {
+      protected boolean accept(java.lang.reflect.Field field) {
+        // Don't count known classes that consume memory once.
+        if (STATIC_LEAK_IGNORED_TYPES.contains(field.getType().getName())) {
+          return false;
+        }
+        // Don't count references from ourselves, we're top-level.
+        if (field.getDeclaringClass() == LuceneTestCase.class) {
+          return false;
+        }
+        return super.accept(field);
+      }
+    })
     .around(new NoClassHooksShadowingRule())
     .around(new NoInstanceHooksOverridesRule() {
       @Override
@@ -506,10 +533,10 @@ public abstract class LuceneTestCase ext
    * do tests on that segment's reader. This is an utility method to help them.
    */
   public static SegmentReader getOnlySegmentReader(DirectoryReader reader) {
-    List<? extends IndexReader> subReaders = reader.getSequentialSubReaders();
+    List<AtomicReaderContext> subReaders = reader.leaves();
     if (subReaders.size() != 1)
       throw new IllegalArgumentException(reader + " has " + subReaders.size() + " segments instead of exactly one");
-    final IndexReader r = subReaders.get(0);
+    final AtomicReader r = subReaders.get(0).reader();
     assertTrue(r instanceof SegmentReader);
     return (SegmentReader) r;
   }
@@ -767,6 +794,11 @@ public abstract class LuceneTestCase ext
     } else {
       logmp.setMergeFactor(_TestUtil.nextInt(r, 10, 50));
     }
+    logmp.setUseCompoundFile(r.nextBoolean());
+    logmp.setNoCFSRatio(0.1 + r.nextDouble()*0.8);
+    if (rarely()) {
+      logmp.setMaxCFSSegmentSizeMB(0.2 + r.nextDouble() * 2.0);
+    }
     return logmp;
   }
 
@@ -793,6 +825,9 @@ public abstract class LuceneTestCase ext
     }
     tmp.setUseCompoundFile(r.nextBoolean());
     tmp.setNoCFSRatio(0.1 + r.nextDouble()*0.8);
+    if (rarely()) {
+      tmp.setMaxCFSSegmentSizeMB(0.2 + r.nextDouble() * 2.0);
+    }
     tmp.setReclaimDeletesWeight(r.nextDouble()*4);
     return tmp;
   }
@@ -1124,10 +1159,25 @@ public abstract class LuceneTestCase ext
 
   /** TODO: javadoc */
   public static IOContext newIOContext(Random random) {
+    return newIOContext(random, IOContext.DEFAULT);
+  }
+
+  /** TODO: javadoc */
+  public static IOContext newIOContext(Random random, IOContext oldContext) {
     final int randomNumDocs = random.nextInt(4192);
     final int size = random.nextInt(512) * randomNumDocs;
-    final IOContext context;
-    switch (random.nextInt(5)) {
+    if (oldContext.flushInfo != null) {
+      // Always return at least the estimatedSegmentSize of
+      // the incoming IOContext:
+      return new IOContext(new FlushInfo(randomNumDocs, Math.max(oldContext.flushInfo.estimatedSegmentSize, size)));
+    } else if (oldContext.mergeInfo != null) {
+      // Always return at least the estimatedMergeBytes of
+      // the incoming IOContext:
+      return new IOContext(new MergeInfo(randomNumDocs, Math.max(oldContext.mergeInfo.estimatedMergeBytes, size), random.nextBoolean(), _TestUtil.nextInt(random, 1, 100)));
+    } else {
+      // Make a totally random IOContext:
+      final IOContext context;
+      switch (random.nextInt(5)) {
       case 0:
         context = IOContext.DEFAULT;
         break;
@@ -1145,8 +1195,9 @@ public abstract class LuceneTestCase ext
         break;
       default:
         context = IOContext.DEFAULT;
+      }
+      return context;
     }
-    return context;
   }
 
   /**
@@ -1168,7 +1219,7 @@ public abstract class LuceneTestCase ext
       if (maybeWrap) {
         r = maybeWrapReader(r);
       }
-      IndexSearcher ret = random.nextBoolean() ? new AssertingIndexSearcher(random, r) : new AssertingIndexSearcher(random, r.getTopReaderContext());
+      IndexSearcher ret = random.nextBoolean() ? new AssertingIndexSearcher(random, r) : new AssertingIndexSearcher(random, r.getContext());
       ret.setSimilarity(classEnvRule.similarity);
       return ret;
     } else {
@@ -1197,7 +1248,7 @@ public abstract class LuceneTestCase ext
       }
       IndexSearcher ret = random.nextBoolean() 
           ? new AssertingIndexSearcher(random, r, ex)
-          : new AssertingIndexSearcher(random, r.getTopReaderContext(), ex);
+          : new AssertingIndexSearcher(random, r.getContext(), ex);
       ret.setSimilarity(classEnvRule.similarity);
       return ret;
     }

Modified: lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/QuickPatchThreadsFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/QuickPatchThreadsFilter.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/QuickPatchThreadsFilter.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/QuickPatchThreadsFilter.java Fri Sep 21 17:21:34 2012
@@ -35,6 +35,11 @@ public class QuickPatchThreadsFilter imp
     if (t.getName().equals("MemoryPoolMXBean notification dispatcher")) {
       return true;
     }
+    
+    // forked process reaper on Unixish systems
+    if (t.getName().equals("process reaper")) {
+      return true;
+    }
 
     return false;
   }

Modified: lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/RollingBuffer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/RollingBuffer.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/RollingBuffer.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/RollingBuffer.java Fri Sep 21 17:21:34 2012
@@ -26,6 +26,9 @@ package org.apache.lucene.util;
  *  @lucene.internal */
 public abstract class RollingBuffer<T extends RollingBuffer.Resettable> {
 
+  /**
+   * Implement to reset an instance
+   */
   public static interface Resettable {
     public void reset();
   }

Modified: lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java Fri Sep 21 17:21:34 2012
@@ -129,7 +129,7 @@ public final class RunListenerPrintRepro
   private void reportAdditionalFailureInfo(final String testName) {
     if (TEST_LINE_DOCS_FILE.endsWith(JENKINS_LARGE_LINE_DOCS_FILE)) {
       System.err.println("NOTE: download the large Jenkins line-docs file by running " +
-      		"'ant get-jenkins-line-docs' in the lucene directory.");
+        "'ant get-jenkins-line-docs' in the lucene directory.");
     }
 
     final StringBuilder b = new StringBuilder();

Modified: lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleAssertionsRequired.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleAssertionsRequired.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleAssertionsRequired.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleAssertionsRequired.java Fri Sep 21 17:21:34 2012
@@ -32,7 +32,10 @@ public class TestRuleAssertionsRequired 
       public void evaluate() throws Throwable {
         try {
           assert false;
-          throw new Exception("Test class requires assertions, enable assertions globally (-ea) or for Solr/Lucene subpackages only.");
+          String msg = "Test class requires enabled assertions, enable globally (-ea)" +
+              " or for Solr/Lucene subpackages only: " + description.getClassName();
+          System.err.println(msg);
+          throw new Exception(msg);
         } catch (AssertionError e) {
           // Ok, enabled.
         }

Modified: lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleFieldCacheSanity.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleFieldCacheSanity.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleFieldCacheSanity.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleFieldCacheSanity.java Fri Sep 21 17:21:34 2012
@@ -1,10 +1,5 @@
 package org.apache.lucene.util;
 
-import org.apache.lucene.search.FieldCache;
-import org.junit.rules.TestRule;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -22,6 +17,30 @@ import org.junit.runners.model.Statement
  * limitations under the License.
  */
 
+import org.apache.lucene.search.FieldCache;
+import org.apache.lucene.util.FieldCacheSanityChecker; // javadocs
+import org.junit.rules.TestRule;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+/**
+ * This rule will fail the test if it has insane field caches.
+ * <p>
+ * calling assertSaneFieldCaches here isn't as useful as having test
+ * classes call it directly from the scope where the index readers
+ * are used, because they could be gc'ed just before this tearDown
+ * method is called.
+ * <p>
+ * But it's better then nothing.
+ * <p>
+ * If you are testing functionality that you know for a fact
+ * "violates" FieldCache sanity, then you should either explicitly
+ * call purgeFieldCache at the end of your test method, or refactor
+ * your Test class so that the inconsistent FieldCache usages are
+ * isolated in distinct test methods
+ * 
+ * @see FieldCacheSanityChecker
+ */
 public class TestRuleFieldCacheSanity implements TestRule {
   
   @Override
@@ -33,18 +52,6 @@ public class TestRuleFieldCacheSanity im
 
         Throwable problem = null;
         try {
-          // calling assertSaneFieldCaches here isn't as useful as having test
-          // classes call it directly from the scope where the index readers
-          // are used, because they could be gc'ed just before this tearDown
-          // method is called.
-          //
-          // But it's better then nothing.
-          //
-          // If you are testing functionality that you know for a fact
-          // "violates" FieldCache sanity, then you should either explicitly
-          // call purgeFieldCache at the end of your test method, or refactor
-          // your Test class so that the inconsistent FieldCache usages are
-          // isolated in distinct test methods
           LuceneTestCase.assertSaneFieldCaches(d.getDisplayName());
         } catch (Throwable t) {
           problem = t;

Modified: lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleStoreClassName.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleStoreClassName.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleStoreClassName.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleStoreClassName.java Fri Sep 21 17:21:34 2012
@@ -21,6 +21,10 @@ import org.junit.rules.TestRule;
 import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
 
+/**
+ * Stores the suite name so you can retrieve it
+ * from {@link #getTestClass()}
+ */
 public class TestRuleStoreClassName implements TestRule {
   private volatile Description description;
 

Modified: lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/_TestUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/_TestUtil.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/_TestUtil.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/_TestUtil.java Fri Sep 21 17:21:34 2012
@@ -29,7 +29,12 @@ import java.lang.reflect.Method;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.nio.CharBuffer;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.regex.Pattern;
@@ -72,6 +77,8 @@ import org.apache.lucene.index.Terms;
 import org.apache.lucene.index.TermsEnum;
 import org.apache.lucene.index.TieredMergePolicy;
 import org.apache.lucene.search.FieldDoc;
+import org.apache.lucene.search.FilteredQuery;
+import org.apache.lucene.search.FilteredQuery.FilterStrategy;
 import org.apache.lucene.search.ScoreDoc;
 import org.apache.lucene.search.TopDocs;
 import org.apache.lucene.store.CompoundFileDirectory;
@@ -94,7 +101,7 @@ public class _TestUtil {
     try {
       File f = createTempFile(desc, "tmp", LuceneTestCase.TEMP_DIR);
       f.delete();
-      LuceneTestCase.closeAfterSuite(new CloseableFile(f));
+      LuceneTestCase.closeAfterSuite(new CloseableFile(f, LuceneTestCase.suiteFailureMarker));
       return f;
     } catch (IOException e) {
       throw new RuntimeException(e);
@@ -136,7 +143,7 @@ public class _TestUtil {
     rmDir(destDir);
 
     destDir.mkdir();
-    LuceneTestCase.closeAfterSuite(new CloseableFile(destDir));
+    LuceneTestCase.closeAfterSuite(new CloseableFile(destDir, LuceneTestCase.suiteFailureMarker));
 
     while (entries.hasMoreElements()) {
       ZipEntry entry = entries.nextElement();
@@ -797,7 +804,7 @@ public class _TestUtil {
   // TODO: is there a pre-existing way to do this!!!
   public static Document cloneDocument(Document doc1) {
     final Document doc2 = new Document();
-    for(IndexableField f : doc1) {
+    for(IndexableField f : doc1.getFields()) {
       final Field field1 = (Field) f;
       final Field field2;
       final DocValues.Type dvType = field1.fieldType().docValueType();
@@ -975,4 +982,29 @@ public class _TestUtil {
       }
     }
   }
+    
+  
+  public static final FilterStrategy randomFilterStrategy(final Random random) {
+    switch(random.nextInt(6)) {
+      case 5:
+      case 4:
+        return new FilteredQuery.RandomAccessFilterStrategy() {
+          @Override
+          protected boolean useRandomAccess(Bits bits, int firstFilterDoc) {
+            return LuceneTestCase.random().nextBoolean();
+          }
+        };
+      case 3:
+        return FilteredQuery.RANDOM_ACCESS_FILTER_STRATEGY;
+      case 2:
+        return FilteredQuery.LEAP_FROG_FILTER_FIRST_STRATEGY;
+      case 1:
+        return FilteredQuery.LEAP_FROG_QUERY_FIRST_STRATEGY;
+      case 0: 
+        return FilteredQuery.QUERY_FIRST_FILTER_STRATEGY;
+      default:
+        return FilteredQuery.RANDOM_ACCESS_FILTER_STRATEGY;
+    }
+  }
+
 }

Modified: lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java Fri Sep 21 17:21:34 2012
@@ -127,6 +127,13 @@ public class AutomatonTestUtil {
     return code;
   }
 
+  /**
+   * Lets you retrieve random strings accepted
+   * by an Automaton.
+   * <p>
+   * Once created, call {@link #getRandomAcceptedString(Random)}
+   * to get a new string (in UTF-32 codepoints).
+   */
   public static class RandomAcceptedStrings {
 
     private final Map<Transition,Boolean> leadsToAccept;

Modified: lucene/dev/branches/LUCENE-2878/lucene/tools/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/tools/build.xml?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/tools/build.xml (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/tools/build.xml Fri Sep 21 17:21:34 2012
@@ -45,4 +45,5 @@
   </target>
 
   <target name="javadocs"/> <!-- to make common-build.xml happy -->
+  <target name="pitest"/> <!-- to make common-build.xml happy -->
 </project>

Modified: lucene/dev/branches/LUCENE-2878/lucene/tools/custom-tasks.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/lucene/tools/custom-tasks.xml?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/lucene/tools/custom-tasks.xml (original)
+++ lucene/dev/branches/LUCENE-2878/lucene/tools/custom-tasks.xml Fri Sep 21 17:21:34 2012
@@ -16,6 +16,23 @@
     <property name="custom-tasks.loaded" value="true"/>
   </target>
 
+  <filtermapper id="license-mapper-defaults">
+    <!-- Normalize input paths. -->
+    <replacestring from="\" to="/" />
+    <replaceregex pattern="\.jar$" replace="" flags="gi" />
+    
+    <!-- Some typical snapshot/minimalized JAR suffixes. -->
+    <replaceregex pattern="-min$" replace="" flags="gi" />
+    <replaceregex pattern="SNAPSHOT$" replace="" flags="gi" />
+
+    <!-- Typical version patterns. -->
+    <replaceregex pattern="\.rc[0-9]+" replace="" flags="gi" />
+    <replaceregex pattern="\-(r)?([0-9\-\_\.])+(b(eta)?([0-9\-\.])*)?$" replace="" flags="gi" />
+
+    <!-- git hashcode pattern: its always 40 chars right? -->
+    <replaceregex pattern="\-[a-z0-9]{40,40}$" replace="" flags="gi" />
+  </filtermapper>
+
   <macrodef name="license-check-macro">
     <attribute name="dir" />
     <attribute name="licensedir" />
@@ -38,25 +55,13 @@
         </fileset>
 
         <licenseMapper>
-          <filtermapper id="license-mapper-defaults">
-            <!-- Normalize input paths. -->
-            <replacestring from="\" to="/" />
-            <replaceregex pattern="\.jar$" replace="" flags="gi" />
-    
-            <!-- Some typical snapshot/minimalized JAR suffixes. -->
-            <replaceregex pattern="-min$" replace="" flags="gi" />
-            <replaceregex pattern="SNAPSHOT$" replace="" flags="gi" />
-
-            <!-- Non-typical version patterns. -->
-            <additional-filters />
-
-            <!-- Typical version patterns. -->
-            <replaceregex pattern="\.rc[0-9]+" replace="" flags="gi" />
-            <replaceregex pattern="\-(r)?([0-9\-\_\.])+(b(eta)?([0-9\-\.])*)?$" replace="" flags="gi" />
-
-            <!-- git hashcode pattern: its always 40 chars right? -->
-            <replaceregex pattern="\-[a-z0-9]{40,40}$" replace="" flags="gi" />
-          </filtermapper>
+          <chainedmapper>
+            <filtermapper refid="license-mapper-defaults"/>
+            <filtermapper>
+              <!-- Non-typical version patterns. -->
+              <additional-filters />
+            </filtermapper>
+          </chainedmapper>
         </licenseMapper>
       </licenses>
     </sequential>

Modified: lucene/dev/branches/LUCENE-2878/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/CHANGES.txt?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/CHANGES.txt (original)
+++ lucene/dev/branches/LUCENE-2878/solr/CHANGES.txt Fri Sep 21 17:21:34 2012
@@ -26,10 +26,128 @@ $Id$
 
 ==================  4.0.0 ==================
 
+Versions of Major Components
+---------------------
+Apache Tika 1.2
+Carrot2 3.5.0
+Velocity 1.6.4 and Velocity Tools 2.0
+Apache UIMA 2.3.1
+Apache ZooKeeper 3.3.6
+
 Upgrading from Solr 4.0.0-BETA
 ----------------------
 
-In order to better support distributed search mode, the TermVectorComponent's response format has been changed so that if the schema defines a uniqueKeyField, then that field value is used as the "key" for each document in it's response section, instead of the internal lucene doc id.  Users w/o a uniqueKeyField will continue to see the same response format.  See SOLR-3229 for more details.
+In order to better support distributed search mode, the TermVectorComponent's
+response format has been changed so that if the schema defines a 
+uniqueKeyField, then that field value is used as the "key" for each document in
+it's response section, instead of the internal lucene doc id.  Users w/o a 
+uniqueKeyField will continue to see the same response format.  See SOLR-3229
+for more details.
+
+If you are using SolrCloud's distributed update request capabilities and a non
+string type id field, you must re-index.
+
+Upgrading from Solr 4.0.0-ALPHA
+----------------------
+
+Solr is now much more strict about requiring that the uniqueKeyField feature 
+(if used) must refer to a field which is not multiValued.  If you upgrade from 
+an earlier version of Solr and see an error that your uniqueKeyField "can not 
+be configured to be multivalued" please add 'multiValued="false"' to the 
+<field /> declaration for your uniqueKeyField.  See SOLR-3682 for more details.
+
+In addition, please review the notes above about upgrading from 4.0.0-BETA
+
+Upgrading from Solr 3.6
+----------------------
+
+* The Lucene index format has changed and as a result, once you upgrade, 
+  previous versions of Solr will no longer be able to read your indices.
+  In a master/slave configuration, all searchers/slaves should be upgraded
+  before the master.  If the master were to be updated first, the older
+  searchers would not be able to read the new index format.
+
+* Setting abortOnConfigurationError=false is no longer supported
+  (since it has never worked properly).  Solr will now warn you if
+  you attempt to set this configuration option at all. (see SOLR-1846)
+
+* The default logic for the 'mm' param of the 'dismax' QParser has
+  been changed.  If no 'mm' param is specified (either in the query,
+  or as a default in solrconfig.xml) then the effective value of the
+  'q.op' param (either in the query or as a default in solrconfig.xml
+  or from the 'defaultOperator' option in schema.xml) is used to
+  influence the behavior.  If q.op is effectively "AND" then mm=100%.
+  If q.op is effectively "OR" then mm=0%.  Users who wish to force the
+  legacy behavior should set a default value for the 'mm' param in
+  their solrconfig.xml file.
+  
+* The VelocityResponseWriter is no longer built into the core.  Its JAR and
+  dependencies now need to be added (via <lib> or solr/home lib inclusion),
+  and it needs to be registered in solrconfig.xml like this:
+    <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter"/>
+
+* The update request parameter to choose Update Request Processor Chain is 
+  renamed from "update.processor" to "update.chain". The old parameter was
+  deprecated but still working since Solr3.2, but is now removed
+  entirely.
+
+* The <indexDefaults> and <mainIndex> sections of solrconfig.xml are discontinued
+  and replaced with the <indexConfig> section. There are also better defaults.
+  When migrating, if you don't know what your old settings mean, simply delete
+  both <indexDefaults> and <mainIndex> sections. If you have customizations,
+  put them in <indexConfig> section - with same syntax as before.
+
+* Two of the SolrServer subclasses in SolrJ were renamed/replaced.
+  CommonsHttpSolrServer is now HttpSolrServer, and 
+  StreamingUpdateSolrServer is now ConcurrentUpdateSolrServer.
+
+* The PingRequestHandler no longer looks for a <healthcheck/> option in the 
+  (legacy) <admin> section of solrconfig.xml.  Users who wish to take 
+  advantage of this feature should configure a "healthcheckFile" init param 
+  directly on the  PingRequestHandler.  As part of this change, relative file 
+  paths have been fixed to be resolved against the data dir.  See the example 
+  solrconfig.xml and SOLR-1258 for more details.
+
+* Due to low level changes to support SolrCloud, the uniqueKey field can no 
+  longer be populated via <copyField/> or <field default=...> in the 
+  schema.xml.  Users wishing to have Solr automatically generate a uniqueKey 
+  value when adding documents should instead use an instance of
+  solr.UUIDUpdateProcessorFactory in their update processor chain.  See 
+  SOLR-2796 for more details.
+
+In addition, please review the notes above about upgrading from 4.0.0-BETA, and 4.0.0-ALPHA
+
+Detailed Change List
+----------------------
+
+New Features
+----------------------
+
+* SOLR-3670: New CountFieldValuesUpdateProcessorFactory makes it easy to index 
+  the number of values in another field for later use at query time. (hossman)
+
+* SOLR-2768: new "mod(x,y)" function for computing the modulus of two value 
+  sources. (hossman)
+
+* SOLR-3238: Numerous small improvements to the Admin UI (steffkes)
+
+* SOLR-3597: seems like a lot of wasted whitespace at the top of the admin screens
+  (steffkes)
+
+* SOLR-3304: Added Solr adapters for Lucene 4's new spatial module.  With
+  SpatialRecursivePrefixTreeFieldType ("location_rpt" in example schema), it is
+  possible to index a variable number of points per document (and sort on them),
+  index not just points but any Spatial4j supported shape such as polygons, and
+  to query on these shapes too.  Polygons requires adding JTS to the classpath.
+  (David Smiley)
+
+* SOLR-3825: Added optional capability to log what ids are in a response
+        (Scott Stults via gsingers)
+
+* SOLR-3821: Added 'df' to the UI Query form (steffkes)
+
+* SOLR-3822: Added hover titles to the edismax params on the UI Query form 
+  (steffkes)
 
 Optimizations
 ----------------------
@@ -37,6 +155,17 @@ Optimizations
 * SOLR-3715: improve concurrency of the transaction log by removing
   synchronization around log record serialization. (yonik)
 
+* SOLR-3807: Currently during recovery we pause for a number of seconds after 
+  waiting for the leader to see a recovering state so that any previous updates
+  will have finished before our commit on the leader - we don't need this wait 
+  for peersync. (Mark Miller)
+  
+* SOLR-3837: When a leader is elected and asks replicas to sync back to him and 
+  that fails, we should ask those nodes to recovery asynchronously rather than 
+  synchronously. (Mark Miller)
+
+* SOLR-3709: Cache the url list created from the ClusterState in CloudSolrServer
+  on each request. (Mark Miller)
 
 Bug Fixes
 ----------------------
@@ -54,6 +183,209 @@ Bug Fixes
 * SOLR-3649: Fixed bug in JavabinLoader that caused deleteById(List<String> ids)
   to not work in SolrJ (siren)
 
+* SOLR-3730: Rollback is not implemented quite right and can cause corner case fails in 
+  SolrCloud tests. (rmuir, Mark Miller)
+
+* SOLR-2981: Fixed StatsComponent to no longer return duplicated information 
+  when requesting multiple stats.facet fields.
+  (Roman Kliewer via hossman)
+
+* SOLR-3743: Fixed issues with atomic updates and optimistic concurrency in
+  conjunction with stored copyField targets by making real-time get never
+  return copyField targets. (yonik)
+
+* SOLR-3746: Proper error reporting if updateLog is configured w/o necessary 
+  "_version_" field in schema.xml (hossman)
+
+* SOLR-3745: Proper error reporting if SolrCloud mode is used w/o 
+  necessary "_version_" field in schema.xml (hossman)
+
+* SOLR-3770: Overseer may lose updates to cluster state (siren)
+
+* SOLR-3721: Fix bug that could theoretically allow multiple recoveries to run
+  briefly at the same time if the recovery thread join call was interrupted.
+  (Per Steffensen, Mark Miller)
+
+* SOLR-3782: A leader going down while updates are coming in can cause shard
+  inconsistency. (Mark Miller)
+
+* SOLR-3611: We do not show ZooKeeper data in the UI for a node that has children.
+  (Mark Miller)
+
+* SOLR-3789: Fix bug in SnapPuller that caused "internal" compression to fail.
+  (siren)
+
+* SOLR-3790: ConcurrentModificationException could be thrown when using hl.fl=*.
+  Fixed in r1231606. (yonik, koji)
+
+* SOLR-3668: DataImport : Specifying Custom Parameters (steffkes)
+
+* SOLR-3793: UnInvertedField faceting cached big terms in the filter
+  cache that ignored deletions, leading to duplicate documents in search
+  later when a filter of the same term was specified.
+  (Günter Hipler, hossman, yonik)
+
+* SOLR-3679: Core Admin UI gives no feedback if "Add Core" fails (steffkes, hossman)
+
+* SOLR-3795: Fixed LukeRequestHandler response to correctly return field name 
+  strings in copyDests and copySources arrays (hossman)
+
+* SOLR-3699: Fixed some Directory leaks when there were errors during SolrCore 
+  or SolrIndexWriter initialization. (hossman)
+
+* SOLR-3518: Include final 'hits' in log information when aggregating a 
+  distibuted request (Markus Jelsma via hossman)
+
+* SOLR-3628: SolrInputField and SolrInputDocument are now consistently backed 
+  by Collections passed in to setValue/setField, and defensively copy values 
+  from Collections passed to addValue/addField
+  (Tom Switzer via hossman)
+
+* SOLR-3595: CurrencyField now generates an appropriate error on schema init
+  if it is configured as multiValued - this has never been properly supported, 
+  but previously failed silently in odd ways.  (hossman)
+
+* SOLR-3823: Fix 'bq' parsing in edismax.  Please note that this required 
+  reverting the negative boost support added by SOLR-3278 (hossman)
+
+* SOLR-3827: Fix shareSchema=true in solr.xml 
+  (Tomás Fernández Löbbe via hossman)
+
+* SOLR-3809: Fixed config file replication when subdirectories are used
+  (Emmanuel Espina via hossman)
+
+* SOLR-3828: Fixed QueryElevationComponent so that using 'markExcludes' does 
+  not modify the result set or ranking of 'excluded' documents relative to 
+  not using elevation at all.  (Alexey Serba via hossman)
+
+* SOLR-3569: Fixed debug output on distributed requests when there are no 
+  results found.  (David Bowen via hossman)
+
+* SOLR-3811: Query Form using wrong values for dismax, edismax (steffkes)
+
+* SOLR-3779: DataImportHandler's LineEntityProcessor when used in conjunction 
+  with FileListEntityProcessor would only process the first file.
+  (Ahmet Arslan via James Dyer)
+  
+* SOLR-3791: CachedSqlEntityProcessor would throw a NullPointerException when 
+  a query returns a row with a NULL key.  (Steffen Moelter via James Dyer)
+
+* SOLR-3833: When a election is started because a leader went down, the new 
+  leader candidate should decline if the last state they published was not
+  active. (yonik, Mark Miller)
+
+* SOLR-3836: When doing peer sync, we should only count sync attempts that 
+  cannot reach the given host as success when the candidate leader is 
+  syncing with the replicas - not when replicas are syncing to the leader.
+  (Mark Miller)
+
+* SOLR-3835: In our leader election algorithm, if on connection loss we found
+  we did not create our election node, we should retry, not throw an exception.
+  (Mark Miller)
+
+* SOLR-3834: A new leader on cluster startup should also run the leader sync 
+  process in case there was a bad cluster shutdown. (Mark Miller)
+
+* SOLR-3772: On cluster startup, we should wait until we see all registered 
+  replicas before running the leader process - or if they all do not come up,
+  N amount of time. (Mark Miller)
+  
+* SOLR-3756: If we are elected the leader of a shard, but we fail to publish 
+  this for any reason, we should clean up and re trigger a leader election.
+  (Mark Miller)
+
+* SOLR-3812: ConnectionLoss during recovery can cause lost updates, leading to 
+  shard inconsistency. (Mark Miller)
+  
+* SOLR-3813: When a new leader syncs, we need to ask all shards to sync back, 
+  not just those that are active. (Mark Miller)
+
+* SOLR-3641: CoreContainer is not persisting roles core attribute. 
+  (hossman, Mark Miller)
+
+* SOLR-3527: SolrCmdDistributor drops some of the important commit attributes
+  (maxOptimizeSegments, softCommit, expungeDeletes) when sending a commit to
+  replicas. (Andy Laird, Tomas Fernandez Lobbe, Mark Miller)
+
+* SOLR-3844: SolrCore reload can fail because it tries to remove the index 
+  write lock while already holding it. (Mark Miller)
+
+* SOLR-3831: Atomic updates do not distribute correctly to other nodes.
+  (Jim Musil, Mark Miller)
+  
+* SOLR-3465: Replication causes two searcher warmups. 
+  (Michael Garski, Mark Miller)
+
+* SOLR-3645: /terms should default to distrib=false. (Nick Cotton, Mark Miller)
+
+* SOLR-3759: Various fixes to the example-DIH configs (Ahmet Arslan, hossman)
+
+* SOLR-3777: Dataimport-UI does not send unchecked checkboxes (Glenn MacStravic
+  via steffkes)
+
+* SOLR-3850: DataImportHandler "cacheKey" parameter was incorrectly renamed "cachePk"
+  (James Dyer)
+
+* SOLR-3087: Fixed DOMUtil so that code doing attribute validation will 
+  automaticly ignore nodes in the resserved "xml" prefix - in particular this 
+  fixes some bugs related to xinclude and fieldTypes.
+  (Amit Nithian, hossman)
+
+* SOLR-3783: Fixed Pivot Faceting to work with facet.missing=true (hossman)
+
+Other Changes
+----------------------
+
+* SOLR-3690: Fixed binary release packages to include dependencie needed for 
+  the solr-test-framework (hossman)
+
+* SOLR-2857: The /update/json and /update/csv URLs were restored to aid
+  in the migration of existing clients.  (yonik)
+
+* SOLR-3691: SimplePostTool: Mode for crawling/posting web pages
+  See http://wiki.apache.org/solr/ExtractingRequestHandler for examples (janhoy)
+
+* SOLR-3707: Upgrade Solr to Tika 1.2 (janhoy)
+
+* SOLR-2747: Updated changes2html.pl to handle Solr's CHANGES.txt; added
+  target 'changes-to-html' to solr/build.xml.
+  (Steve Rowe, Robert Muir)
+  
+* SOLR-3752: When a leader goes down, have the Overseer clear the leader state
+  in cluster.json (Mark Miller)
+
+* SOLR-3751: Add defensive checks for SolrCloud updates and requests that ensure 
+  the local state matches what we can tell the request expected. (Mark Miller)
+  
+* SOLR-3773: Hash based on the external String id rather than the indexed 
+  representation for distributed updates. (Michael Garski, yonik, Mark Miller)
+
+* SOLR-3780: Maven build: Make solrj tests run separately from solr-core.
+  (Steve Rowe)
+  
+* SOLR-3772: Optionally, on cluster startup, we can wait until we see all registered 
+  replicas before running the leader process - or if they all do not come up, 
+  N amount of time. (Jan Høydahl, Per Steffensen, Mark Miller)
+
+* SOLR-3750: Optionaly, on session expiration, we can explicitly wait some time before 
+  running the leader sync process so that we are sure every node participates.
+  (Per Steffensen, Mark Miller)
+
+* SOLR-3824: Velocity: Error messages from search not displayed (janhoy)
+
+* SOLR-3826: Test framework improvements for specifying coreName on initCore
+  (Amit Nithian, hossman)
+  
+* SOLR-3749: Allow default UpdateLog syncLevel to be configured by
+  solrconfig.xml (Raintung Li, Mark Miller)
+
+* SOLR-3845: Rename numReplicas to replicationFactor in Collections API.
+  (yonik, Mark Miller)
+
+* SOLR-3815: SolrCloud - Add properties such as "range" to shards, which changes
+  the clusterstate.json and puts the shard replicas under "replicas". (yonik)
+
+
 ==================  4.0.0-BETA ===================
 
 
@@ -188,7 +520,7 @@ Bug Fixes
 
 * SOLR-3660: Velocity: Link to admin page broken (janhoy)
 
-* SOLR-3658: Adding thousands of docs with one UpdateProcessorChain instance can briefly create 
+* SOLR-3658: Adding thousands of docs with one UpdateProcessorChain instance can briefly create
   spikes of threads in the thousands. (yonik, Mark Miller)
 
 * SOLR-3656: A core reload now always uses the same dataDir.  (Mark Miller, yonik)
@@ -376,26 +708,26 @@ New Features
   built-in load balancing, and distributed indexing. 
   (Jamie Johnson, Sami Siren, Ted Dunning, yonik, Mark Miller)
   Additional Work:
-  SOLR-2324: SolrCloud solr.xml parameters are not persisted by CoreContainer.
-  (Massimo Schiavon, Mark Miller)
-  SOLR-2287: Allow users to query by multiple, compatible collections with SolrCloud.
-  (Soheb Mahmood, Alex Cowell, Mark Miller)
-  SOLR-2622: ShowFileRequestHandler does not work in SolrCloud mode. 
-  (Stefan Matheis, Mark Miller)
-  SOLR-3108: Error in SolrCloud's replica lookup code when replica's are hosted in same Solr instance.
-  (Bruno Dumon, Sami Siren, Mark Miller)
-  SOLR-3080: Remove shard info from zookeeper when SolrCore is explicitly unloaded.
-  (yonik, Mark Miller, siren)
-  SOLR-3437: Recovery issues a spurious commit to the cluster. (Trym R. Møller via Mark Miller)
-  SOLR-2822: Skip update processors already run on other nodes (hossman)
+  - SOLR-2324: SolrCloud solr.xml parameters are not persisted by CoreContainer.
+    (Massimo Schiavon, Mark Miller)
+  - SOLR-2287: Allow users to query by multiple, compatible collections with SolrCloud.
+    (Soheb Mahmood, Alex Cowell, Mark Miller)
+  - SOLR-2622: ShowFileRequestHandler does not work in SolrCloud mode.
+    (Stefan Matheis, Mark Miller)
+  - SOLR-3108: Error in SolrCloud's replica lookup code when replica's are hosted in same Solr instance.
+    (Bruno Dumon, Sami Siren, Mark Miller)
+  - SOLR-3080: Remove shard info from zookeeper when SolrCore is explicitly unloaded.
+    (yonik, Mark Miller, siren)
+  - SOLR-3437: Recovery issues a spurious commit to the cluster. (Trym R. Møller via Mark Miller)
+  - SOLR-2822: Skip update processors already run on other nodes (hossman)
 
 * SOLR-1566: Transforming documents in the ResponseWriters.  This will allow
   for more complex results in responses and open the door for function queries
   as results. 
-  (ryan with patches from grant, noble, cmale, yonik, Jan Høydahl, 
+  (ryan with patches from grant, noble, cmale, yonik, Jan Høydahl,
   Arul Kalaipandian, Luca Cavanna, hossman)
-  SOLR-2037: Thanks to SOLR-1566, documents boosted by the QueryElevationComponent
-  can be marked as boosted.  (gsingers, ryan, yonik)
+  - SOLR-2037: Thanks to SOLR-1566, documents boosted by the QueryElevationComponent
+    can be marked as boosted.  (gsingers, ryan, yonik)
 
 * SOLR-2396: Add CollationField, which is much more efficient than 
   the Solr 3.x CollationKeyFilterFactory, and also supports 
@@ -411,10 +743,10 @@ New Features
   (Jan Høydahl via yonik)
 
 * SOLR-2272: Pseudo-join queries / filters.  Examples:
-  To restrict to the set of parents with at least one blue-eyed child:
-    fq={!join from=parent to=name}eyes:blue
-  To restrict to the set of children with at least one blue-eyed parent:
-    fq={!join from=name to=parent}eyes:blue
+  - To restrict to the set of parents with at least one blue-eyed child:
+      fq={!join from=parent to=name}eyes:blue
+  - To restrict to the set of children with at least one blue-eyed parent:
+      fq={!join from=name to=parent}eyes:blue
   (yonik)
 
 * SOLR-1942: Added the ability to select postings format per fieldType in schema.xml
@@ -461,12 +793,12 @@ New Features
 * SOLR-2703: Added support for Lucene's "surround" query parser. (Simon Rosenthal, ehatcher)
 
 * SOLR-2754: Added factories for several ranking algorithms: 
-    BM25SimilarityFactory: Okapi BM25
-    DFRSimilarityFactory: Divergence from Randomness models
-    IBSimilarityFactory: Information-based models
-    LMDirichletSimilarity: LM with Dirichlet smoothing
-    LMJelinekMercerSimilarity: LM with Jelinek-Mercer smoothing
- (David Mark Nemeskey, Robert Muir)
+    - BM25SimilarityFactory: Okapi BM25
+    - DFRSimilarityFactory: Divergence from Randomness models
+    - IBSimilarityFactory: Information-based models
+    - LMDirichletSimilarity: LM with Dirichlet smoothing
+    - LMJelinekMercerSimilarity: LM with Jelinek-Mercer smoothing
+  (David Mark Nemeskey, Robert Muir)
  
 * SOLR-2134 Trie* fields should support sortMissingLast=true, and deprecate Sortable* Field Types
   (Ryan McKinley, Mike McCandless, Uwe Schindler, Erick Erickson)
@@ -489,18 +821,18 @@ New Features
 * SOLR-2802: New FieldMutatingUpdateProcessor and Factory to simplify the
   development of UpdateProcessors that modify field values of documents as 
   they are indexed. Also includes several useful new implementations:
-      RemoveBlankFieldUpdateProcessorFactory
-      TrimFieldUpdateProcessorFactory
-      HTMLStripFieldUpdateProcessorFactory
-      RegexReplaceProcessorFactory
-      FieldLengthUpdateProcessorFactory
-      ConcatFieldUpdateProcessorFactory
-      FirstFieldValueUpdateProcessorFactory
-      LastFieldValueUpdateProcessorFactory
-      MinFieldValueUpdateProcessorFactory
-      MaxFieldValueUpdateProcessorFactory
-      TruncateFieldUpdateProcessorFactory
-      IgnoreFieldUpdateProcessorFactory 
+    - RemoveBlankFieldUpdateProcessorFactory
+    - TrimFieldUpdateProcessorFactory
+    - HTMLStripFieldUpdateProcessorFactory
+    - RegexReplaceProcessorFactory
+    - FieldLengthUpdateProcessorFactory
+    - ConcatFieldUpdateProcessorFactory
+    - FirstFieldValueUpdateProcessorFactory
+    - LastFieldValueUpdateProcessorFactory
+    - MinFieldValueUpdateProcessorFactory
+    - MaxFieldValueUpdateProcessorFactory
+    - TruncateFieldUpdateProcessorFactory
+    - IgnoreFieldUpdateProcessorFactory
   (hossman, janhoy)
 
 * SOLR-3120: Optional post filtering for spatial queries bbox and geofilt
@@ -514,8 +846,8 @@ New Features
 
 * SOLR-2898: Support grouped faceting. (Martijn van Groningen)
   Additional Work:
-  SOLR-3406: Extended grouped faceting support to facet.query and facet.range parameters.
-             (David Boychuck, Martijn van Groningen)
+  - SOLR-3406: Extended grouped faceting support to facet.query and facet.range parameters.
+               (David Boychuck, Martijn van Groningen)
 
 * SOLR-2949: QueryElevationComponent is now supported with distributed search.
   (Mark Miller, yonik)
@@ -598,9 +930,9 @@ New Features
 
 * SOLR-3508: Simplify JSON update format for deletes as well as allow
   version specification for optimistic locking.  Examples:
-    {"delete":"myid"}
-    {"delete":["id1","id2","id3"]}
-    {"delete":{"id":"myid", "_version_":123456789}}
+    - {"delete":"myid"}
+    - {"delete":["id1","id2","id3"]}
+    - {"delete":{"id":"myid", "_version_":123456789}}
   (yonik)
 
 * SOLR-3211:  Allow parameter overrides in conjunction with "spellcheck.maxCollationTries".
@@ -644,9 +976,9 @@ Optimizations
   works with SolrCore to provide faster 'soft' commits, and has an improved API 
   that requires less instanceof special casing. (Mark Miller, Robert Muir)
   Additional Work:
-  SOLR-2697: commit and autocommit operations don't reset 
-  DirectUpdateHandler2.numDocsPending stats attribute.
-  (Alexey Serba, Mark Miller)
+  - SOLR-2697: commit and autocommit operations don't reset
+    DirectUpdateHandler2.numDocsPending stats attribute.
+    (Alexey Serba, Mark Miller)
 
 * SOLR-2950: The QueryElevationComponent now avoids using the FieldCache and looking up
   every document id (gsingers, yonik)
@@ -691,8 +1023,8 @@ Bug Fixes
 * SOLR-2193, SOLR-2565, SOLR-2651: SolrCores now properly share IndexWriters across SolrCore reloads.
   (Mark Miller, Robert Muir)
   Additional Work:
-  SOLR-2705: On reload, IndexWriterProvider holds onto the initial SolrCore it was created with.
-  (Yury Kats, Mark Miller)
+  - SOLR-2705: On reload, IndexWriterProvider holds onto the initial SolrCore it was created with.
+    (Yury Kats, Mark Miller)
 
 * SOLR-2682: Remove addException() in SimpleFacet. FacetComponent no longer catches and embeds
   exceptions occurred during facet processing, it throws HTTP 400 or 500 exceptions instead. (koji)
@@ -871,7 +1203,7 @@ Other Changes
 * SOLR-2607: Removed deprecated client/ruby directory, which included solr-ruby and flare.
   (ehatcher)
   
-* Solr-3032: logOnce from SolrException logOnce and all the supporting
+* SOLR-3032: logOnce from SolrException logOnce and all the supporting
   structure is gone. abortOnConfugrationError is also gone as it is no longer referenced.
   Errors should be caught and logged at the top-most level or logged and NOT propagated up the 
   chain. (Erick Erickson)
@@ -951,7 +1283,7 @@ More information about this release, inc
 release notes, upgrade instructions, or other changes may be found online at:
    https://wiki.apache.org/solr/Solr3.6.1
 
-Bug Fixes:
+Bug Fixes
 
 * LUCENE-3969: Throw IAE on bad arguments that could cause confusing errors in
   PatternTokenizer. CommonGrams populates PositionLengthAttribute correctly.
@@ -1126,7 +1458,7 @@ New Features
 * SOLR-2001: The query component will substitute an empty query that matches
   no documents if the query parser returns null.  This also prevents an
   exception from being thrown by the default parser if "q" is missing. (yonik)
-  SOLR-435: if q is "" then it's also acceptable. (dsmiley, hoss)
+  - SOLR-435: if q is "" then it's also acceptable. (dsmiley, hoss)
 
 * SOLR-2919: Added parametric tailoring options to ICUCollationKeyFilterFactory.
   These can be used to customize range query/sort behavior, for example to
@@ -1509,7 +1841,7 @@ Bug Fixes
 * SOLR-2875: Fix the incorrect url in DIH example tika-data-config.xml 
   (Shinichiro Abe via koji)
 
- Other Changes
+Other Changes
 ----------------------
 
 * SOLR-2750: Make both "update.chain" and the deprecated "update.param" work
@@ -1645,7 +1977,7 @@ Bug Fixes
 * SOLR-2625: TermVectorComponent throws NPE if TF-IDF option is used without DF
   option. (Daniel Erenrich, Simon Willnauer)
 
-* SOLR-2631: PingRequestHandler should not allow to ping itsself using "qt"
+* SOLR-2631: PingRequestHandler should not allow to ping itself using "qt"
   param to prevent infinite loop. (Edoardo Tosca, Uwe Schindler)
 
 * SOLR-2636: Fix explain functionality for negative queries. (Tom Hill via yonik)
@@ -1719,7 +2051,7 @@ Bug Fixes
 * SOLR-2668: DIH multithreaded mode does not rollback on errors from 
   EntityProcessor (Frank Wesemann, shalin)
 
- Other Changes
+Other Changes
 ----------------------
 
 * SOLR-2629: Eliminate deprecation warnings in some JSPs.
@@ -2865,10 +3197,10 @@ Use of the "charset" option when configu
 Factories has been deprecated and will cause a warning to be logged.
 In future versions of Solr attempting to use this option will cause an
 error.  See SOLR-1410 for more information.
- * GreekLowerCaseFilterFactory
- * RussianStemFilterFactory
- * RussianLowerCaseFilterFactory
- * RussianLetterTokenizerFactory
+ - GreekLowerCaseFilterFactory
+ - RussianStemFilterFactory
+ - RussianLowerCaseFilterFactory
+ - RussianLetterTokenizerFactory
 
 DIH: Evaluator API has been changed in a non back-compatible way. Users who 
 have developed custom Evaluators will need to change their code according to 
@@ -2945,7 +3277,7 @@ New Features
  7. SOLR-680: Add StatsComponent. This gets simple statistics on matched numeric fields,
     including: min, max, mean, median, stddev.  (koji, ryan)
 
-    7.1 SOLR-1380: Added support for multi-valued fields (Harish Agarwal via gsingers)
+    - SOLR-1380: Added support for multi-valued fields (Harish Agarwal via gsingers)
 
  8. SOLR-561: Added Replication implemented in Java as a request handler. Supports index replication
     as well as configuration replication and exposes detailed statistics and progress information
@@ -3466,11 +3798,12 @@ Bug Fixes
 28. SOLR-1008: Fix stats.jsp XML encoding for <stat> item entries with ampersands in their names.  (ehatcher)
 
 29. SOLR-976: deleteByQuery is ignored when deleteById is placed prior to deleteByQuery in a <delete>.
-    Now both delete by id and delete by query can be specified at the same time as follows. (koji)
+    Now both delete by id and delete by query can be specified at the same time as follows.
       <delete>
         <id>05991</id><id>06000</id>
         <query>office:Bridgewater</query><query>office:Osaka</query>
       </delete>
+    (koji)
 
 30. SOLR-1016: HTTP 503 error changes 500 in SolrCore (koji)
 
@@ -3729,7 +4062,7 @@ Other Changes
  8. SOLR-875: Upgraded to Lucene 2.9-dev (r723985) and consolidated the BitSet implementations (Michael Busch, gsingers)
 
  9. SOLR-819: Upgraded to Lucene 2.9-dev (r724059) to get access to Arabic public constructors (gsingers)
-                                                 and
+
 10. SOLR-900: Moved solrj into /src/solrj.  The contents of solr-common.jar is now included
     in the solr-solrj.jar. (ryan)
 
@@ -3813,10 +4146,10 @@ Other Changes
     (hossman)
 
 42. Upgraded to Lucene 2.9-dev r794238. Other changes include:
-    LUCENE-1614 - Use Lucene's DocIdSetIterator.NO_MORE_DOCS as the sentinel value.
-    LUCENE-1630 - Add acceptsDocsOutOfOrder method to Collector implementations.
-    LUCENE-1673, LUCENE-1701 - Trie has moved to Lucene core and renamed to NumericRangeQuery.
-    LUCENE-1662, LUCENE-1687 - Replace usage of ExtendedFieldCache by FieldCache.
+    - LUCENE-1614 - Use Lucene's DocIdSetIterator.NO_MORE_DOCS as the sentinel value.
+    - LUCENE-1630 - Add acceptsDocsOutOfOrder method to Collector implementations.
+    - LUCENE-1673, LUCENE-1701 - Trie has moved to Lucene core and renamed to NumericRangeQuery.
+    - LUCENE-1662, LUCENE-1687 - Replace usage of ExtendedFieldCache by FieldCache.
     (shalin)
 
 42. SOLR-1241: Solr's CharFilter has been moved to Lucene. Remove CharFilter and related classes
@@ -3826,7 +4159,7 @@ Other Changes
 
 44. Upgraded to Lucene 2.9-dev r801856 (Mark Miller)
 
-45. SOLR1276: Added StatsComponentTest (Rafa�ł Ku�ć, gsingers)
+45. SOLR-1276: Added StatsComponentTest (Rafał Kuć, gsingers)
 
 46. SOLR-1377:  The TokenizerFactory API has changed to explicitly return a Tokenizer 
     rather then a TokenStream (that may be or may not be a Tokenizer).  This change 
@@ -3923,7 +4256,7 @@ Build
 
 Documentation
 ----------------------
- 1. SOLR-789: The javadoc of RandomSortField is not readable (Nicolas Lalev�Á�e via koji)
+ 1. SOLR-789: The javadoc of RandomSortField is not readable (Nicolas Lalevée via koji)
 
  2. SOLR-962: Note about null handling in ModifiableSolrParams.add javadoc
     (Kay Kay via hossman)
@@ -3968,8 +4301,8 @@ example solrconfig.xml) for more details
 In Solr 1.2, DateField did not enforce the canonical representation of
 the ISO 8601 format when parsing incoming data, and did not generation
 the canonical format when generating dates from "Date Math" strings
-(particularly as it pertains to milliseconds ending in trailing zeros)
--- As a result equivalent dates could not always be compared properly.
+(particularly as it pertains to milliseconds ending in trailing zeros).
+As a result equivalent dates could not always be compared properly.
 This problem is corrected in Solr 1.3, but DateField users that might
 have been affected by indexing inconsistent formats of equivilent
 dates (ie: 1995-12-31T23:59:59Z vs 1995-12-31T23:59:59.000Z) may want
@@ -4292,7 +4625,7 @@ Changes in runtime behavior
 
  2. SOLR-689 / SOLR-695: If you have used "MultiCore" functionality in an unreleased
     version of 1.3-dev, many classes and configs have been renamed for the official 
-    1.3 release.  Speciffically, solr.xml has replaced multicore.xml, and uses a slightly 
+    1.3 release.  Speciffically, solr.xml has replaced multicore.xml, and uses a slightly
     different syntax.  The solrj classes: MultiCore{Request/Response/Params} have been 
     renamed:  CoreAdmin{Request/Response/Params}  (hossman, ryan, Henri Biestro)
 
@@ -4371,7 +4704,7 @@ Bug Fixes
  9. SOLR-294: Logging of elapsed time broken on Solaris because the date command
     there does not support the %s output format.  (bill)
 
-10. SOLR-136: Snappuller - "date -d" and locales don't mix.  (J�Á�rgen Hermann via    bill)
+10. SOLR-136: Snappuller - "date -d" and locales don't mix.  (Jürgen Hermann via bill)
 
 11. SOLR-333: Changed distributiondump.jsp to use Solr HOME instead of CWD to set path.
  
@@ -4421,8 +4754,8 @@ Bug Fixes
 27. SOLR-267: Changed logging to report number of hits, and also provide a mechanism to add log 
     messages to be output by the SolrCore via a NamedList toLog member variable.  
     (Will Johnson, yseeley, gsingers)
-    
-    SOLR-267: Removed adding values to the HTTP headers in SolrDispatchFilter (gsingers)
+
+    - SOLR-267: Removed adding values to the HTTP headers in SolrDispatchFilter (gsingers)
 
 28. SOLR-509: Moved firstSearcher event notification to the end of the SolrCore constructor 
     (Koji Sekiguchi via gsingers)

Modified: lucene/dev/branches/LUCENE-2878/solr/NOTICE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/NOTICE.txt?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/NOTICE.txt (original)
+++ lucene/dev/branches/LUCENE-2878/solr/NOTICE.txt Fri Sep 21 17:21:34 2012
@@ -310,12 +310,11 @@ Copyright 2004 Sun Microsystems, Inc. (R
 
 Copyright 2002-2008 by John Cowan (TagSoup -- http://ccil.org/~cowan/XML/tagsoup/)
 
-Copyright (C) 1999-2007 Shigeru Chiba. All Rights Reserved.
-(Javassist, MPL licensed: http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/)
-
 Copyright (C) 1994-2007 by the Xiph.org Foundation, http://www.xiph.org/ (OggVorbis)
 
-Scannotation (C) Bill Burke
+Copyright 2012 Kohei Taketa juniversalchardet (http://code.google.com/p/juniversalchardet/)
+
+Lasse Collin and others, XZ for Java (http://tukaani.org/xz/java.html)
 
 =========================================================================
 ==  Language Detection Notices                                         ==

Modified: lucene/dev/branches/LUCENE-2878/solr/README.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/README.txt?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/README.txt (original)
+++ lucene/dev/branches/LUCENE-2878/solr/README.txt Fri Sep 21 17:21:34 2012
@@ -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
 
 

Modified: lucene/dev/branches/LUCENE-2878/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/build.xml?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/build.xml (original)
+++ lucene/dev/branches/LUCENE-2878/solr/build.xml Fri Sep 21 17:21:34 2012
@@ -26,7 +26,7 @@
     <echo message="Use 'ant clean' to clean compiled files." />
     <echo message="Use 'ant compile' to compile the source code." />
     <echo message="Use 'ant dist' to build the project WAR and JAR files." />
-    <echo message="Use 'ant javadocs' to build javadocs under build/docs/api" />
+    <echo message="Use 'ant documentation' to build documentation." />
     <echo message="Use 'ant generate-maven-artifacts' to generate maven artifacts." />
     <echo message="Use 'ant package' to generate zip, tgz for distribution." />
     <!--<echo message="Use 'ant luke' to start luke.  see: http://luke.googlecode.com" />-->
@@ -133,12 +133,47 @@
           depends="test-core, test-contrib"/>
   <target name="test-core" description="Runs the core and solrj unit tests."
           depends="test-solr-core, test-solrj"/>
+  <target name="pitest" description="Validate, then run core, solrj, and contrib unit tests."
+          depends="pitest-core, pitest-contrib"/>
   <target name="compile-test" description="Compile unit tests."
           depends="compile-solr-test-framework, compile-test-solr-core, compile-test-solrj, compile-test-contrib"/>
   <target name="javadocs" description="Calls javadocs-all, javadocs-solrj, and javadocs-test-framework"
-          depends="javadocs-all,javadocs-solrj,javadocs-test-framework"/>
+          depends="javadocs-solr-core,javadocs-solrj,javadocs-test-framework,javadocs-contrib"/>
+  <target name="documentation" description="Generate all documentation"
+    depends="javadocs,changes-to-html,process-webpages"/>
   <target name="compile-core" depends="compile-solr-core" unless="solr.core.compiled"/>
   
+  <target name="process-webpages" depends="define-lucene-javadoc-url"> <!--depends="resolve-pegdown">-->
+    <makeurl property="process-webpages.buildfiles" separator="|">
+      <fileset dir="." includes="core/build.xml,test-framework/build.xml,solrj/build.xml,contrib/**/build.xml"/>
+    </makeurl>
+    <!--
+      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
+      via string parameter, that must be splitted by the XSL at '|'.
+    --> 
+    <xslt in="${ant.file}" out="${javadoc.dir}/index.html" style="site/xsl/index.xsl" force="true">
+      <outputproperty name="method" value="html"/>
+      <outputproperty name="version" value="4.0"/>
+      <outputproperty name="encoding" value="UTF-8"/>
+      <outputproperty name="indent" value="yes"/>
+      <param name="buildfiles" expression="${process-webpages.buildfiles}"/>
+      <param name="version" expression="${version}"/>
+      <param name="luceneJavadocUrl" expression="${lucene.javadoc.url}"/>
+    </xslt>
+    
+    <!--nothing at the moment:
+    <pegdown todir="${javadoc.dir}">
+      <fileset dir="." includes="MIGRATE.txt,JRE_VERSION_MIGRATION.txt"/>
+      <globmapper from="*.txt" to="*.html"/>
+    </pegdown>
+    -->
+
+    <copy todir="${javadoc.dir}">
+      <fileset dir="site/html" includes="**/*"/>
+    </copy>
+  </target>
+
   <!-- Solr core targets -->
   <target name="test-solr-core" description="Test solr core">
     <ant dir="core" target="test" inheritAll="false">
@@ -152,16 +187,28 @@
       <propertyset refid="uptodate.and.compiled.properties"/>
     </ant>
   </target>
-  <target name="javadocs-solrj">
-    <ant dir="solrj" target="javadocs" inheritAll="false">
-      <propertyset refid="uptodate.and.compiled.properties"/>
-    </ant>
-  </target>
 
   <!-- Solr contrib targets -->
   <target name="test-contrib" description="Run contrib unit tests.">
     <contrib-crawl target="test" failonerror="true"/>
   </target>
+
+  <!-- Pitest targets -->
+  <target name="pitest-core" description="PiTest solr core">
+    <ant dir="core" target="pitest" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+
+  <target name="pitest-solrj" description="PiTest java client">
+    <ant dir="solrj" target="pitest" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+  </target>
+
+  <target name="pitest-contrib" description="Run contrib PiTests.">
+    <contrib-crawl target="pitest" failonerror="false"/>
+  </target>
   
   <!-- test-framework targets -->
   <target name="javadocs-test-framework">
@@ -180,10 +227,10 @@
         <exclude name="example/start.jar" />
         <exclude name="example/exampledocs/post.jar" />
         <exclude name="example/solr-webapp/**" />
+        <exclude name="package/**"/>
       </additional-excludes>
       <additional-filters>
         <replaceregex pattern="jetty([^/]+)$" replace="jetty" flags="gi" />
-        <replaceregex pattern="apache-solr-commons-csv-([^/]+)$" replace="apache-solr-commons-csv" flags="gi" />
         <replaceregex pattern="slf4j-([^/]+)$" replace="slf4j" flags="gi" />
         <replaceregex pattern="(bcmail|bcprov)-([^/]+)$" replace="\1" flags="gi" />
       </additional-filters>
@@ -225,13 +272,15 @@
   </target>
 
   <!-- rat sources -->
-  <target name="rat-sources">
-    <sequential>
-       <ant dir="core" target="rat-sources" inheritall="false"/>
-       <ant dir="solrj" target="rat-sources" inheritall="false"/>
-       <ant dir="test-framework" target="rat-sources" inheritall="false"/>
-      <contrib-crawl target="rat-sources" failonerror="true"/>
-    </sequential>
+  <!-- rat-sources-typedef is *not* a useless dependency. do not remove -->
+  <target name="rat-sources" depends="rat-sources-typedef">
+    <subant target="rat-sources" inheritall="false" >
+      <propertyset refid="uptodate.and.compiled.properties"/>
+      <fileset dir="core" includes="build.xml"/>
+      <fileset dir="solrj" includes="build.xml"/>
+      <fileset dir="test-framework" includes="build.xml"/>
+    </subant>
+    <contrib-crawl target="rat-sources" failonerror="true"/>
   </target>
   
   <!-- Clean targets -->
@@ -320,6 +369,9 @@
     <!-- Exclude clover license files incompatible with the ASL -->
     <delete dir="${svn.export.dir}/lucene/tools/clover"/>
 
+    <build-changes changes.src.dir="${svn.export.dir}/lucene/site/changes"
+                   changes.target.dir="${svn.export.dir}/solr/docs/changes"/>
+
     <tar destfile="${source.package.file}" compression="gzip" longfile="gnu">
       <tarfileset dir="${svn.export.dir}"
                   prefix="${fullnamever}"
@@ -368,7 +420,7 @@
 
   <target name="create-package"
           description="Packages the Solr Binary Distribution"
-          depends="init-dist, dist, example, javadocs">
+          depends="init-dist, dist, example, documentation">
     <mkdir dir="${dest}/${fullnamever}"/>
     <delete includeemptydirs="true">
       <fileset dir="${example}/solr-webapp" includes="**/*"/>
@@ -386,8 +438,9 @@
       <tarfileset dir="."
                   prefix="${fullnamever}"
                   includes="LICENSE.txt NOTICE.txt CHANGES.txt README.txt example/**
-                             client/README.txt client/ruby/solr-ruby/** contrib/**/lib/**
-                             contrib/**/README.txt licenses/**"
+                            client/README.txt client/ruby/solr-ruby/** 
+                            contrib/**/lib/** contrib/**/README.txt 
+                            licenses/**"
                   excludes="lib/README.committers.txt **/data/ **/logs/* 
                             **/classes/ **/*.sh **/ivy.xml **/build.xml
                             **/bin/ **/*.iml **/*.ipr **/*.iws **/pom.xml 
@@ -401,9 +454,11 @@
                   includes="example/**/*.sh example/**/bin/" />
       <tarfileset dir="."
                   prefix="${fullnamever}"
-                  includes="dist/*.jar dist/*.war dist/solrj-lib/*"
+                  includes="dist/*.jar dist/*.war 
+                            dist/solrj-lib/*
+                            dist/test-framework/**"
                   excludes="**/*.tgz **/*.zip **/*.md5 **/*src*.jar **/*docs*.jar **/*.sha1" />
-      <tarfileset dir="${dest}/docs"
+      <tarfileset dir="${javadoc.dir}"
                   prefix="${fullnamever}/docs" />
     </tar>
     <make-checksums file="${package.dir}/${fullnamever}.tgz"/>
@@ -441,6 +496,10 @@
     </zip>
     <make-checksums file="${package.dir}/${fullnamever}.zip"/>
   </target>
+
+  <target name="changes-to-html">
+    <build-changes changes.src.dir="${changes.src.dir}" changes.target.dir="${changes.target.dir}" />
+  </target>
  
   <target name="sign-artifacts">
     <sign-artifacts-macro artifacts.dir="${package.dir}"/>
@@ -465,66 +524,15 @@
     </sequential>
   </target>
 
-  <!-- since we build across all contribs, we must ensure all deps
-       are resolved -->
-  <target name="javadocs-all"
-          depends="resolve,prep-lucene-jars,javadocs-dep,lucene-javadocs,define-lucene-javadoc-url"
-          description="Generate javadoc for core, java client and contrib">
-    <sequential>
-      <mkdir dir="${dest}/docs/api"/>
- 
-      <!-- TODO: optimize this, thats stupid here: -->
-      <subant target="module-jars-to-solr">
-        <fileset dir="contrib/analysis-extras" includes="build.xml"/>
-      </subant>
-
-      <!-- TODO: optimize this, thats stupid here: -->
-      <subant target="module-jars-to-solr">
-        <fileset dir="contrib/uima" includes="build.xml"/>
-      </subant>
-
-      <path id="javadoc.classpath">
-        <path refid="test.classpath"/>
-        <fileset dir="${dest}/contrib">
-          <include name="**/lucene-libs/**/*.jar"/>
-        </fileset>
-        <fileset dir="contrib">
-          <include name="**/lib/**/*.jar"/>
-          <exclude name="**/analysis-extras/lib/**/*icu4j*.jar"/> <!-- extraction/lib/ has this one -->
-        </fileset>
-        <pathelement location="${dest}/solr-solrj/classes/java"/>
-      </path>
- 
-      <solr-invoke-javadoc destdir="${dest}/docs/api"
-                      overview="core/src/java/overview.html">
-        <solrsources>
-          <packageset dir="core/src/java" />
-          <packageset dir="solrj/src/java" />
-          <packageset dir="contrib/analysis-extras/src/java"/>
-          <packageset dir="contrib/clustering/src/java"/>
-          <packageset dir="contrib/dataimporthandler/src/java"/>
-          <packageset dir="contrib/dataimporthandler-extras/src/java"/>
-          <packageset dir="contrib/extraction/src/java"/>
-          <packageset dir="contrib/langid/src/java"/>
-          <packageset dir="contrib/uima/src/java"/>
-          <group title="Core" packages="org.apache.*" />
-          <group title="SolrJ" packages="org.apache.solr.common.*,org.apache.solr.client.solrj.*,org.apache.zookeeper.*" />
-          <group title="contrib: Clustering" packages="org.apache.solr.handler.clustering*" />
-          <group title="contrib: DataImportHandler" packages="org.apache.solr.handler.dataimport*" />
-          <group title="contrib: Solr Cell" packages="org.apache.solr.handler.extraction*" />
-          <group title="contrib: Solr LangId" packages="org.apache.solr.update.processor.LanguageIdentifier*,org.apache.solr.update.processor.LangIdParams*,org.apache.solr.update.processor.DetectedLanguage*" />
-          <group title="contrib: Solr UIMA" packages="org.apache.solr.uima*" />
-        </solrsources>
-      </solr-invoke-javadoc>
-    </sequential>
-  </target>
-
   <!-- TODO: does solr have any other docs we should check? -->
   <!-- TODO: also integrate checkJavaDocs.py, which does more checks -->
-  <target name="javadocs-lint" depends="javadocs">
-    <check-broken-links dir="build/docs"/>
+  <target name="documentation-lint" depends="documentation">
+    <check-broken-links dir="${javadoc.dir}"/>
+    <!-- TODO: add missing package.htmls and bump this to level=package -->
+    <check-missing-javadocs dir="${javadoc.dir}" level="none"/>
   </target>
  
+  <!-- install-maven-tasks is *not* a useless dependency. do not remove -->
   <target name="generate-maven-artifacts" depends="install-maven-tasks">
     <sequential>
       <subant target="dist-maven" inheritall="false" >
@@ -537,8 +545,28 @@
       <contrib-crawl target="dist-maven"/>
     </sequential>
   </target>
+
+  <!-- only used by validate below, it needs the lucene artifacts installed: can we do this better?! -->
+  <target name="-generate-lucene-maven-artifacts">
+    <subant target="generate-maven-artifacts" inheritall="false">
+       <propertyset refid="uptodate.and.compiled.properties"/>
+       <fileset dir="${common.dir}" includes="build.xml"/>
+    </subant>
+  </target>
  
- 
+  <target name="-validate-maven-dependencies" depends="compile-tools, install-maven-tasks, load-custom-tasks">
+    <sequential>
+      <subant target="-validate-maven-dependencies" failonerror="true" inheritall="false">
+        <propertyset refid="uptodate.and.compiled.properties"/>
+        <fileset dir="core" includes="build.xml"/>
+        <fileset dir="solrj" includes="build.xml"/>
+        <fileset dir="test-framework" includes="build.xml"/>
+        <fileset dir="webapp" includes="build.xml"/>
+      </subant>
+      <contrib-crawl target="-validate-maven-dependencies"/>
+    </sequential>
+  </target>
+	 
   <!-- ========================================================================= -->
   <!-- ========================= COMMITTERS' HELPERS =========================== -->
   <!-- ========================================================================= -->
@@ -635,12 +663,6 @@
     </exec>
   </target>
  
-  <target name="svn-up">
-    <exec executable="${svn.exe}">
-      <arg value="update"/>
-    </exec>
-  </target>
-
   <property name="analysis-common.res.dir"  value="../lucene/analysis/common/src/resources/org/apache/lucene/analysis"/>
   <property name="analysis-kuromoji.res.dir"  value="../lucene/analysis/kuromoji/src/resources/org/apache/lucene/analysis"/>
   <property name="analysis.conf.dest" value="${example}/solr/conf/lang"/>

Modified: lucene/dev/branches/LUCENE-2878/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/common-build.xml?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/common-build.xml (original)
+++ lucene/dev/branches/LUCENE-2878/solr/common-build.xml Fri Sep 21 17:21:34 2012
@@ -15,7 +15,7 @@
  limitations under the License.
 -->
 
-<project name="common-solr" default="default">
+<project name="common-solr" default="default" xmlns:rsel="antlib:org.apache.tools.ant.types.resources.selectors">
   <description>
     This file is designed for importing into a main build file, and not intended
     for standalone use.
@@ -25,9 +25,6 @@
   
   <property name="Name" value="Solr" />
   <property name="version" value="5.0-SNAPSHOT"/>
-  <condition property="version.contains.SNAPSHOT">
-    <contains casesensitive="true" string="${version}" substring="-SNAPSHOT"/>
-  </condition>
   <property name="fullname" value="apache-${ant.project.name}"/>
   <property name="fullnamever" value="${fullname}-${version}"/>
   <property name="final.name" value="${fullnamever}"/>
@@ -37,22 +34,26 @@
   <property name="javac.target" value="1.6"/>
   <property name="javac.args" value=""/>
   
-  <property name="dest" value="${common-solr.dir}/build" />
+  <property name="dest" location="${common-solr.dir}/build" />
   <property name="build.dir" location="${dest}/${ant.project.name}"/>
   <property name="dist" location="${common-solr.dir}/dist"/>
   <property name="package.dir" location="${common-solr.dir}/package"/>
   <property name="maven.dist.dir" location="${package.dir}/maven"/>
   <property name="lucene-libs" location="${dest}/lucene-libs" />
-  <property name="tests.userdir" value="src/test-files"/>
-  <property name="example" value="${common-solr.dir}/example" />
-  <property name="javadoc.dir" location="${build.dir}/docs/api"/>
-  <property name="tests.loggingfile" value="${common-solr.dir}/testlogging.properties"/>
+  <property name="tests.userdir" location="src/test-files"/>
+  <property name="example" location="${common-solr.dir}/example" />
+  <property name="javadoc.dir" location="${dest}/docs"/>
+  <property name="tests.loggingfile" location="${common-solr.dir}/testlogging.properties"/>
   <property name="tests.cleanthreads.sysprop" value="perClass"/>
 
+  <property name="changes.target.dir" location="${dest}/docs/changes"/>
+  <property name="license.dir" location="${common-solr.dir}/licenses"/>
+
   <import file="${common-solr.dir}/../lucene/module-build.xml"/>
 
   <path id="additional.dependencies">
-  	<fileset dir="${common-solr.dir}/lib" excludes="${common.classpath.excludes}"/>
+  	<fileset dir="${common-solr.dir}/core/lib" excludes="${common.classpath.excludes}"/>
+  	<fileset dir="${common-solr.dir}/solrj/lib" excludes="${common.classpath.excludes}"/>
   	<fileset dir="${common-solr.dir}/example/lib" excludes="${common.classpath.excludes}"/>
   	<fileset dir="${common-solr.dir}/example/example-DIH/solr/db/lib" excludes="${common.classpath.excludes}"/>  	
   	<fileset dir="lib" excludes="${common.classpath.excludes}" erroronmissingdir="false"/>
@@ -193,25 +194,56 @@
   <property name="lucenedocs" location="${common.dir}/build/docs"/>
 
   <!-- dependency to ensure all lucene javadocs are present -->
-  <target name="lucene-javadocs" depends="javadocs-lucene-core,javadocs-analyzers-common,javadocs-analyzers-icu,javadocs-analyzers-kuromoji,javadocs-analyzers-phonetic,javadocs-analyzers-smartcn,javadocs-analyzers-morfologik,javadocs-analyzers-stempel,javadocs-analyzers-uima,javadocs-suggest,javadocs-grouping,javadocs-queries,javadocs-queryparser,javadocs-highlighter,javadocs-memory,javadocs-misc,javadocs-spatial"/>
+  <target name="lucene-javadocs" depends="javadocs-lucene-core,javadocs-analyzers-common,javadocs-analyzers-icu,javadocs-analyzers-kuromoji,javadocs-analyzers-phonetic,javadocs-analyzers-smartcn,javadocs-analyzers-morfologik,javadocs-analyzers-stempel,javadocs-analyzers-uima,javadocs-suggest,javadocs-grouping,javadocs-queries,javadocs-queryparser,javadocs-highlighter,javadocs-memory,javadocs-misc,javadocs-spatial,javadocs-test-framework"/>
 
   <!-- create javadocs for the current module -->
-  <target name="javadocs" depends="compile-core,define-lucene-javadoc-url,lucene-javadocs">
+  <target name="javadocs" depends="compile-core,define-lucene-javadoc-url,lucene-javadocs,javadocs-solr-core">
    	<sequential>
-      <mkdir dir="${javadoc.dir}"/>
+      <mkdir dir="${javadoc.dir}/${name}"/>
       <solr-invoke-javadoc>
         <solrsources>
           <packageset dir="${src.dir}"/>
         </solrsources>
+        <links>
+          <link href="../solr-solrj"/>
+          <link href="../solr-core"/>
+        </links>
       </solr-invoke-javadoc>
-      <solr-jarify basedir="${javadoc.dir}" destfile="${build.dir}/${final.name}-javadoc.jar"/>
+      <solr-jarify basedir="${javadoc.dir}/${name}" destfile="${build.dir}/${final.name}-javadoc.jar"/>
      </sequential>
   </target>
 
+  <target name="check-solr-core-javadocs-uptodate" unless="solr-core-javadocs.uptodate">
+    <uptodate property="solr-core-javadocs.uptodate" targetfile="${build.dir}/solr-core/apache-solr-core-${version}-javadoc.jar">
+       <srcfiles dir="${common-solr.dir}/core/src/java" includes="**/*.java"/>
+    </uptodate>
+  </target>
+
+  <target name="check-solrj-javadocs-uptodate" unless="solrj-javadocs.uptodate">
+    <uptodate property="solrj-javadocs.uptodate" targetfile="${build.dir}/solr-solrj/apache-solr-solrj-${version}-javadoc.jar">
+       <srcfiles dir="${common-solr.dir}/solrj/src/java" includes="**/*.java"/>
+    </uptodate>
+  </target>
+
+  <target name="javadocs-solr-core" depends="check-solr-core-javadocs-uptodate" unless="solr-core-javadocs.uptodate">
+    <ant dir="${common-solr.dir}/core" target="javadocs" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+    <property name="solr-core-javadocs.uptodate" value="true"/>
+  </target>
+
+  <target name="javadocs-solrj" depends="check-solrj-javadocs-uptodate" unless="solrj-javadocs.uptodate">
+    <ant dir="${common-solr.dir}/solrj" target="javadocs" inheritAll="false">
+      <propertyset refid="uptodate.and.compiled.properties"/>
+    </ant>
+    <property name="solrj-javadocs.uptodate" value="true"/>
+  </target>
+
   <!-- macro to create solr javadocs with links to lucene. make sure calling task depends on lucene-javadocs -->
   <macrodef name="solr-invoke-javadoc">
       <element name="solrsources" optional="yes"/>
-      <attribute name="destdir" default="${javadoc.dir}"/>
+      <element name="links" optional="yes"/>
+      <attribute name="destdir" default="${javadoc.dir}/${name}"/>
       <attribute name="title" default="${Name} ${version} ${name} API"/>
       <attribute name="overview" default="${src.dir}/overview.html"/>
     <sequential>
@@ -236,29 +268,26 @@
           <link offline="true" href="${lucene.javadoc.url}memory" packagelistloc="${lucenedocs}/memory"/>
           <link offline="true" href="${lucene.javadoc.url}misc" packagelistloc="${lucenedocs}/misc"/>
           <link offline="true" href="${lucene.javadoc.url}spatial" packagelistloc="${lucenedocs}/spatial"/>
+          <links/>
           <link href=""/>
         </sources>
       </invoke-javadoc>
     </sequential>
   </macrodef>
 
-  <target name="define-lucene-javadoc-url"
-          depends="define-lucene-javadoc-url-SNAPSHOT,define-lucene-javadoc-url-release"/>
-
-  <target name="define-lucene-javadoc-url-SNAPSHOT" if="version.contains.SNAPSHOT">
-    <makeurl file="${common.dir}/build/docs/" validate="false" property="lucene.javadoc.url"/>
-  </target>
-
-  <target name="define-lucene-javadoc-url-release" unless="version.contains.SNAPSHOT">
-    <loadproperties>
-      <propertyresource name="version"/>
-      <filterchain>
-        <replaceregex pattern="[.]" replace="_" flags="g"/>
-        <prefixlines prefix="underscore.version="/>
-      </filterchain>
-    </loadproperties>
-    <property name="lucene.javadoc.url"
-              value="http://lucene.apache.org/java/${underscore.version}/"/>
+  <target name="define-lucene-javadoc-url" unless="lucene.javadoc.url">
+    <script language="javascript"><![CDATA[
+      var url, version = project.getProperty('version');
+      if (version.contains('-SNAPSHOT')) {
+        importClass(java.io.File);
+        url = new File(project.getProperty('common.dir'), 'build' + File.separator + 'docs').toURI().toASCIIString();
+        if (!(/\/$/.test(url))) url += '/';
+      } else {
+        version = version.replace('.', '_');
+        url = 'http://lucene.apache.org/core/' + version + '/';
+      }
+      project.setProperty('lucene.javadoc.url', url);
+    ]]></script>
   </target>
 
   <target name="jar-src" depends="init">
@@ -274,6 +303,37 @@
   <target name="dist-maven"
           depends="filter-pom-templates, install-maven-tasks, m2-deploy-solr-parent-pom, dist-maven-common"/>
 
+  <target name="dist-maven-src-java"
+          depends="filter-pom-templates, install-maven-tasks, m2-deploy-solr-parent-pom, dist-maven-common-src-java"/>
+
+  <target name="-validate-maven-dependencies">
+    <property name="top.level.dir" location="${common.dir}/.."/>
+    <pathconvert property="pom.xml">
+      <mapper>
+        <chainedmapper>
+          <globmapper from="${top.level.dir}*" to="${filtered.pom.templates.dir}*"/>
+          <globmapper from="*build.xml" to="*pom.xml"/>
+        </chainedmapper>
+      </mapper>
+      <path location="${ant.file}"/>
+    </pathconvert>
+    <m2-validate-dependencies pom.xml="${pom.xml}" licenseDirectory="${license.dir}">
+      <additional-filters>
+        <replaceregex pattern="jetty([^/]+)$" replace="jetty" flags="gi" />
+        <replaceregex pattern="slf4j-([^/]+)$" replace="slf4j" flags="gi" />
+        <replaceregex pattern="(bcmail|bcprov)-([^/]+)$" replace="\1" flags="gi" />
+      </additional-filters>
+      <excludes>
+        <rsel:or>
+          <rsel:name name="**/lucene-*.jar" handledirsep="true"/>
+          <rsel:name name="**/solr-*.jar" handledirsep="true"/>
+          <!-- TODO: figure out what is going on here with servlet-apis -->
+          <rsel:name name="**/*servlet*.jar" handledirsep="true"/>
+        </rsel:or>
+      </excludes>
+    </m2-validate-dependencies>
+  </target>
+
   <!-- Solr core targets -->
   <target name="compile-solr-core" description="Compile Solr core." unless="solr.core.compiled">
     <ant dir="${common-solr.dir}/core" target="compile-core" inheritAll="false">
@@ -358,10 +418,15 @@
   <target name="compile-contrib" description="Compile contrib modules">
   	<contrib-crawl target="compile-core"/>
   </target>
+  
   <target name="compile-test-contrib" description="Compile contrib modules' tests">
   	<contrib-crawl target="compile-test"/>
   </target>
 
+  <target name="javadocs-contrib" description="Compile contrib modules">
+  	<contrib-crawl target="javadocs"/>
+  </target>
+
   <target name="contribs-add-to-war">
     <mkdir dir="${dest}/web"/>
     <delete dir="${dest}/web" includes="**/*" failonerror="false"/>

Modified: lucene/dev/branches/LUCENE-2878/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java (original)
+++ lucene/dev/branches/LUCENE-2878/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java Fri Sep 21 17:21:34 2012
@@ -27,7 +27,9 @@ import org.apache.lucene.analysis.Analyz
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;
 import org.apache.lucene.collation.ICUCollationKeyAnalyzer;
+import org.apache.lucene.index.GeneralField;
 import org.apache.lucene.index.IndexableField;
+import org.apache.lucene.index.StorableField;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.SortField;
 import org.apache.lucene.search.TermRangeQuery;
@@ -210,7 +212,7 @@ public class ICUCollationField extends F
   }
 
   @Override
-  public void write(TextResponseWriter writer, String name, IndexableField f) throws IOException {
+  public void write(TextResponseWriter writer, String name, StorableField f) throws IOException {
     writer.writeStr(name, f.stringValue(), true);
   }
 

Modified: lucene/dev/branches/LUCENE-2878/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java (original)
+++ lucene/dev/branches/LUCENE-2878/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java Fri Sep 21 17:21:34 2012
@@ -194,7 +194,7 @@ public class CarrotClusteringEngine exte
       try {
         configDir = "configDir=" + new File(resourceLoader.getConfigDir()).getAbsolutePath() + ", ";
       } catch (Exception ignored) {
-        // If we get the exception, the resource loader implementation 
+        // If we get the exception, the resource loader implementation
         // probably does not support getConfigDir(). Not a big problem.
       }