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 2011/05/02 15:51:22 UTC

svn commit: r1098566 [17/22] - in /lucene/dev/branches/docvalues: ./ dev-tools/eclipse/ dev-tools/idea/.idea/ dev-tools/idea/lucene/contrib/ant/ dev-tools/idea/lucene/contrib/db/bdb-je/ dev-tools/idea/lucene/contrib/db/bdb/ dev-tools/idea/lucene/contri...

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocParser.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocParser.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocParser.java Mon May  2 13:50:57 2011
@@ -1,136 +1,136 @@
-package org.apache.lucene.benchmark.byTask.feeds;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-
-/** 
- * Parser for trec doc content, invoked on doc text excluding <DOC> and <DOCNO>
- * which are handled in TrecContentSource. Required to be stateless and hence thread safe. 
- */
-public abstract class TrecDocParser {
-
-  /** Types of trec parse paths, */
-  public enum ParsePathType { GOV2, FBIS, FT, FR94, LATIMES }
-  
-  /** trec parser type used for unknown extensions */
-  public static final ParsePathType DEFAULT_PATH_TYPE  = ParsePathType.GOV2;
-
-  static final Map<ParsePathType,TrecDocParser> pathType2parser = new HashMap<ParsePathType,TrecDocParser>();
-  static {
-    pathType2parser.put(ParsePathType.GOV2, new TrecGov2Parser());
-    pathType2parser.put(ParsePathType.FBIS, new TrecFBISParser());
-    pathType2parser.put(ParsePathType.FR94, new TrecFR94Parser());
-    pathType2parser.put(ParsePathType.FT, new TrecFTParser());
-    pathType2parser.put(ParsePathType.LATIMES, new TrecLATimesParser());
-  }
-
-  static final Map<String,ParsePathType> pathName2Type = new HashMap<String,ParsePathType>();
-  static {
-    for (ParsePathType ppt : ParsePathType.values()) {
-      pathName2Type.put(ppt.name().toUpperCase(Locale.ENGLISH),ppt);
-    }
-  }
-  
-  /** max length of walk up from file to its ancestors when looking for a known path type */ 
-  private static final int MAX_PATH_LENGTH = 10;
-  
-  /**
-   * Compute the path type of a file by inspecting name of file and its parents
-   */
-  public static ParsePathType pathType(File f) {
-    int pathLength = 0;
-    while (f != null && ++pathLength < MAX_PATH_LENGTH) {
-      ParsePathType ppt = pathName2Type.get(f.getName().toUpperCase(Locale.ENGLISH));
-      if (ppt!=null) {
-        return ppt;
-      }
-      f = f.getParentFile();
-    }
-    return DEFAULT_PATH_TYPE;
-  }
-  
-  /** 
-   * parse the text prepared in docBuf into a result DocData, 
-   * no synchronization is required.
-   * @param docData reusable result
-   * @param name name that should be set to the result
-   * @param trecSrc calling trec content source  
-   * @param docBuf text to parse  
-   * @param pathType type of parsed file, or null if unknown - may be used by 
-   * parsers to alter their behavior according to the file path type. 
-   */  
-  public abstract DocData parse(DocData docData, String name, TrecContentSource trecSrc, 
-      StringBuilder docBuf, ParsePathType pathType) throws IOException, InterruptedException;
-  
-  /** 
-   * strip tags from <code>buf</code>: each tag is replaced by a single blank.
-   * @return text obtained when stripping all tags from <code>buf</code> (Input StringBuilder is unmodified).
-   */
-  public static String stripTags(StringBuilder buf, int start) {
-    return stripTags(buf.substring(start),0);
-  }
-
-  /** 
-   * strip tags from input.
-   * @see #stripTags(StringBuilder, int)
-   */
-  public static String stripTags(String buf, int start) {
-    if (start>0) {
-      buf = buf.substring(0);
-    }
-    return buf.replaceAll("<[^>]*>", " ");
-  }
-  
-  /**
-   * Extract from <code>buf</code> the text of interest within specified tags
-   * @param buf entire input text
-   * @param startTag tag marking start of text of interest 
-   * @param endTag tag marking end of text of interest
-   * @param maxPos if &ge; 0 sets a limit on start of text of interest
-   * @return text of interest or null if not found
-   */
-  public static String extract(StringBuilder buf, String startTag, String endTag, int maxPos, String noisePrefixes[]) {
-    int k1 = buf.indexOf(startTag);
-    if (k1>=0 && (maxPos<0 || k1<maxPos)) {
-      k1 += startTag.length();
-      int k2 = buf.indexOf(endTag,k1);
-      if (k2>=0 && (maxPos<0 || k2<maxPos)) { // found end tag with allowed range
-        if (noisePrefixes != null) {
-          for (String noise : noisePrefixes) {
-            int k1a = buf.indexOf(noise,k1);
-            if (k1a>=0 && k1a<k2) {
-              k1 = k1a + noise.length();
-            }
-          }          
-        }
-        return buf.substring(k1,k2).trim();
-      }
-    }
-    return null;
-  }
-
-  //public static void main(String[] args) {
-  //  System.out.println(stripTags("is it true that<space>2<<second space>><almost last space>1<one more space>?",0));
-  //}
-
-}
+package org.apache.lucene.benchmark.byTask.feeds;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+/** 
+ * Parser for trec doc content, invoked on doc text excluding <DOC> and <DOCNO>
+ * which are handled in TrecContentSource. Required to be stateless and hence thread safe. 
+ */
+public abstract class TrecDocParser {
+
+  /** Types of trec parse paths, */
+  public enum ParsePathType { GOV2, FBIS, FT, FR94, LATIMES }
+  
+  /** trec parser type used for unknown extensions */
+  public static final ParsePathType DEFAULT_PATH_TYPE  = ParsePathType.GOV2;
+
+  static final Map<ParsePathType,TrecDocParser> pathType2parser = new HashMap<ParsePathType,TrecDocParser>();
+  static {
+    pathType2parser.put(ParsePathType.GOV2, new TrecGov2Parser());
+    pathType2parser.put(ParsePathType.FBIS, new TrecFBISParser());
+    pathType2parser.put(ParsePathType.FR94, new TrecFR94Parser());
+    pathType2parser.put(ParsePathType.FT, new TrecFTParser());
+    pathType2parser.put(ParsePathType.LATIMES, new TrecLATimesParser());
+  }
+
+  static final Map<String,ParsePathType> pathName2Type = new HashMap<String,ParsePathType>();
+  static {
+    for (ParsePathType ppt : ParsePathType.values()) {
+      pathName2Type.put(ppt.name().toUpperCase(Locale.ENGLISH),ppt);
+    }
+  }
+  
+  /** max length of walk up from file to its ancestors when looking for a known path type */ 
+  private static final int MAX_PATH_LENGTH = 10;
+  
+  /**
+   * Compute the path type of a file by inspecting name of file and its parents
+   */
+  public static ParsePathType pathType(File f) {
+    int pathLength = 0;
+    while (f != null && ++pathLength < MAX_PATH_LENGTH) {
+      ParsePathType ppt = pathName2Type.get(f.getName().toUpperCase(Locale.ENGLISH));
+      if (ppt!=null) {
+        return ppt;
+      }
+      f = f.getParentFile();
+    }
+    return DEFAULT_PATH_TYPE;
+  }
+  
+  /** 
+   * parse the text prepared in docBuf into a result DocData, 
+   * no synchronization is required.
+   * @param docData reusable result
+   * @param name name that should be set to the result
+   * @param trecSrc calling trec content source  
+   * @param docBuf text to parse  
+   * @param pathType type of parsed file, or null if unknown - may be used by 
+   * parsers to alter their behavior according to the file path type. 
+   */  
+  public abstract DocData parse(DocData docData, String name, TrecContentSource trecSrc, 
+      StringBuilder docBuf, ParsePathType pathType) throws IOException, InterruptedException;
+  
+  /** 
+   * strip tags from <code>buf</code>: each tag is replaced by a single blank.
+   * @return text obtained when stripping all tags from <code>buf</code> (Input StringBuilder is unmodified).
+   */
+  public static String stripTags(StringBuilder buf, int start) {
+    return stripTags(buf.substring(start),0);
+  }
+
+  /** 
+   * strip tags from input.
+   * @see #stripTags(StringBuilder, int)
+   */
+  public static String stripTags(String buf, int start) {
+    if (start>0) {
+      buf = buf.substring(0);
+    }
+    return buf.replaceAll("<[^>]*>", " ");
+  }
+  
+  /**
+   * Extract from <code>buf</code> the text of interest within specified tags
+   * @param buf entire input text
+   * @param startTag tag marking start of text of interest 
+   * @param endTag tag marking end of text of interest
+   * @param maxPos if &ge; 0 sets a limit on start of text of interest
+   * @return text of interest or null if not found
+   */
+  public static String extract(StringBuilder buf, String startTag, String endTag, int maxPos, String noisePrefixes[]) {
+    int k1 = buf.indexOf(startTag);
+    if (k1>=0 && (maxPos<0 || k1<maxPos)) {
+      k1 += startTag.length();
+      int k2 = buf.indexOf(endTag,k1);
+      if (k2>=0 && (maxPos<0 || k2<maxPos)) { // found end tag with allowed range
+        if (noisePrefixes != null) {
+          for (String noise : noisePrefixes) {
+            int k1a = buf.indexOf(noise,k1);
+            if (k1a>=0 && k1a<k2) {
+              k1 = k1a + noise.length();
+            }
+          }          
+        }
+        return buf.substring(k1,k2).trim();
+      }
+    }
+    return null;
+  }
+
+  //public static void main(String[] args) {
+  //  System.out.println(stripTags("is it true that<space>2<<second space>><almost last space>1<one more space>?",0));
+  //}
+
+}

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecFBISParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecFBISParser.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecFBISParser.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecFBISParser.java Mon May  2 13:50:57 2011
@@ -1,65 +1,65 @@
-package org.apache.lucene.benchmark.byTask.feeds;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-import java.util.Date;
-
-/**
- * Parser for the FBIS docs in trec disks 4+5 collection format
- */
-public class TrecFBISParser extends TrecDocParser {
-
-  private static final String HEADER = "<HEADER>";
-  private static final String HEADER_END = "</HEADER>";
-  private static final int HEADER_END_LENGTH = HEADER_END.length();
-  
-  private static final String DATE1 = "<DATE1>";
-  private static final String DATE1_END = "</DATE1>";
-  
-  private static final String TI = "<TI>";
-  private static final String TI_END = "</TI>";
-
-  @Override
-  public DocData parse(DocData docData, String name, TrecContentSource trecSrc, 
-      StringBuilder docBuf, ParsePathType pathType) throws IOException, InterruptedException {
-    int mark = 0; // that much is skipped
-    // optionally skip some of the text, set date, title
-    Date date = null;
-    String title = null;
-    int h1 = docBuf.indexOf(HEADER);
-    if (h1>=0) {
-      int h2 = docBuf.indexOf(HEADER_END,h1);
-      mark = h2+HEADER_END_LENGTH;
-      // date...
-      String dateStr = extract(docBuf, DATE1, DATE1_END, h2, null);
-      if (dateStr != null) {
-        date = trecSrc.parseDate(dateStr);
-      }
-      // title...
-      title = extract(docBuf, TI, TI_END, h2, null);
-    }
-    docData.clear();
-    docData.setName(name);
-    docData.setDate(date);
-    docData.setTitle(title);
-    docData.setBody(stripTags(docBuf, mark).toString());
-    return docData;
-  }
-
-}
+package org.apache.lucene.benchmark.byTask.feeds;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.IOException;
+import java.util.Date;
+
+/**
+ * Parser for the FBIS docs in trec disks 4+5 collection format
+ */
+public class TrecFBISParser extends TrecDocParser {
+
+  private static final String HEADER = "<HEADER>";
+  private static final String HEADER_END = "</HEADER>";
+  private static final int HEADER_END_LENGTH = HEADER_END.length();
+  
+  private static final String DATE1 = "<DATE1>";
+  private static final String DATE1_END = "</DATE1>";
+  
+  private static final String TI = "<TI>";
+  private static final String TI_END = "</TI>";
+
+  @Override
+  public DocData parse(DocData docData, String name, TrecContentSource trecSrc, 
+      StringBuilder docBuf, ParsePathType pathType) throws IOException, InterruptedException {
+    int mark = 0; // that much is skipped
+    // optionally skip some of the text, set date, title
+    Date date = null;
+    String title = null;
+    int h1 = docBuf.indexOf(HEADER);
+    if (h1>=0) {
+      int h2 = docBuf.indexOf(HEADER_END,h1);
+      mark = h2+HEADER_END_LENGTH;
+      // date...
+      String dateStr = extract(docBuf, DATE1, DATE1_END, h2, null);
+      if (dateStr != null) {
+        date = trecSrc.parseDate(dateStr);
+      }
+      // title...
+      title = extract(docBuf, TI, TI_END, h2, null);
+    }
+    docData.clear();
+    docData.setName(name);
+    docData.setDate(date);
+    docData.setTitle(title);
+    docData.setBody(stripTags(docBuf, mark).toString());
+    return docData;
+  }
+
+}

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecFR94Parser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecFR94Parser.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecFR94Parser.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecFR94Parser.java Mon May  2 13:50:57 2011
@@ -1,66 +1,66 @@
-package org.apache.lucene.benchmark.byTask.feeds;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-import java.util.Date;
-
-/**
- * Parser for the FR94 docs in trec disks 4+5 collection format
- */
-public class TrecFR94Parser extends TrecDocParser {
-
-  private static final String TEXT = "<TEXT>";
-  private static final int TEXT_LENGTH = TEXT.length();
-  private static final String TEXT_END = "</TEXT>";
-  
-  private static final String DATE = "<DATE>";
-  private static final String[] DATE_NOISE_PREFIXES = {
-    "DATE:",
-    "date:", //TODO improve date extraction for this format
-    "t.c.",
-  };
-  private static final String DATE_END = "</DATE>";
-  
-  //TODO can we also extract title for this format?
-  
-  @Override
-  public DocData parse(DocData docData, String name, TrecContentSource trecSrc, 
-      StringBuilder docBuf, ParsePathType pathType) throws IOException, InterruptedException {
-    int mark = 0; // that much is skipped
-    // optionally skip some of the text, set date (no title?)
-    Date date = null;
-    int h1 = docBuf.indexOf(TEXT);
-    if (h1>=0) {
-      int h2 = docBuf.indexOf(TEXT_END,h1);
-      mark = h1+TEXT_LENGTH;
-      // date...
-      String dateStr = extract(docBuf, DATE, DATE_END, h2, DATE_NOISE_PREFIXES);
-      if (dateStr != null) {
-        dateStr = stripTags(dateStr,0).toString();
-        date = trecSrc.parseDate(dateStr.trim());
-      }
-    }
-    docData.clear();
-    docData.setName(name);
-    docData.setDate(date);
-    docData.setBody(stripTags(docBuf, mark).toString());
-    return docData;
-  }
-
-}
+package org.apache.lucene.benchmark.byTask.feeds;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.IOException;
+import java.util.Date;
+
+/**
+ * Parser for the FR94 docs in trec disks 4+5 collection format
+ */
+public class TrecFR94Parser extends TrecDocParser {
+
+  private static final String TEXT = "<TEXT>";
+  private static final int TEXT_LENGTH = TEXT.length();
+  private static final String TEXT_END = "</TEXT>";
+  
+  private static final String DATE = "<DATE>";
+  private static final String[] DATE_NOISE_PREFIXES = {
+    "DATE:",
+    "date:", //TODO improve date extraction for this format
+    "t.c.",
+  };
+  private static final String DATE_END = "</DATE>";
+  
+  //TODO can we also extract title for this format?
+  
+  @Override
+  public DocData parse(DocData docData, String name, TrecContentSource trecSrc, 
+      StringBuilder docBuf, ParsePathType pathType) throws IOException, InterruptedException {
+    int mark = 0; // that much is skipped
+    // optionally skip some of the text, set date (no title?)
+    Date date = null;
+    int h1 = docBuf.indexOf(TEXT);
+    if (h1>=0) {
+      int h2 = docBuf.indexOf(TEXT_END,h1);
+      mark = h1+TEXT_LENGTH;
+      // date...
+      String dateStr = extract(docBuf, DATE, DATE_END, h2, DATE_NOISE_PREFIXES);
+      if (dateStr != null) {
+        dateStr = stripTags(dateStr,0).toString();
+        date = trecSrc.parseDate(dateStr.trim());
+      }
+    }
+    docData.clear();
+    docData.setName(name);
+    docData.setDate(date);
+    docData.setBody(stripTags(docBuf, mark).toString());
+    return docData;
+  }
+
+}

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecFTParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecFTParser.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecFTParser.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecFTParser.java Mon May  2 13:50:57 2011
@@ -1,57 +1,57 @@
-package org.apache.lucene.benchmark.byTask.feeds;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-import java.util.Date;
-
-/**
- * Parser for the FT docs in trec disks 4+5 collection format
- */
-public class TrecFTParser extends TrecDocParser {
-
-  private static final String DATE = "<DATE>";
-  private static final String DATE_END = "</DATE>";
-  
-  private static final String HEADLINE = "<HEADLINE>";
-  private static final String HEADLINE_END = "</HEADLINE>";
-
-  @Override
-  public DocData parse(DocData docData, String name, TrecContentSource trecSrc, 
-      StringBuilder docBuf, ParsePathType pathType) throws IOException, InterruptedException {
-    int mark = 0; // that much is skipped
-
-    // date...
-    Date date = null;
-    String dateStr = extract(docBuf, DATE, DATE_END, -1, null);
-    if (dateStr != null) {
-      date = trecSrc.parseDate(dateStr);
-    }
-     
-    // title...
-    String title = extract(docBuf, HEADLINE, HEADLINE_END, -1, null);
-
-    docData.clear();
-    docData.setName(name);
-    docData.setDate(date);
-    docData.setTitle(title);
-    docData.setBody(stripTags(docBuf, mark).toString());
-    return docData;
-  }
-
-}
+package org.apache.lucene.benchmark.byTask.feeds;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.IOException;
+import java.util.Date;
+
+/**
+ * Parser for the FT docs in trec disks 4+5 collection format
+ */
+public class TrecFTParser extends TrecDocParser {
+
+  private static final String DATE = "<DATE>";
+  private static final String DATE_END = "</DATE>";
+  
+  private static final String HEADLINE = "<HEADLINE>";
+  private static final String HEADLINE_END = "</HEADLINE>";
+
+  @Override
+  public DocData parse(DocData docData, String name, TrecContentSource trecSrc, 
+      StringBuilder docBuf, ParsePathType pathType) throws IOException, InterruptedException {
+    int mark = 0; // that much is skipped
+
+    // date...
+    Date date = null;
+    String dateStr = extract(docBuf, DATE, DATE_END, -1, null);
+    if (dateStr != null) {
+      date = trecSrc.parseDate(dateStr);
+    }
+     
+    // title...
+    String title = extract(docBuf, HEADLINE, HEADLINE_END, -1, null);
+
+    docData.clear();
+    docData.setName(name);
+    docData.setDate(date);
+    docData.setTitle(title);
+    docData.setBody(stripTags(docBuf, mark).toString());
+    return docData;
+  }
+
+}

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecLATimesParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecLATimesParser.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecLATimesParser.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecLATimesParser.java Mon May  2 13:50:57 2011
@@ -1,71 +1,71 @@
-package org.apache.lucene.benchmark.byTask.feeds;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-import java.util.Date;
-
-/**
- * Parser for the FT docs in trec disks 4+5 collection format
- */
-public class TrecLATimesParser extends TrecDocParser {
-
-  private static final String DATE = "<DATE>";
-  private static final String DATE_END = "</DATE>";
-  private static final String DATE_NOISE = "day,"; // anything aftre the ',' 
-
-  private static final String SUBJECT = "<SUBJECT>";
-  private static final String SUBJECT_END = "</SUBJECT>";
-  private static final String HEADLINE = "<HEADLINE>";
-  private static final String HEADLINE_END = "</HEADLINE>";
-  
-  @Override
-  public DocData parse(DocData docData, String name, TrecContentSource trecSrc, 
-      StringBuilder docBuf, ParsePathType pathType) throws IOException, InterruptedException {
-    int mark = 0; // that much is skipped
-
-    // date...
-    Date date = null;
-    String dateStr = extract(docBuf, DATE, DATE_END, -1, null);
-    if (dateStr != null) {
-      int d2a = dateStr.indexOf(DATE_NOISE);
-      if (d2a > 0) {
-        dateStr = dateStr.substring(0,d2a+3); // we need the "day" part
-      }
-      dateStr = stripTags(dateStr,0).toString();
-      date = trecSrc.parseDate(dateStr.trim());
-    }
-     
-    // title... first try with SUBJECT, them with HEADLINE
-    String title = extract(docBuf, SUBJECT, SUBJECT_END, -1, null);
-    if (title==null) {
-      title = extract(docBuf, HEADLINE, HEADLINE_END, -1, null);
-    }
-    if (title!=null) {
-      title = stripTags(title,0).toString().trim();
-    }
-    
-    docData.clear();
-    docData.setName(name);
-    docData.setDate(date);
-    docData.setTitle(title);
-    docData.setBody(stripTags(docBuf, mark).toString());
-    return docData;
-  }
-
-}
+package org.apache.lucene.benchmark.byTask.feeds;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.IOException;
+import java.util.Date;
+
+/**
+ * Parser for the FT docs in trec disks 4+5 collection format
+ */
+public class TrecLATimesParser extends TrecDocParser {
+
+  private static final String DATE = "<DATE>";
+  private static final String DATE_END = "</DATE>";
+  private static final String DATE_NOISE = "day,"; // anything aftre the ',' 
+
+  private static final String SUBJECT = "<SUBJECT>";
+  private static final String SUBJECT_END = "</SUBJECT>";
+  private static final String HEADLINE = "<HEADLINE>";
+  private static final String HEADLINE_END = "</HEADLINE>";
+  
+  @Override
+  public DocData parse(DocData docData, String name, TrecContentSource trecSrc, 
+      StringBuilder docBuf, ParsePathType pathType) throws IOException, InterruptedException {
+    int mark = 0; // that much is skipped
+
+    // date...
+    Date date = null;
+    String dateStr = extract(docBuf, DATE, DATE_END, -1, null);
+    if (dateStr != null) {
+      int d2a = dateStr.indexOf(DATE_NOISE);
+      if (d2a > 0) {
+        dateStr = dateStr.substring(0,d2a+3); // we need the "day" part
+      }
+      dateStr = stripTags(dateStr,0).toString();
+      date = trecSrc.parseDate(dateStr.trim());
+    }
+     
+    // title... first try with SUBJECT, them with HEADLINE
+    String title = extract(docBuf, SUBJECT, SUBJECT_END, -1, null);
+    if (title==null) {
+      title = extract(docBuf, HEADLINE, HEADLINE_END, -1, null);
+    }
+    if (title!=null) {
+      title = stripTags(title,0).toString().trim();
+    }
+    
+    docData.clear();
+    docData.setName(name);
+    docData.setDate(date);
+    docData.setTitle(title);
+    docData.setBody(stripTags(docBuf, mark).toString());
+    return docData;
+  }
+
+}

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecParserByPath.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecParserByPath.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecParserByPath.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecParserByPath.java Mon May  2 13:50:57 2011
@@ -1,33 +1,33 @@
-package org.apache.lucene.benchmark.byTask.feeds;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-/**
- * Parser for trec docs which selects the parser to apply according 
- * to the source files path, defaulting to {@link TrecGov2Parser}.
- */
-public class TrecParserByPath extends TrecDocParser {
-
-  @Override
-  public DocData parse(DocData docData, String name, TrecContentSource trecSrc, 
-      StringBuilder docBuf, ParsePathType pathType) throws IOException, InterruptedException {
-    return pathType2parser.get(pathType).parse(docData, name, trecSrc, docBuf, pathType);
-  }
-
-}
+package org.apache.lucene.benchmark.byTask.feeds;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.IOException;
+/**
+ * Parser for trec docs which selects the parser to apply according 
+ * to the source files path, defaulting to {@link TrecGov2Parser}.
+ */
+public class TrecParserByPath extends TrecDocParser {
+
+  @Override
+  public DocData parse(DocData docData, String name, TrecContentSource trecSrc, 
+      StringBuilder docBuf, ParsePathType pathType) throws IOException, InterruptedException {
+    return pathType2parser.get(pathType).parse(docData, name, trecSrc, docBuf, pathType);
+  }
+
+}

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTask.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTask.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTask.java Mon May  2 13:50:57 2011
@@ -25,6 +25,7 @@ import org.apache.lucene.index.IndexDele
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.index.LogMergePolicy;
+import org.apache.lucene.index.TieredMergePolicy;
 import org.apache.lucene.index.MergeScheduler;
 import org.apache.lucene.index.ConcurrentMergeScheduler;
 import org.apache.lucene.index.MergePolicy;
@@ -150,6 +151,9 @@ public class CreateIndexTask extends Per
         LogMergePolicy logMergePolicy = (LogMergePolicy) iwConf.getMergePolicy();
         logMergePolicy.setUseCompoundFile(isCompound);
         logMergePolicy.setMergeFactor(config.get("merge.factor",OpenIndexTask.DEFAULT_MERGE_PFACTOR));
+      } else if(iwConf.getMergePolicy() instanceof TieredMergePolicy) {
+        TieredMergePolicy tieredMergePolicy = (TieredMergePolicy) iwConf.getMergePolicy();
+        tieredMergePolicy.setUseCompoundFile(isCompound);
       }
     }
     final double ramBuffer = config.get("ram.flush.mb",OpenIndexTask.DEFAULT_RAM_FLUSH_MB);

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewAnalyzerTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewAnalyzerTask.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewAnalyzerTask.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewAnalyzerTask.java Mon May  2 13:50:57 2011
@@ -20,9 +20,7 @@ import org.apache.lucene.benchmark.byTas
 import org.apache.lucene.util.Version;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringTokenizer;
+import java.util.*;
 import java.lang.reflect.Constructor;
 
 /**
@@ -54,20 +52,32 @@ public class NewAnalyzerTask extends Per
   public int doLogic() throws IOException {
     String className = null;
     try {
-      if (current >= analyzerClassNames.size())
-      {
+      if (current >= analyzerClassNames.size()) {
         current = 0;
       }
       className = analyzerClassNames.get(current++);
-      if (className == null || className.equals(""))
-      {
-        className = "org.apache.lucene.analysis.standard.StandardAnalyzer"; 
+      Analyzer analyzer = null;
+      if (null == className || 0 == className.length()) {
+        className = "org.apache.lucene.analysis.standard.StandardAnalyzer";
       }
-      if (className.indexOf(".") == -1  || className.startsWith("standard."))//there is no package name, assume o.a.l.analysis
-      {
-        className = "org.apache.lucene.analysis." + className;
+      if (-1 == className.indexOf(".")) {
+        try {
+          // If no package, first attempt to instantiate a core analyzer
+          String coreClassName = "org.apache.lucene.analysis.core." + className;
+          analyzer = createAnalyzer(coreClassName);
+          className = coreClassName;
+        } catch (ClassNotFoundException e) {
+          // If not a core analyzer, try the base analysis package 
+          className = "org.apache.lucene.analysis." + className;
+          analyzer = createAnalyzer(className);
+        }
+      } else {
+        if (className.startsWith("standard.")) {
+          className = "org.apache.lucene.analysis." + className;
+        }
+        analyzer = createAnalyzer(className);
       }
-      getRunData().setAnalyzer(createAnalyzer(className));
+      getRunData().setAnalyzer(analyzer);
       System.out.println("Changed Analyzer to: " + className);
     } catch (Exception e) {
       throw new RuntimeException("Error creating Analyzer: " + className, e);

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewCollationAnalyzerTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewCollationAnalyzerTask.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewCollationAnalyzerTask.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewCollationAnalyzerTask.java Mon May  2 13:50:57 2011
@@ -24,6 +24,7 @@ import java.util.StringTokenizer;
 
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.util.Version;
 
 /**
  * Task to support benchmarking collation.
@@ -65,8 +66,8 @@ public class NewCollationAnalyzerTask ex
     
     final Class<? extends Analyzer> clazz = Class.forName(impl.className)
         .asSubclass(Analyzer.class);
-    Constructor<? extends Analyzer> ctor = clazz.getConstructor(collatorClazz);
-    return ctor.newInstance(collator);
+    Constructor<? extends Analyzer> ctor = clazz.getConstructor(Version.class, collatorClazz);
+    return ctor.newInstance(Version.LUCENE_CURRENT, collator);
   }
   
   @Override

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewShingleAnalyzerTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewShingleAnalyzerTask.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewShingleAnalyzerTask.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/NewShingleAnalyzerTask.java Mon May  2 13:50:57 2011
@@ -17,13 +17,11 @@ package org.apache.lucene.benchmark.byTa
  * limitations under the License.
  */
 
-import java.lang.reflect.Constructor;
 import java.util.StringTokenizer;
 
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper;
 import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.util.Version;
 
 /**
  * Task to support benchmarking ShingleFilter / ShingleAnalyzerWrapper
@@ -45,26 +43,26 @@ public class NewShingleAnalyzerTask exte
   }
 
   private void setAnalyzer() throws Exception {
-    Class<? extends Analyzer> clazz = null;
-    Analyzer wrappedAnalyzer;
-    try {
-      if (analyzerClassName == null || analyzerClassName.equals("")) {
-        analyzerClassName 
-          = "org.apache.lucene.analysis.standard.StandardAnalyzer"; 
+    Analyzer wrappedAnalyzer = null;
+    if (null == analyzerClassName || 0 == analyzerClassName.length()) {
+      analyzerClassName = "org.apache.lucene.analysis.standard.StandardAnalyzer";
+    } 
+    if (-1 == analyzerClassName.indexOf(".")) {
+      String coreClassName = "org.apache.lucene.analysis.core." + analyzerClassName;
+      try {
+        // If there is no package, first attempt to instantiate a core analyzer
+        wrappedAnalyzer = NewAnalyzerTask.createAnalyzer(coreClassName);
+        analyzerClassName = coreClassName;
+      } catch (ClassNotFoundException e) {
+        // If this is not a core analyzer, try the base analysis package 
+        analyzerClassName = "org.apache.lucene.analysis." + analyzerClassName;
+        wrappedAnalyzer = NewAnalyzerTask.createAnalyzer(analyzerClassName);
       }
-      if (analyzerClassName.indexOf(".") == -1 
-          || analyzerClassName.startsWith("standard.")) {
-        //there is no package name, assume o.a.l.analysis
+    } else {    
+      if (analyzerClassName.startsWith("standard.")) {
         analyzerClassName = "org.apache.lucene.analysis." + analyzerClassName;
       }
-      clazz = Class.forName(analyzerClassName).asSubclass(Analyzer.class);
-      // first try to use a ctor with version parameter (needed for many new 
-      // Analyzers that have no default one anymore)
-      Constructor<? extends Analyzer> ctor = clazz.getConstructor(Version.class);
-      wrappedAnalyzer = ctor.newInstance(Version.LUCENE_CURRENT);
-    } catch (NoSuchMethodException e) {
-      // otherwise use default ctor
-      wrappedAnalyzer = clazz.newInstance();
+      wrappedAnalyzer = NewAnalyzerTask.createAnalyzer(analyzerClassName);
     }
     ShingleAnalyzerWrapper analyzer 
       = new ShingleAnalyzerWrapper(wrappedAnalyzer, maxShingleSize);
@@ -77,7 +75,7 @@ public class NewShingleAnalyzerTask exte
     try {
       setAnalyzer();
       System.out.println
-        ("Changed Analyzer to: ShingleAnalyzerWrapper, wrapping ShingleFilter over" 
+        ("Changed Analyzer to: ShingleAnalyzerWrapper, wrapping ShingleFilter over " 
          + analyzerClassName);
     } catch (Exception e) {
       throw new RuntimeException("Error creating Analyzer", e);

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTask.java Mon May  2 13:50:57 2011
@@ -30,6 +30,7 @@ import org.apache.lucene.benchmark.byTas
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Fieldable;
 import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.index.MultiFields;
 import org.apache.lucene.search.Collector;
 import org.apache.lucene.search.TopDocs;
 import org.apache.lucene.search.MultiTermQuery;
@@ -95,9 +96,9 @@ public abstract class ReadTask extends P
     // optionally warm and add num docs traversed to count
     if (withWarm()) {
       Document doc = null;
-      Bits delDocs = reader.getDeletedDocs();
+      Bits delDocs = MultiFields.getDeletedDocs(reader);
       for (int m = 0; m < reader.maxDoc(); m++) {
-        if (!delDocs.get(m)) {
+        if (null == delDocs || ! delDocs.get(m)) {
           doc = reader.document(m);
           res += (doc == null ? 0 : 1);
         }

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java Mon May  2 13:50:57 2011
@@ -22,6 +22,7 @@ import java.util.List;
 
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;
 import org.apache.lucene.benchmark.byTask.PerfRunData;
 import org.apache.lucene.benchmark.byTask.feeds.DocMaker;
 import org.apache.lucene.document.Document;
@@ -98,8 +99,11 @@ public class ReadTokensTask extends Perf
       // reset the TokenStream to the first token
       stream.reset();
 
-      while(stream.incrementToken())
+      TermToBytesRefAttribute termAtt = stream.getAttribute(TermToBytesRefAttribute.class);
+      while(stream.incrementToken()) {
+        termAtt.fillBytesRef();
         tokenCount++;
+      }
     }
     totalTokenCount += tokenCount;
     return tokenCount;

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/WriteLineDocTask.java Mon May  2 13:50:57 2011
@@ -43,7 +43,8 @@ import org.apache.lucene.document.Field;
  * <p>
  * The format of the output is set according to the output file extension.
  * Compression is recommended when the output file is expected to be large.
- * See info on file extensions in {@link StreamUtils.Type}
+ * See info on file extensions in
+ * {@link org.apache.lucene.benchmark.byTask.utils.StreamUtils.Type}
  * <p> 
  * Supports the following parameters:
  * <ul>

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java Mon May  2 13:50:57 2011
@@ -29,7 +29,7 @@ import org.apache.lucene.analysis.Analyz
 import org.apache.lucene.analysis.BaseTokenStreamTestCase;
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
+import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;
 import org.apache.lucene.benchmark.BenchmarkTestCase;
 import org.apache.lucene.benchmark.byTask.feeds.DocMaker;
 import org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker;
@@ -96,7 +96,7 @@ public class TestPerfTasksLogic extends 
     assertTrue("Index does not exist?...!", IndexReader.indexExists(benchmark.getRunData().getDirectory()));
     // now we should be able to open the index for write. 
     IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(),
-        new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer())
+        new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random))
             .setOpenMode(OpenMode.APPEND));
     iw.close();
     IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
@@ -183,7 +183,7 @@ public class TestPerfTasksLogic extends 
 
     assertTrue("Index does not exist?...!", IndexReader.indexExists(benchmark.getRunData().getDirectory()));
     // now we should be able to open the index for write.
-    IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(), new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer()).setOpenMode(OpenMode.APPEND));
+    IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(), new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setOpenMode(OpenMode.APPEND));
     iw.close();
     IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
     assertEquals("100 docs were added to the index, this is what we expect to find!",100,ir.numDocs());
@@ -222,7 +222,7 @@ public class TestPerfTasksLogic extends 
 
     assertTrue("Index does not exist?...!", IndexReader.indexExists(benchmark.getRunData().getDirectory()));
     // now we should be able to open the index for write.
-    IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(), new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer()).setOpenMode(OpenMode.APPEND));
+    IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(), new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setOpenMode(OpenMode.APPEND));
     iw.close();
     IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
     assertEquals("1000 docs were added to the index, this is what we expect to find!",1000,ir.numDocs());
@@ -295,7 +295,7 @@ public class TestPerfTasksLogic extends 
     assertEquals("TestSearchTask was supposed to be called!",139,CountingSearchTestTask.numSearches);
     assertTrue("Index does not exist?...!", IndexReader.indexExists(benchmark.getRunData().getDirectory()));
     // now we should be able to open the index for write. 
-    IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(), new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer()).setOpenMode(OpenMode.APPEND));
+    IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(), new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setOpenMode(OpenMode.APPEND));
     iw.close();
     IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory(), true);
     assertEquals("1 docs were added to the index, this is what we expect to find!",1,ir.numDocs());
@@ -407,7 +407,7 @@ public class TestPerfTasksLogic extends 
     // Index the line docs
     String algLines2[] = {
       "# ----- properties ",
-      "analyzer=org.apache.lucene.analysis.MockAnalyzer",
+      "analyzer=org.apache.lucene.analysis.core.WhitespaceAnalyzer",
       "content.source=org.apache.lucene.benchmark.byTask.feeds.LineDocSource",
       "docs.file=" + lineFile.getAbsolutePath().replace('\\', '/'),
       "content.source.forever=false",
@@ -425,7 +425,7 @@ public class TestPerfTasksLogic extends 
 
     // now we should be able to open the index for write. 
     IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(),
-        new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer())
+        new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random))
             .setOpenMode(OpenMode.APPEND));
     iw.close();
 
@@ -448,7 +448,7 @@ public class TestPerfTasksLogic extends 
     // then build index from the same docs
     String algLines1[] = {
       "# ----- properties ",
-      "analyzer=org.apache.lucene.analysis.MockAnalyzer",
+      "analyzer=org.apache.lucene.analysis.core.WhitespaceAnalyzer",
       "content.source=org.apache.lucene.benchmark.byTask.feeds.LineDocSource",
       "docs.file=" + getReuters20LinesFile(),
       "# ----- alg ",
@@ -934,24 +934,24 @@ public class TestPerfTasksLogic extends 
   public void testCollator() throws Exception {
     // ROOT locale
     Benchmark benchmark = execBenchmark(getCollatorConfig("ROOT", "impl:jdk"));
-    CollationKeyAnalyzer expected = new CollationKeyAnalyzer(Collator
+    CollationKeyAnalyzer expected = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator
         .getInstance(new Locale("")));
     assertEqualCollation(expected, benchmark.getRunData().getAnalyzer(), "foobar");
     
     // specify just a language
     benchmark = execBenchmark(getCollatorConfig("de", "impl:jdk"));
-    expected = new CollationKeyAnalyzer(Collator.getInstance(new Locale("de")));
+    expected = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(new Locale("de")));
     assertEqualCollation(expected, benchmark.getRunData().getAnalyzer(), "foobar");
     
     // specify language + country
     benchmark = execBenchmark(getCollatorConfig("en,US", "impl:jdk"));
-    expected = new CollationKeyAnalyzer(Collator.getInstance(new Locale("en",
+    expected = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(new Locale("en",
         "US")));
     assertEqualCollation(expected, benchmark.getRunData().getAnalyzer(), "foobar");
     
     // specify language + country + variant
     benchmark = execBenchmark(getCollatorConfig("no,NO,NY", "impl:jdk"));
-    expected = new CollationKeyAnalyzer(Collator.getInstance(new Locale("no",
+    expected = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(new Locale("no",
         "NO", "NY")));
     assertEqualCollation(expected, benchmark.getRunData().getAnalyzer(), "foobar");
   }
@@ -962,11 +962,15 @@ public class TestPerfTasksLogic extends 
     TokenStream ts2 = a2.tokenStream("bogus", new StringReader(text));
     ts1.reset();
     ts2.reset();
-    CharTermAttribute termAtt1 = ts1.addAttribute(CharTermAttribute.class);
-    CharTermAttribute termAtt2 = ts2.addAttribute(CharTermAttribute.class);
+    TermToBytesRefAttribute termAtt1 = ts1.addAttribute(TermToBytesRefAttribute.class);
+    TermToBytesRefAttribute termAtt2 = ts2.addAttribute(TermToBytesRefAttribute.class);
     assertTrue(ts1.incrementToken());
     assertTrue(ts2.incrementToken());
-    assertEquals(termAtt1.toString(), termAtt2.toString());
+    BytesRef bytes1 = termAtt1.getBytesRef();
+    BytesRef bytes2 = termAtt2.getBytesRef();
+    termAtt1.fillBytesRef();
+    termAtt2.fillBytesRef();
+    assertEquals(bytes1, bytes2);
     assertFalse(ts1.incrementToken());
     assertFalse(ts2.incrementToken());
     ts1.close();
@@ -1017,18 +1021,18 @@ public class TestPerfTasksLogic extends 
                                       "two three four", "three four", 
                                       "three four five", "four five",
                                       "four five six", "five six" });
-    // MockAnalyzer, default maxShingleSize and outputUnigrams
+    // WhitespaceAnalyzer, default maxShingleSize and outputUnigrams
     benchmark = execBenchmark
-      (getShingleConfig("analyzer:MockAnalyzer"));
+      (getShingleConfig("analyzer:WhitespaceAnalyzer"));
     assertEqualShingle(benchmark.getRunData().getAnalyzer(), text,
                        new String[] { "one,two,three,", "one,two,three, four",
                                       "four", "four five", "five", "five six", 
                                       "six" });
     
-    // MockAnalyzer, maxShingleSize=3 and outputUnigrams=false
+    // WhitespaceAnalyzer, maxShingleSize=3 and outputUnigrams=false
     benchmark = execBenchmark
       (getShingleConfig
-        ("outputUnigrams:false,maxShingleSize:3,analyzer:MockAnalyzer"));
+        ("outputUnigrams:false,maxShingleSize:3,analyzer:WhitespaceAnalyzer"));
     assertEqualShingle(benchmark.getRunData().getAnalyzer(), text,
                        new String[] { "one,two,three, four", 
                                       "one,two,three, four five",

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/DocMakerTest.java Mon May  2 13:50:57 2011
@@ -21,6 +21,7 @@ import java.io.IOException;
 import java.util.Properties;
 
 import org.apache.lucene.analysis.MockAnalyzer;
+import org.apache.lucene.analysis.core.WhitespaceAnalyzer;
 import org.apache.lucene.benchmark.BenchmarkTestCase;
 import org.apache.lucene.benchmark.byTask.PerfRunData;
 import org.apache.lucene.benchmark.byTask.tasks.AddDocTask;
@@ -70,7 +71,7 @@ public class DocMakerTest extends Benchm
     Properties props = new Properties();
     
     // Indexing configuration.
-    props.setProperty("analyzer", MockAnalyzer.class.getName());
+    props.setProperty("analyzer", WhitespaceAnalyzer.class.getName());
     props.setProperty("content.source", OneDocSource.class.getName());
     props.setProperty("directory", "RAMDirectory");
     if (setIndexProps) {
@@ -99,7 +100,7 @@ public class DocMakerTest extends Benchm
     Properties props = new Properties();
     
     // Indexing configuration.
-    props.setProperty("analyzer", MockAnalyzer.class.getName());
+    props.setProperty("analyzer", WhitespaceAnalyzer.class.getName());
     props.setProperty("content.source", OneDocSource.class.getName());
     props.setProperty("directory", "RAMDirectory");
     if (setNormsProp) {

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/LineDocSourceTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/LineDocSourceTest.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/LineDocSourceTest.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/LineDocSourceTest.java Mon May  2 13:50:57 2011
@@ -27,6 +27,7 @@ import java.util.Properties;
 
 import org.apache.commons.compress.compressors.CompressorStreamFactory;
 import org.apache.lucene.analysis.MockAnalyzer;
+import org.apache.lucene.analysis.core.WhitespaceAnalyzer;
 import org.apache.lucene.benchmark.BenchmarkTestCase;
 import org.apache.lucene.benchmark.byTask.PerfRunData;
 import org.apache.lucene.benchmark.byTask.feeds.LineDocSource.HeaderLineParser;
@@ -121,7 +122,7 @@ public class LineDocSourceTest extends B
     }
     
     // Indexing configuration.
-    props.setProperty("analyzer", MockAnalyzer.class.getName());
+    props.setProperty("analyzer", WhitespaceAnalyzer.class.getName());
     props.setProperty("content.source", LineDocSource.class.getName());
     props.setProperty("directory", "RAMDirectory");
     props.setProperty("doc.stored", "true");

Modified: lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/alt/AltTestTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/alt/AltTestTask.java?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/alt/AltTestTask.java (original)
+++ lucene/dev/branches/docvalues/modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/alt/AltTestTask.java Mon May  2 13:50:57 2011
@@ -1,37 +1,37 @@
-package org.apache.lucene.benchmark.byTask.tasks.alt;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.apache.lucene.benchmark.byTask.PerfRunData;
-import org.apache.lucene.benchmark.byTask.tasks.PerfTask;
-
-/**
- * {@link PerfTask} which does nothing, but is in a different package 
- */
-public class AltTestTask extends PerfTask {
-  
-  public AltTestTask(PerfRunData runData) {
-    super(runData);
-  }
-
-  @Override
-  public int doLogic() throws Exception {
-    return 0;
-  }
-  
-}
+package org.apache.lucene.benchmark.byTask.tasks.alt;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.lucene.benchmark.byTask.PerfRunData;
+import org.apache.lucene.benchmark.byTask.tasks.PerfTask;
+
+/**
+ * {@link PerfTask} which does nothing, but is in a different package 
+ */
+public class AltTestTask extends PerfTask {
+  
+  public AltTestTask(PerfRunData runData) {
+    super(runData);
+  }
+
+  @Override
+  public int doLogic() throws Exception {
+    return 0;
+  }
+  
+}

Modified: lucene/dev/branches/docvalues/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/solr/CHANGES.txt?rev=1098566&r1=1098565&r2=1098566&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/solr/CHANGES.txt (original)
+++ lucene/dev/branches/docvalues/solr/CHANGES.txt Mon May  2 13:50:57 2011
@@ -60,6 +60,11 @@ Detailed Change List
 
 New Features
 ----------------------
+
+* SOLR-2378: A new, automaton-based, implementation of suggest (autocomplete) 
+  component, offering an order of magnitude smaller memory consumption
+  compared to ternary trees and jaspell and very fast lookups at runtime.
+  (Dawid Weiss)
   
 * SOLR-571: The autowarmCount for LRUCaches (LRUCache and FastLRUCache) now 
   supports "percentages" which get evaluated  relative the current size of 
@@ -75,7 +80,7 @@ New Features
 
 * SOLR-1682: (SOLR-236, SOLR-237, SOLR-1773, SOLR-1311) Search grouping / Field collapsing.
   (Martijn van Groningen, Emmanuel Keller, Shalin Shekhar Mangar,
-   Koji Sekiguchi, Iv�n de Prado, Ryan McKinley, Marc Sturlese, Peter Karich,
+   Koji Sekiguchi, Iván de Prado, Ryan McKinley, Marc Sturlese, Peter Karich,
    Bojan Smid, Charles Hornberger, Dieter Grad, Dmitry Lihachev, Doug Steigerwald,
    Karsten Sperling, Michael Gundlach, Oleg Gnatovskiy, Thomas Traeger,
    Harish Agarwal, yonik)
@@ -100,8 +105,10 @@ New Features
   levenshtein automata.  (rmuir)
    
 * SOLR-1873: SolrCloud - added shared/central config and core/shard managment via zookeeper,
-  built-in load balancing, and infrastructure for future SolrCloud work. 
-  (yonik, Mark Miller)
+  built-in load balancing, and infrastructure for future SolrCloud work. (yonik, Mark Miller)
+  Additional Work:
+  SOLR-2324: SolrCloud solr.xml parameters are not persisted by CoreContainer.
+  (Massimo Schiavon, Mark Miller)
 
 * SOLR-1729: Evaluation of NOW for date math is done only once per request for
   consistency, and is also propagated to shards in distributed search.
@@ -110,10 +117,34 @@ New Features
 
 * 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)
+  as results. (ryan with patches from grant, noble, cmale, yonik, Jan Høydahl)
 
 * SOLR-2417: Add explain info directly to return documents using ?fl=_explain_ (ryan)
+
+* SOLR-2396: Add CollationField, which is much more efficient than 
+  the Solr 3.x CollationKeyFilterFactory, and also supports 
+  Locale-sensitive range queries. (rmuir)
+
+* SOLR-2338: Add support for using <similarity/> in a schema's fieldType,
+  for customizing scoring on a per-field basis. (hossman, yonik, rmuir)
   
+* SOLR-2335: New 'field("...")' function syntax for refering to complex 
+  field names (containing whitespace or special characters) in functions.
+
+* SOLR-1709: Distributed support for Date and Numeric Range Faceting
+  (Peter Sturge, David Smiley, hossman)
+
+* SOLR-2383: /browse improvements: generalize range and date facet display
+  (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
+  (yonik)
+
+
 
 Optimizations
 ----------------------
@@ -199,7 +230,13 @@ Other Changes
 * SOLR-2423: FieldType argument changed from String to Object
   Conversion from SolrInputDocument > Object > Fieldable is now managed
   by FieldType rather then DocumentBuilder.  (ryan)
+  
+* SOLR-2061: Pull base tests out into a new Solr Test Framework module,
+  and publish binary, javadoc, and source test-framework jars. 
+  (Drew Farris, Robert Muir, Steve Rowe)
 
+* SOLR-2461: QuerySenderListener and AbstractSolrEventListener are 
+  now public (hossman)
 
 Documentation
 ----------------------
@@ -207,6 +244,8 @@ Documentation
 * SOLR-2232: Improved README info on solr.solr.home in examples
   (Eric Pugh and hossman)
 
+* LUCENE-3006: Building javadocs will fail on warnings by default.  Override with -Dfailonjavadocwarning=false (sarowe, gsingers)
+
 ==================  3.2.0-dev ==================
 Versions of Major Components
 ---------------------
@@ -214,26 +253,95 @@ Apache Lucene trunk
 Apache Tika 0.8
 Carrot2 3.4.2
 
-(No Changes)
 
-==================  3.1.0-dev ==================
+Upgrading from Solr 3.1
+----------------------
+  
+* The updateRequestProcessorChain for a RequestHandler is now defined
+  with update.chain rather than update.processor. The latter still works,
+  but has been deprecated.
+
+Detailed Change List
+----------------------
+
+New Features
+----------------------
+
+Optimizations
+----------------------
+
+Bug Fixes
+----------------------
+
+* SOLR-2445: Change the default qt to blank in form.jsp, because there is no "standard"
+  request handler unless you have it in your solrconfig.xml explicitly. (koji)
+
+* SOLR-2455: Prevent double submit of forms in admin interface.
+  (Jeffrey Chang via uschindler)
+
+* SOLR-2464: Fix potential slowness in QueryValueSource (the query() function) when
+  the query is very sparse and may not match any documents in a segment. (yonik)
+
+* SOLR-2469: When using java replication with replicateAfter=startup, the first
+  commit point on server startup is never removed. (yonik)
+
+* SOLR-2466: SolrJ's CommonsHttpSolrServer would retry requests on failure, regardless
+  of the configured maxRetries, due to HttpClient having it's own retry mechanism
+  by default.  The retryCount of HttpClient is now set to 0, and SolrJ does
+  the retry.  (yonik)
+
+* SOLR-2409: edismax parser - treat the text of a fielded query as a literal if the
+  fieldname does not exist.  For example Mission: Impossible should not search on
+  the "Mission" field unless it's a valid field in the schema.  (Ryan McKinley, yonik)
+
+* SOLR-2403: facet.sort=index reported incorrect results for distributed search
+  in a number of scenarios when facet.mincount>0.  This patch also adds some
+  performance/algorithmic improvements when (facet.sort=count && facet.mincount=1
+  && facet.limit=-1) and when (facet.sort=index && facet.mincount>0)  (yonik)
+
+* SOLR-2333: The "rename" core admin action does not persist the new name to solr.xml
+  (Rasmus Hahn, Paul R. Brown via Mark Miller)
+  
+* SOLR-2390: Performance of usePhraseHighlighter is terrible on very large Documents, 
+  regardless of hl.maxDocCharsToAnalyze. (Mark Miller)
+
+* SOLR-2474: The helper TokenStreams in analysis.jsp and AnalysisRequestHandlerBase
+  did not clear all attributes so they displayed incorrect attribute values for tokens
+  in later filter stages. (uschindler, rmuir, yonik)
+
+Other Changes
+----------------------
+
+* SOLR-2105: Rename RequestHandler param 'update.processor' to 'update.chain'.
+	(Jan Høydahl via Mark Miller)
+
+Build
+----------------------
+
+Documentation
+----------------------
+
+
+==================  3.1.0 ==================
 Versions of Major Components
 ---------------------
-Apache Lucene trunk
+Apache Lucene 3.1.0
 Apache Tika 0.8
 Carrot2 3.4.2
+Velocity 1.6.1 and Velocity Tools 2.0-beta3
+Apache UIMA 2.3.1-SNAPSHOT
 
 
 Upgrading from Solr 1.4
 ----------------------
 
-* The Lucene index format has changed and as a result, once you upgrade, 
+* 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.
 
-* The Solr JavaBin format has changed as of Solr 3.1. If you are using the 
+* The Solr JavaBin format has changed as of Solr 3.1. If you are using the
   JavaBin format, you will need to upgrade your SolrJ client. (SOLR-2034)
 
 * The experimental ALIAS command has been removed (SOLR-1637)
@@ -244,10 +352,10 @@ Upgrading from Solr 1.4
   is deprecated (SOLR-1696)
 
 * The deprecated HTMLStripReader, HTMLStripWhitespaceTokenizerFactory and
-  HTMLStripStandardTokenizerFactory were removed. To strip HTML tags, 
-  HTMLStripCharFilter should be used instead, and it works with any 
+  HTMLStripStandardTokenizerFactory were removed. To strip HTML tags,
+  HTMLStripCharFilter should be used instead, and it works with any
   Tokenizer of your choice.  (SOLR-1657)
-  
+
 * Field compression is no longer supported. Fields that were formerly
   compressed will be uncompressed as index segments are merged. For
   shorter fields, this may actually be an improvement, as the compression
@@ -256,24 +364,24 @@ Upgrading from Solr 1.4
 * SOLR-1845: The TermsComponent response format was changed so that the
   "terms" container is a map instead of a named list.  This affects
    response formats like JSON, but not XML. (yonik)
-  
+
 * SOLR-1876: All Analyzers and TokenStreams are now final to enforce
   the decorator pattern.  (rmuir, uschindler)
 
-* LUCENE-2608: Added the ability to specify the accuracy on a per request basis. 
+* LUCENE-2608: Added the ability to specify the accuracy on a per request basis.
   It is recommended that implementations of SolrSpellChecker should change over to the new SolrSpellChecker
   methods using the new SpellingOptions class, but are not required to.  While this change is
   backward compatible, the trunk version of Solr has already dropped support for all but the SpellingOptions method. (gsingers)
 
 * readercycle script was removed. (SOLR-2046)
 
-* In previous releases, sorting or evaluating function queries on 
+* In previous releases, sorting or evaluating function queries on
   fields that were "multiValued" (either by explicit declaration in
   schema.xml or by implict behavior because the "version" attribute on
   the schema was less then 1.2) did not generally work, but it would
   sometimes silently act as if it succeeded and order the docs
   arbitrarily.  Solr will now fail on any attempt to sort, or apply a
-  function to, multi-valued fields 
+  function to, multi-valued fields
 
 * The DataImportHandler jars are no longer included in the solr
   WAR and should be added in Solr's lib directory, or referenced
@@ -343,13 +451,13 @@ New Features
 * SOLR-1379: Add RAMDirectoryFactory for non-persistent in memory index storage.
   (Alex Baranov via yonik)
 
-* SOLR-1857: Synced Solr analysis with Lucene 3.1. Added KeywordMarkerFilterFactory 
-  and StemmerOverrideFilterFactory, which can be used to tune stemming algorithms. 
+* SOLR-1857: Synced Solr analysis with Lucene 3.1. Added KeywordMarkerFilterFactory
+  and StemmerOverrideFilterFactory, which can be used to tune stemming algorithms.
   Added factories for Bulgarian, Czech, Hindi, Turkish, and Wikipedia analysis. Improved the
   performance of SnowballPorterFilterFactory.  (rmuir)
 
-* SOLR-1657: Converted remaining TokenStreams to the Attributes-based API. All Solr 
-  TokenFilters now support custom Attributes, and some have improved performance: 
+* SOLR-1657: Converted remaining TokenStreams to the Attributes-based API. All Solr
+  TokenFilters now support custom Attributes, and some have improved performance:
   especially WordDelimiterFilter and CommonGramsFilter.  (rmuir, cmale, uschindler)
 
 * SOLR-1740: ShingleFilterFactory supports the "minShingleSize" and "tokenSeparator"
@@ -358,10 +466,10 @@ New Features
 
 * SOLR-744: ShingleFilterFactory supports the "outputUnigramsIfNoShingles"
   parameter, to output unigrams if the number of input tokens is fewer than
-  minShingleSize, and no shingles can be generated.  
+  minShingleSize, and no shingles can be generated.
   (Chris Harris via Steven Rowe)
 
-* SOLR-1923: PhoneticFilterFactory now has support for the 
+* SOLR-1923: PhoneticFilterFactory now has support for the
   Caverphone algorithm. (rmuir)
 
 * SOLR-1957: The VelocityResponseWriter contrib moved to core.
@@ -429,7 +537,7 @@ New Features
    (Ankul Garg, Jason Rutherglen, Shalin Shekhar Mangar, Grant Ingersoll, Robert Muir, ab)
 
 * SOLR-1568: Added "native" filtering support for PointType, GeohashField.  Added LatLonType with filtering support too.  See
-  	     http://wiki.apache.org/solr/SpatialSearch and the example.  Refactored some items in Lucene spatial. 
+  	     http://wiki.apache.org/solr/SpatialSearch and the example.  Refactored some items in Lucene spatial.
 	     Removed SpatialTileField as the underlying CartesianTier is broken beyond repair and is going to be moved. (gsingers)
 
 * SOLR-2128: Full parameter substitution for function queries.
@@ -484,7 +592,7 @@ Optimizations
 
 Bug Fixes
 ----------------------
-* SOLR-1769: Solr 1.4 Replication - Repeater throwing NullPointerException (Jörgen Rydenius via noble)  
+* SOLR-1769: Solr 1.4 Replication - Repeater throwing NullPointerException (Jörgen Rydenius via noble)
 
 * SOLR-1432: Make the new ValueSource.getValues(context,reader) delegate
   to the original ValueSource.getValues(reader) so custom sources
@@ -507,8 +615,8 @@ Bug Fixes
 * SOLR-1584: SolrJ - SolrQuery.setIncludeScore() incorrectly added
   fl=score to the parameter list instead of appending score to the
   existing field list. (yonik)
-  
-* SOLR-1580: Solr Configuration ignores 'mergeFactor' parameter, always 
+
+* SOLR-1580: Solr Configuration ignores 'mergeFactor' parameter, always
   uses Lucene default. (Lance Norskog via Mark Miller)
 
 * SOLR-1593: ReverseWildcardFilter didn't work for surrogate pairs
@@ -525,7 +633,7 @@ Bug Fixes
   set when streaming updates, rather than using UTF-8 as the HTTP headers
   indicated, leading to an encoding mismatch. (hossman, yonik)
 
-* SOLR-1587: A distributed search request with fl=score, didn't match 
+* SOLR-1587: A distributed search request with fl=score, didn't match
   the behavior of a non-distributed request since it only returned
   the id,score fields instead of all fields in addition to score. (yonik)
 
@@ -534,7 +642,7 @@ Bug Fixes
 * SOLR-1615: Backslash escaping did not work in quoted strings
   for local param arguments. (Wojtek Piaseczny, yonik)
 
-* SOLR-1628: log contains incorrect number of adds and deletes. 
+* SOLR-1628: log contains incorrect number of adds and deletes.
   (Thijs Vonk via yonik)
 
 * SOLR-343: Date faceting now respects facet.mincount limiting
@@ -562,7 +670,7 @@ Bug Fixes
   (never officially released) introduced another hanging bug due to
   connections not being released.
   (Attila Babo, Erik Hetzner, Johannes Tuchscherer via yonik)
-  
+
 * SOLR-1748, SOLR-1747, SOLR-1746, SOLR-1745, SOLR-1744: Streams and Readers
   retrieved from ContentStreams are not closed in various places, resulting
   in file descriptor leaks.
@@ -571,7 +679,7 @@ Bug Fixes
 * SOLR-1753: StatsComponent throws NPE when getting statistics for facets in distributed search
   (Janne Majaranta via koji)
 
-* SOLR-1736:In the slave , If 'mov'ing file does not succeed , copy the file (noble)  
+* SOLR-1736:In the slave , If 'mov'ing file does not succeed , copy the file (noble)
 
 * SOLR-1579: Fixes to XML escaping in stats.jsp
   (David Bowen and hossman)
@@ -625,7 +733,7 @@ Bug Fixes
 
 * SOLR-2047: ReplicationHandler should accept bool type for enable flag. (koji)
 
-* SOLR-1630: Fix spell checking collation issue related to token positions (rmuir, gsingers) 
+* SOLR-1630: Fix spell checking collation issue related to token positions (rmuir, gsingers)
 
 * SOLR-2100: The replication handler backup command didn't save the commit
   point and hence could fail when a newer commit caused the older commit point
@@ -634,7 +742,7 @@ Bug Fixes
 
 * SOLR-2114: Fixed parsing error in hsin function.  The function signature has changed slightly. (gsingers)
 
-* SOLR-2083: SpellCheckComponent misreports suggestions when distributed (James Dyer via gsingers)  
+* SOLR-2083: SpellCheckComponent misreports suggestions when distributed (James Dyer via gsingers)
 
 * SOLR-2111: Change exception handling in distributed faceting to work more
   like non-distributed faceting, change facet_counts/exception from a String
@@ -658,9 +766,9 @@ Bug Fixes
 * SOLR-2173: Suggester should always rebuild Lookup data if Lookup.load fails. (ab)
 
 * SOLR-2081: BaseResponseWriter.isStreamingDocs causes
-  SingleResponseWriter.end to be called 2x 
-  (Chris A. Mattmann via hossman) 
-  
+  SingleResponseWriter.end to be called 2x
+  (Chris A. Mattmann via hossman)
+
 * SOLR-2219: The init() method of every SolrRequestHandler was being
   called twice. (ambikeshwar singh and hossman)
 
@@ -685,7 +793,7 @@ Bug Fixes
 
 * SOLR-482: Provide more exception handling in CSVLoader (gsingers)
 
-* SOLR-1283: HTMLStripCharFilter sometimes threw a "Mark Invalid" exception. 
+* SOLR-1283: HTMLStripCharFilter sometimes threw a "Mark Invalid" exception.
   (Julien Coloos, hossman, yonik)
 
 * SOLR-2085: Improve SolrJ behavior when FacetComponent comes before
@@ -712,21 +820,29 @@ Bug Fixes
 
 * SOLR-2380: Distributed faceting could miss values when facet.sort=index
   and when facet.offset was greater than 0. (yonik)
-  
+
 * SOLR-1656: XIncludes and other HREFs in XML files loaded by ResourceLoader
-  are fixed to be resolved using the URI standard (RFC 2396). The system 
-  identifier is no longer a plain filename with path, it gets initialized 
-  using a custom URI scheme "solrres:". This scheme is resolved using a 
-  EntityResolver that utilizes ResourceLoader 
-  (org.apache.solr.common.util.SystemIdResolver). This makes all relative 
-  pathes in Solr's config files behave like expected. This change 
-  introduces some backwards breaks in the API: Some config classes 
-  (Config, SolrConfig, IndexSchema) were changed to take 
-  org.xml.sax.InputSource instead of InputStream. There may also be some 
-  backwards breaks in existing config files, it is recommended to check 
-  your config files / XSLTs and replace all XIncludes/HREFs that were 
+  are fixed to be resolved using the URI standard (RFC 2396). The system
+  identifier is no longer a plain filename with path, it gets initialized
+  using a custom URI scheme "solrres:". This scheme is resolved using a
+  EntityResolver that utilizes ResourceLoader
+  (org.apache.solr.common.util.SystemIdResolver). This makes all relative
+  pathes in Solr's config files behave like expected. This change
+  introduces some backwards breaks in the API: Some config classes
+  (Config, SolrConfig, IndexSchema) were changed to take
+  org.xml.sax.InputSource instead of InputStream. There may also be some
+  backwards breaks in existing config files, it is recommended to check
+  your config files / XSLTs and replace all XIncludes/HREFs that were
   hacked to use absolute paths to use relative ones. (uschindler)
 
+* SOLR-309: Fix FieldType so setting an analyzer on a FieldType that
+  doesn't expect it will generate an error.  Practically speaking this
+  means that Solr will now correctly generate an error on
+  initialization if the schema.xml contains an analyzer configuration
+  for a fieldType that does not use TextField.  (hossman)
+
+* SOLR-2192: StreamingUpdateSolrServer.blockUntilFinished was not
+  thread safe and could throw an exception. (yonik)
 
 Other Changes
 ----------------------