lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1559196 [18/19] - in /lucene/dev/branches/lucene5376: ./ dev-tools/ dev-tools/idea/solr/contrib/morphlines-cell/ dev-tools/maven/lucene/facet/ lucene/ lucene/analysis/ lucene/analysis/common/ lucene/analysis/common/src/java/org/apache/luce...
Date Fri, 17 Jan 2014 17:23:44 GMT
Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/TopGroupsResultTransformer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/TopGroupsResultTransformer.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/TopGroupsResultTransformer.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/TopGroupsResultTransformer.java Fri Jan 17 17:23:33 2014
@@ -93,6 +93,8 @@ public class TopGroupsResultTransformer 
   public Map<String, ?> transformToNative(NamedList<NamedList> shardResponse, Sort groupSort, Sort sortWithinGroup, String shard) {
     Map<String, Object> result = new HashMap<String, Object>();
 
+    final IndexSchema schema = rb.req.getSearcher().getSchema();
+
     for (Map.Entry<String, NamedList> entry : shardResponse) {
       String key = entry.getKey();
       NamedList commandResult = entry.getValue();
@@ -124,6 +126,15 @@ public class TopGroupsResultTransformer 
           Object sortValuesVal = document.get("sortValues");
           if (sortValuesVal != null) {
             sortValues = ((List) sortValuesVal).toArray();
+            for (int k = 0; k < sortValues.length; k++) {
+              SchemaField field = groupSort.getSort()[k].getField() != null ? schema.getFieldOrNull(groupSort.getSort()[k].getField()) : null;
+              if (field != null) {
+                FieldType fieldType = field.getType();
+                if (sortValues[k] != null) {
+                  sortValues[k] = fieldType.unmarshalSortValue(sortValues[k]);
+                }
+              }
+            }
           }
           else {
             log.warn("doc {} has null 'sortValues'", document);
@@ -158,6 +169,15 @@ public class TopGroupsResultTransformer 
             score = Float.NaN;
           }
           Object[] sortValues = ((List) document.get("sortValues")).toArray();
+          for (int k = 0; k < sortValues.length; k++) {
+            SchemaField field = sortWithinGroup.getSort()[k].getField() != null ? schema.getFieldOrNull(sortWithinGroup.getSort()[k].getField()) : null;
+            if (field != null) {
+              FieldType fieldType = field.getType();
+              if (sortValues[k] != null) {
+                sortValues[k] = fieldType.unmarshalSortValue(sortValues[k]);
+              }
+            }
+          }
           scoreDocs[j++] = new ShardDoc(score, sortValues, uniqueId, shard);
         }
 
@@ -217,12 +237,8 @@ public class TopGroupsResultTransformer 
           SchemaField field = sortWithinGroup.getSort()[j].getField() != null ? schema.getFieldOrNull(sortWithinGroup.getSort()[j].getField()) : null;
           if (field != null) {
             FieldType fieldType = field.getType();
-            if (sortValue instanceof BytesRef) {
-              UnicodeUtil.UTF8toUTF16((BytesRef)sortValue, spare);
-              String indexedValue = spare.toString();
-              sortValue = fieldType.toObject(field.createField(fieldType.indexedToReadable(indexedValue), 1.0f));
-            } else if (sortValue instanceof String) {
-              sortValue = fieldType.toObject(field.createField(fieldType.indexedToReadable((String) sortValue), 1.0f));
+            if (sortValue != null) {
+              sortValue = fieldType.marshalSortValue(sortValue);
             }
           }
           convertedSortValues[j] = sortValue;
@@ -272,12 +288,8 @@ public class TopGroupsResultTransformer 
                           ? schema.getFieldOrNull(groupSort.getSort()[j].getField()) : null;
         if (field != null) {
           FieldType fieldType = field.getType();
-          if (sortValue instanceof BytesRef) {
-            UnicodeUtil.UTF8toUTF16((BytesRef)sortValue, spare);
-            String indexedValue = spare.toString();
-            sortValue = fieldType.toObject(field.createField(fieldType.indexedToReadable(indexedValue), 1.0f));
-          } else if (sortValue instanceof String) {
-            sortValue = fieldType.toObject(field.createField(fieldType.indexedToReadable((String) sortValue), 1.0f));
+          if (sortValue != null) {
+            sortValue = fieldType.marshalSortValue(sortValue);
           }
         }
         convertedSortValues[j] = sortValue;

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java Fri Jan 17 17:23:33 2014
@@ -136,6 +136,9 @@ public class SolrDispatchFilter implemen
       // catch this so our filter still works
       log.error( "Could not start Solr. Check solr/home property and the logs");
       SolrCore.log( t );
+      if (t instanceof Error) {
+        throw (Error) t;
+      }
     }
 
     log.info("SolrDispatchFilter.init() done");
@@ -434,17 +437,25 @@ public class SolrDispatchFilter implemen
       } 
       catch (Throwable ex) {
         sendError( core, solrReq, request, (HttpServletResponse)response, ex );
-        return;
-      } 
-      finally {
-        if( solrReq != null ) {
-          log.debug("Closing out SolrRequest: {}", solrReq);
-          solrReq.close();
+        if (ex instanceof Error) {
+          throw (Error) ex;
         }
-        if (core != null) {
-          core.close();
+        return;
+      } finally {
+        try {
+          if (solrReq != null) {
+            log.debug("Closing out SolrRequest: {}", solrReq);
+            solrReq.close();
+          }
+        } finally {
+          try {
+            if (core != null) {
+              core.close();
+            }
+          } finally {
+            SolrRequestInfo.clearRequestInfo();
+          }
         }
-        SolrRequestInfo.clearRequestInfo();        
       }
     }
 
@@ -758,6 +769,7 @@ public class SolrDispatchFilter implemen
       ServletRequest request, 
       HttpServletResponse response, 
       Throwable ex) throws IOException {
+    Exception exp = null;
     SolrCore localCore = null;
     try {
       SolrQueryResponse solrResp = new SolrQueryResponse();
@@ -786,15 +798,21 @@ public class SolrDispatchFilter implemen
       QueryResponseWriter writer = core.getQueryResponseWriter(req);
       writeResponse(solrResp, response, writer, req, Method.GET);
     }
-    catch( Throwable t ) { // This error really does not matter
-      SimpleOrderedMap info = new SimpleOrderedMap();
-      int code = ResponseUtils.getErrorInfo(ex, info, log);
-      response.sendError( code, info.toString() );
+    catch (Exception e) { // This error really does not matter
+         exp = e;
     } finally {
-      if (core == null && localCore != null) {
-        localCore.close();
+      try {
+        if (exp != null) {
+          SimpleOrderedMap info = new SimpleOrderedMap();
+          int code = ResponseUtils.getErrorInfo(ex, info, log);
+          response.sendError(code, info.toString());
+        }
+      } finally {
+        if (core == null && localCore != null) {
+          localCore.close();
+        }
       }
-    }
+   }
   }
 
   //---------------------------------------------------------------------

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java Fri Jan 17 17:23:33 2014
@@ -17,16 +17,16 @@
 
 package org.apache.solr.servlet;
 
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.ByteArrayOutputStream;
+import java.net.URL;
 import java.nio.ByteBuffer;
 import java.nio.charset.CharacterCodingException;
 import java.nio.charset.Charset;
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CodingErrorAction;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -36,8 +36,6 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import javax.servlet.http.HttpServletRequest;
 
@@ -53,10 +51,12 @@ import org.apache.solr.common.params.Sol
 import org.apache.solr.common.util.ContentStream;
 import org.apache.solr.common.util.ContentStreamBase;
 import org.apache.solr.common.util.FastInputStream;
-import org.apache.solr.core.Config;
+import org.apache.solr.core.SolrConfig;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.request.SolrQueryRequestBase;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 public class SolrRequestParsers 
@@ -89,7 +89,7 @@ public class SolrRequestParsers 
    * Pass in an xml configuration.  A null configuration will enable
    * everything with maximum values.
    */
-  public SolrRequestParsers( Config globalConfig ) {
+  public SolrRequestParsers( SolrConfig globalConfig ) {
     final int multipartUploadLimitKB, formUploadLimitKB;
     if( globalConfig == null ) {
       multipartUploadLimitKB = formUploadLimitKB = Integer.MAX_VALUE; 
@@ -97,21 +97,16 @@ public class SolrRequestParsers 
       handleSelect = true;
       addHttpRequestToContext = false;
     } else {
-      multipartUploadLimitKB = globalConfig.getInt( 
-          "requestDispatcher/requestParsers/@multipartUploadLimitInKB", 2048 );
+      multipartUploadLimitKB = globalConfig.getMultipartUploadLimitKB();
       
-      formUploadLimitKB = globalConfig.getInt( 
-          "requestDispatcher/requestParsers/@formdataUploadLimitInKB", 2048 );
+      formUploadLimitKB = globalConfig.getFormUploadLimitKB();
       
-      enableRemoteStreams = globalConfig.getBool( 
-          "requestDispatcher/requestParsers/@enableRemoteStreaming", false ); 
+      enableRemoteStreams = globalConfig.isEnableRemoteStreams();
   
       // Let this filter take care of /select?xxx format
-      handleSelect = globalConfig.getBool( 
-          "requestDispatcher/@handleSelect", true ); 
+      handleSelect = globalConfig.isHandleSelect();
       
-      addHttpRequestToContext = globalConfig.getBool( 
-          "requestDispatcher/requestParsers/@addHttpRequestToContext", false ); 
+      addHttpRequestToContext = globalConfig.isAddHttpRequestToContext();
     }
     init(multipartUploadLimitKB, formUploadLimitKB);
   }

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/SolrSuggester.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/SolrSuggester.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/SolrSuggester.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/SolrSuggester.java Fri Jan 17 17:23:33 2014
@@ -179,7 +179,7 @@ public class SolrSuggester {
     
     SuggesterResult res = new SuggesterResult();
     List<LookupResult> suggestions = lookup.lookup(options.token, false, options.count);
-    res.add(options.token.toString(), suggestions);
+    res.add(getName(), options.token.toString(), suggestions);
     return res;
   }
 

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/SuggesterParams.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/SuggesterParams.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/SuggesterParams.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/SuggesterParams.java Fri Jan 17 17:23:33 2014
@@ -47,10 +47,23 @@ public interface SuggesterParams {
    * Whether to build the index or not. Optional and false by default.
    */
   public static final String SUGGEST_BUILD = SUGGEST_PREFIX + "build";
+  
+  /**
+   * Whether to build the index or not for all suggesters in the component.
+   * Optional and false by default.
+   * This parameter does not need any suggest dictionary names to be specified
+   */
+  public static final String SUGGEST_BUILD_ALL = SUGGEST_PREFIX + "buildAll";
 
   /**
    * Whether to reload the index. Optional and false by default.
    */
   public static final String SUGGEST_RELOAD = SUGGEST_PREFIX + "reload";
 
+  /**
+   * Whether to reload the index or not for all suggesters in the component.
+   * Optional and false by default.
+   * This parameter does not need any suggest dictionary names to be specified
+   */
+  public static final String SUGGEST_RELOAD_ALL = SUGGEST_PREFIX + "reloadAll";
 }

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/SuggesterResult.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/SuggesterResult.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/SuggesterResult.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/spelling/suggest/SuggesterResult.java Fri Jan 17 17:23:33 2014
@@ -17,7 +17,9 @@ package org.apache.solr.spelling.suggest
  * limitations under the License.
  */
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -32,14 +34,19 @@ public class SuggesterResult {
   public SuggesterResult() {}
   
   /** token -> lookup results mapping*/
-  private Map<String, List<LookupResult>> suggestions = new HashMap<String, List<LookupResult>>();
+  private Map<String, Map<String, List<LookupResult>>> suggestionsMap = 
+      new HashMap<String, Map<String, List<LookupResult>>>();
 
   /** Add suggestion results for <code>token</code> */
-  public void add(String token, List<LookupResult> results) {
-    List<LookupResult> res = this.suggestions.get(token);
+  public void add(String suggesterName, String token, List<LookupResult> results) {
+    Map<String, List<LookupResult>> suggesterRes = this.suggestionsMap.get(suggesterName);
+    if (suggesterRes == null) {
+      this.suggestionsMap.put(suggesterName, new HashMap<String, List<LookupResult>>());
+    }
+    List<LookupResult> res = this.suggestionsMap.get(suggesterName).get(token);
     if (res == null) {
       res = results;
-      this.suggestions.put(token, res);
+      this.suggestionsMap.get(suggesterName).put(token, res);
     }
   }
   
@@ -48,15 +55,27 @@ public class SuggesterResult {
    * null can be returned, if there are no lookup results
    * for the <code>token</code>
    * */
-  public List<LookupResult> getLookupResult(String token) {
-    return this.suggestions.get(token);
+  public List<LookupResult> getLookupResult(String suggesterName, String token) {
+    return (this.suggestionsMap.containsKey(suggesterName))
+        ? this.suggestionsMap.get(suggesterName).get(token)
+        : new ArrayList<LookupResult>();
   }
   
   /**
    * Get the set of tokens that are present in the
    * instance
    */
-  public Set<String> getTokens() {
-    return this.suggestions.keySet();
+  public Set<String> getTokens(String suggesterName) {
+    return (this.suggestionsMap.containsKey(suggesterName))
+        ? this.suggestionsMap.get(suggesterName).keySet()
+        : new HashSet<String>();
+  }
+  
+  /**
+   * Get the set of suggesterNames for which this
+   * instance holds results
+   */
+  public Set<String> getSuggesterNames() {
+    return this.suggestionsMap.keySet();
   }
 }

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java Fri Jan 17 17:23:33 2014
@@ -71,8 +71,8 @@ public final class DefaultSolrCoreState 
         indexWriter.close();
       }
       indexWriter = null;
-    } catch (Throwable t) {
-      log.error("Error during shutdown of writer.", t);
+    } catch (Exception e) {
+      log.error("Error during shutdown of writer.", e);
     } 
   }
   
@@ -162,17 +162,17 @@ public final class DefaultSolrCoreState 
             try {
               log.info("Closing old IndexWriter... core=" + coreName);
               indexWriter.close();
-            } catch (Throwable t) {
+            } catch (Exception e) {
               SolrException.log(log, "Error closing old IndexWriter. core="
-                  + coreName, t);
+                  + coreName, e);
             }
           } else {
             try {
               log.info("Rollback old IndexWriter... core=" + coreName);
               indexWriter.rollback();
-            } catch (Throwable t) {
+            } catch (Exception e) {
               SolrException.log(log, "Error rolling back old IndexWriter. core="
-                  + coreName, t);
+                  + coreName, e);
             }
           }
         }
@@ -220,17 +220,17 @@ public final class DefaultSolrCoreState 
           try {
             log.info("Closing old IndexWriter... core=" + coreName);
             indexWriter.close();
-          } catch (Throwable t) {
+          } catch (Exception e) {
             SolrException.log(log, "Error closing old IndexWriter. core="
-                + coreName, t);
+                + coreName, e);
           }
         } else {
           try {
             log.info("Rollback old IndexWriter... core=" + coreName);
             indexWriter.rollback();
-          } catch (Throwable t) {
+          } catch (Exception e) {
             SolrException.log(log, "Error rolling back old IndexWriter. core="
-                + coreName, t);
+                + coreName, e);
           }
         }
       }

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/DirectUpdateHandler2.java Fri Jan 17 17:23:33 2014
@@ -751,6 +751,9 @@ public class DirectUpdateHandler2 extend
         }
       } catch (Throwable th) {
         log.error("Error in final commit", th);
+        if (th instanceof OutOfMemoryError) {
+          throw (OutOfMemoryError) th;
+        }
       }
 
       // we went through the normal process to commit, so we don't have to artificially
@@ -759,6 +762,9 @@ public class DirectUpdateHandler2 extend
         if (ulog != null) ulog.close(false);
       }  catch (Throwable th) {
         log.error("Error closing log files", th);
+        if (th instanceof OutOfMemoryError) {
+          throw (OutOfMemoryError) th;
+        }
       }
 
       if (writer != null) writer.close();

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/SolrCmdDistributor.java Fri Jan 17 17:23:33 2014
@@ -25,7 +25,6 @@ import java.util.List;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.impl.HttpSolrServer;
-import org.apache.solr.client.solrj.impl.HttpSolrServer.RemoteSolrException;
 import org.apache.solr.client.solrj.request.AbstractUpdateRequest;
 import org.apache.solr.client.solrj.request.UpdateRequest;
 import org.apache.solr.common.SolrException;

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/SolrCoreState.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/SolrCoreState.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/SolrCoreState.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/SolrCoreState.java Fri Jan 17 17:23:33 2014
@@ -70,8 +70,8 @@ public abstract class SolrCoreState {
       try {
         log.info("Closing SolrCoreState");
         close(closer);
-      } catch (Throwable t) {
-        log.error("Error closing SolrCoreState", t);
+      } catch (Exception e) {
+        log.error("Error closing SolrCoreState", e);
       }
     }
     return close;

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/SolrIndexWriter.java Fri Jan 17 17:23:33 2014
@@ -134,14 +134,17 @@ public class SolrIndexWriter extends Ind
           // don't allow interruption
           continue;
         } catch (Throwable t) {
+          if (t instanceof OutOfMemoryError) {
+            throw (OutOfMemoryError) t;
+          }
           log.error("Error closing IndexWriter, trying rollback", t);
           super.rollback();
         }
         if (IndexWriter.isLocked(directory)) {
           try {
             IndexWriter.unlock(directory);
-          } catch (Throwable t) {
-            log.error("Coud not unlock directory after seemingly failed IndexWriter#close()", t);
+          } catch (Exception e) {
+            log.error("Coud not unlock directory after seemingly failed IndexWriter#close()", e);
           }
         }
         break;

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/StreamingSolrServers.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/StreamingSolrServers.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/StreamingSolrServers.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/StreamingSolrServers.java Fri Jan 17 17:23:33 2014
@@ -31,9 +31,7 @@ import org.apache.solr.client.solrj.Solr
 import org.apache.solr.client.solrj.impl.BinaryRequestWriter;
 import org.apache.solr.client.solrj.impl.BinaryResponseParser;
 import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrServer;
-import org.apache.solr.client.solrj.impl.HttpClientUtil;
 import org.apache.solr.common.SolrException;
-import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.update.SolrCmdDistributor.Error;
 import org.apache.solr.update.processor.DistributedUpdateProcessor;
 import org.apache.solr.update.processor.DistributingUpdateProcessorFactory;
@@ -53,11 +51,6 @@ public class StreamingSolrServers {
   public StreamingSolrServers(UpdateShardHandler updateShardHandler) {
     this.updateExecutor = updateShardHandler.getUpdateExecutor();
     
-    ModifiableSolrParams params = new ModifiableSolrParams();
-    params.set(HttpClientUtil.PROP_FOLLOW_REDIRECTS, false);
-    params.set(HttpClientUtil.PROP_CONNECTION_TIMEOUT, 30000);
-    params.set(HttpClientUtil.PROP_USE_RETRY, false);
-    
     httpClient = updateShardHandler.getHttpClient();
   }
 

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/UpdateLog.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/UpdateLog.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/UpdateLog.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/UpdateLog.java Fri Jan 17 17:23:33 2014
@@ -421,7 +421,7 @@ public class UpdateLog implements Plugin
         try {
           RefCounted<SolrIndexSearcher> holder = uhandler.core.openNewSearcher(true, true);
           holder.decref();
-        } catch (Throwable e) {
+        } catch (Exception e) {
           SolrException.log(log, "Error opening realtime searcher for deleteByQuery", e);
         }
 
@@ -491,7 +491,7 @@ public class UpdateLog implements Plugin
         try {
           RefCounted<SolrIndexSearcher> holder = uhandler.core.openNewSearcher(true, true);
           holder.decref();
-        } catch (Throwable e) {
+        } catch (Exception e) {
           SolrException.log(log, "Error opening realtime searcher for deleteByQuery", e);
         }
 
@@ -512,7 +512,7 @@ public class UpdateLog implements Plugin
       try {
         RefCounted<SolrIndexSearcher> holder = uhandler.core.openNewSearcher(true, true);
         holder.decref();
-      } catch (Throwable e) {
+      } catch (Exception e) {
         SolrException.log(log, "Error opening realtime searcher for deleteByQuery", e);
       }
 
@@ -859,7 +859,7 @@ public class UpdateLog implements Plugin
     synchronized (this) {
       try {
         ExecutorUtil.shutdownNowAndAwaitTermination(recoveryExecutor);
-      } catch (Throwable e) {
+      } catch (Exception e) {
         SolrException.log(log, e);
       }
 
@@ -1222,7 +1222,7 @@ public class UpdateLog implements Plugin
           recoveryInfo.errors++;
           SolrException.log(log, e);
         }
-      } catch (Throwable e) {
+      } catch (Exception e) {
         recoveryInfo.errors++;
         SolrException.log(log, e);
       } finally {
@@ -1295,7 +1295,7 @@ public class UpdateLog implements Plugin
             SolrException.log(log,e);
           } catch (IOException e) {
             SolrException.log(log,e);
-          } catch (Throwable e) {
+          } catch (Exception e) {
             SolrException.log(log,e);
           }
 
@@ -1381,7 +1381,7 @@ public class UpdateLog implements Plugin
             recoveryInfo.errors++;
             loglog.warn("REYPLAY_ERR: IOException reading log", ex);
             // could be caused by an incomplete flush if recovering from log
-          } catch (Throwable ex) {
+          } catch (Exception ex) {
             recoveryInfo.errors++;
             loglog.warn("REPLAY_ERR: Exception replaying log", ex);
             // something wrong with the request?

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java Fri Jan 17 17:23:33 2014
@@ -73,7 +73,7 @@ public class UpdateShardHandler {
   public void close() {
     try {
       ExecutorUtil.shutdownAndAwaitTermination(updateExecutor);
-    } catch (Throwable e) {
+    } catch (Exception e) {
       SolrException.log(log, e);
     } finally {
       clientConnectionManager.shutdown();

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java Fri Jan 17 17:23:33 2014
@@ -146,11 +146,11 @@ public class DistributedUpdateProcessor 
   
   private SolrCmdDistributor cmdDistrib;
 
-  private boolean zkEnabled = false;
+  private final boolean zkEnabled;
 
   private CloudDescriptor cloudDesc;
-  private String collection;
-  private ZkController zkController;
+  private final String collection;
+  private final ZkController zkController;
   
   // these are setup at the start of each request processing
   // method in this update processor
@@ -193,6 +193,8 @@ public class DistributedUpdateProcessor 
     
     if (cloudDesc != null) {
       collection = cloudDesc.getCollectionName();
+    } else {
+      collection = null;
     }
 
   }

Modified: lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/util/SimplePostTool.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/util/SimplePostTool.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/util/SimplePostTool.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/java/org/apache/solr/util/SimplePostTool.java Fri Jan 17 17:23:33 2014
@@ -947,7 +947,7 @@ public class SimplePostTool {
   public static String getXP(Node n, String xpath, boolean concatAll)
       throws XPathExpressionException {
     NodeList nodes = getNodesFromXP(n, xpath);
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     if (nodes.getLength() > 0) {
       for(int i = 0; i < nodes.getLength() ; i++) {
         sb.append(nodes.item(i).getNodeValue() + " ");

Modified: lucene/dev/branches/lucene5376/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml Fri Jan 17 17:23:33 2014
@@ -102,6 +102,22 @@
     
   </searchComponent>
   
+  <searchComponent class="solr.SuggestComponent" name="free_text_suggest">
+    <lst name="suggester">
+      <str name="name">free_text_suggest</str>
+      <str name="lookupImpl">FreeTextLookupFactory</str>
+      <str name="dictionaryImpl">FileDictionaryFactory</str>
+      <str name="storeDir">free_text_suggest</str>
+      <str name="buildOnCommit">false</str>
+      <str name="sourceLocation">freeTextSuggest.txt</str>
+
+      <!-- Suggester properties -->
+      <str name="separator"> </str>
+      <str name="suggestFreeTextAnalyzerFieldType">text</str>
+	  <int name="ngrams">2</int>
+    </lst>
+    
+  </searchComponent>
   <!-- FuzzyLookup suggest component with FileDictionaryFactory -->
   <searchComponent class="solr.SuggestComponent" name="fuzzy_suggest_analyzing_with_file_dict">
     <lst name="suggester">
@@ -254,17 +270,26 @@
   <requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/fuzzy_suggest_analyzing_with_file_dict">
     <lst name="defaults">
       <str name="suggest">true</str>
-      <str name="suggest.dictionary">fuzzy_suggest_analyzing_with_file_dict</str>
     </lst>
     <arr name="components">
       <str>fuzzy_suggest_analyzing_with_file_dict</str>
     </arr>
   </requestHandler>
+  
+  
+  <requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/free_text_suggest">
+    <lst name="defaults">
+      <str name="suggest">true</str>
+    </lst>
+    <arr name="components">
+      <str>free_text_suggest</str>
+    </arr>
+  </requestHandler>
+  
 
   <requestHandler class="org.apache.solr.handler.component.SearchHandler" name="/fuzzy_suggest_analyzing_with_high_freq_dict">
     <lst name="defaults">
       <str name="suggest">true</str>
-      <str name="suggest.dictionary">fuzzy_suggest_analyzing_with_high_freq_dict</str>
     </lst>
     <arr name="components">
       <str>fuzzy_suggest_analyzing_with_high_freq_dict</str>

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/BasicFunctionalityTest.java Fri Jan 17 17:23:33 2014
@@ -947,51 +947,6 @@ public class BasicFunctionalityTest exte
     }
   }
 
-  @Ignore("See SOLR-1726")
-  @Test
-  public void testDeepPaging() throws Exception {
-    for (int i = 0; i < 1000; i++){
-      assertU(adoc("id", String.valueOf(i),  "foo_t", English.intToEnglish(i)));
-    }
-    assertU(commit());
-    SolrQueryRequest goldReq = null;
-    try {
-      goldReq = req("q", "foo_t:one", "rows", "50", "fl", "docid, score");
-      SolrQueryResponse gold = h.queryAndResponse("standard", goldReq);
-      ResultContext response = (ResultContext) gold.getValues().get("response");
-      assertQ("page: " + 0 + " failed",
-          req("q", "foo_t:one", "rows", "10", CommonParams.QT, "standard", "fl", "[docid], score"),
-          "*[count(//doc)=10]");
-      //ugh, what a painful way to get the document
-      DocIterator iterator = response.docs.subset(9, 1).iterator();
-      int lastDoc = iterator.nextDoc();
-      float lastScore = iterator.score();
-      for (int i = 1; i < 5; i++){
-        //page through some results
-        DocList subset = response.docs.subset(i * 10, 1);
-        iterator = subset.iterator();
-        int compareDoc = iterator.nextDoc();
-        float compareScore = iterator.score();
-        assertQ("page: " + i + " failed",
-            req("q", "foo_t:one", CommonParams.QT, "standard", "fl", "[docid], score",
-                "start", String.valueOf(i * 10), "rows", "1",  //only get one doc, and then compare it to gold
-                CommonParams.PAGEDOC, String.valueOf(lastDoc), CommonParams.PAGESCORE, String.valueOf(lastScore)),
-            "*[count(//doc)=1]",
-            "//float[@name='score'][.='" + compareScore + "']",
-            "//int[@name='[docid]'][.='" + compareDoc + "']"
-        );
-        lastScore = compareScore;
-        lastDoc = compareDoc;
-
-      }
-    } finally {
-      if (goldReq != null ) {
-        goldReq.close();
-      }
-    }
-  }
-
-
 //   /** this doesn't work, but if it did, this is how we'd test it. */
 //   public void testOverwriteFalse() {
 

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/TestRandomDVFaceting.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/TestRandomDVFaceting.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/TestRandomDVFaceting.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/TestRandomDVFaceting.java Fri Jan 17 17:23:33 2014
@@ -96,7 +96,7 @@ public class TestRandomDVFaceting extend
     }
     if (ids.size() == 0) return;
 
-    StringBuffer sb = new StringBuffer("id:(");
+    StringBuilder sb = new StringBuilder("id:(");
     for (String id : ids) {
       sb.append(id).append(' ');
       model.remove(id);

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/TestRandomFaceting.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/TestRandomFaceting.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/TestRandomFaceting.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/TestRandomFaceting.java Fri Jan 17 17:23:33 2014
@@ -95,7 +95,7 @@ public class TestRandomFaceting extends 
     }
     if (ids.size() == 0) return;
 
-    StringBuffer sb = new StringBuffer("id:(");
+    StringBuilder sb = new StringBuilder("id:(");
     for (String id : ids) {
       sb.append(id).append(' ');
       model.remove(id);

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analysis/LegacyHTMLStripCharFilterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analysis/LegacyHTMLStripCharFilterTest.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analysis/LegacyHTMLStripCharFilterTest.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analysis/LegacyHTMLStripCharFilterTest.java Fri Jan 17 17:23:33 2014
@@ -260,8 +260,8 @@ public class LegacyHTMLStripCharFilterTe
     Analyzer analyzer = new Analyzer() {
 
       @Override
-      protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
-        Tokenizer tokenizer = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+      protected TokenStreamComponents createComponents(String fieldName) {
+        Tokenizer tokenizer = new MockTokenizer(MockTokenizer.WHITESPACE, false);
         return new TokenStreamComponents(tokenizer, tokenizer);
       }
 

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java Fri Jan 17 17:23:33 2014
@@ -66,7 +66,7 @@ public class TestReversedWildcardFilterF
     String text = "simple text";
     args.put("withOriginal", "true");
     ReversedWildcardFilterFactory factory = new ReversedWildcardFilterFactory(args);
-    TokenStream input = factory.create(new MockTokenizer(new StringReader(text), MockTokenizer.WHITESPACE, false));
+    TokenStream input = factory.create(whitespaceMockTokenizer(text));
     assertTokenStreamContents(input, 
         new String[] { "\u0001elpmis", "simple", "\u0001txet", "text" },
         new int[] { 1, 0, 1, 0 });
@@ -74,7 +74,7 @@ public class TestReversedWildcardFilterF
     // now without original tokens
     args.put("withOriginal", "false");
     factory = new ReversedWildcardFilterFactory(args);
-    input = factory.create(new MockTokenizer(new StringReader(text), MockTokenizer.WHITESPACE, false));
+    input = factory.create(whitespaceMockTokenizer(text));
     assertTokenStreamContents(input,
         new String[] { "\u0001elpmis", "\u0001txet" },
         new int[] { 1, 1 });

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analysis/TestWordDelimiterFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analysis/TestWordDelimiterFilterFactory.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analysis/TestWordDelimiterFilterFactory.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/analysis/TestWordDelimiterFilterFactory.java Fri Jan 17 17:23:33 2014
@@ -211,13 +211,11 @@ public class TestWordDelimiterFilterFact
     WordDelimiterFilterFactory factoryDefault = new WordDelimiterFilterFactory(args);
     factoryDefault.inform(loader);
     
-    TokenStream ts = factoryDefault.create(
-        new MockTokenizer(new StringReader(testText), MockTokenizer.WHITESPACE, false));
+    TokenStream ts = factoryDefault.create(whitespaceMockTokenizer(testText));
     BaseTokenStreamTestCase.assertTokenStreamContents(ts, 
         new String[] { "I", "borrowed", "5", "400", "00", "540000", "at", "25", "interest", "rate", "interestrate" });
 
-    ts = factoryDefault.create(
-        new MockTokenizer(new StringReader("foo\u200Dbar"), MockTokenizer.WHITESPACE, false));
+    ts = factoryDefault.create(whitespaceMockTokenizer("foo\u200Dbar"));
     BaseTokenStreamTestCase.assertTokenStreamContents(ts, 
         new String[] { "foo", "bar", "foobar" });
 
@@ -235,14 +233,12 @@ public class TestWordDelimiterFilterFact
     WordDelimiterFilterFactory factoryCustom = new WordDelimiterFilterFactory(args);
     factoryCustom.inform(loader);
     
-    ts = factoryCustom.create(
-        new MockTokenizer(new StringReader(testText), MockTokenizer.WHITESPACE, false));
+    ts = factoryCustom.create(whitespaceMockTokenizer(testText));
     BaseTokenStreamTestCase.assertTokenStreamContents(ts, 
         new String[] { "I", "borrowed", "$5,400.00", "at", "25%", "interest", "rate", "interestrate" });
     
     /* test custom behavior with a char > 0x7F, because we had to make a larger byte[] */
-    ts = factoryCustom.create(
-        new MockTokenizer(new StringReader("foo\u200Dbar"), MockTokenizer.WHITESPACE, false));
+    ts = factoryCustom.create(whitespaceMockTokenizer("foo\u200Dbar"));
     BaseTokenStreamTestCase.assertTokenStreamContents(ts, 
         new String[] { "foo\u200Dbar" });
   }

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyShardSplitTest.java Fri Jan 17 17:23:33 2014
@@ -184,23 +184,23 @@ public class ChaosMonkeyShardSplitTest e
               Thread.sleep(800);
               overseerClient.close();
               overseerClient = electNewOverseer(zkAddress);
-            } catch (Throwable e) {
+            } catch (Exception e) {
               // e.printStackTrace();
             }
           }
           try {
             Thread.sleep(100);
-          } catch (Throwable e) {
+          } catch (Exception e) {
             // e.printStackTrace();
           }
         }
-      } catch (Throwable t) {
+      } catch (Exception t) {
         // ignore
       } finally {
         if (overseerClient != null) {
           try {
             overseerClient.close();
-          } catch (Throwable t) {
+          } catch (Exception t) {
             // ignore
           }
         }

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/core/QueryResultKeyTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/core/QueryResultKeyTest.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/core/QueryResultKeyTest.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/core/QueryResultKeyTest.java Fri Jan 17 17:23:33 2014
@@ -17,6 +17,7 @@
 
 package org.apache.solr.core;
 
+import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -27,53 +28,175 @@ import org.apache.lucene.search.Query;
 import org.apache.lucene.search.Sort;
 import org.apache.lucene.search.SortField;
 import org.apache.lucene.search.TermQuery;
+import org.apache.lucene.util._TestUtil;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.search.QueryResultKey;
 import org.junit.Test;
 
 public class QueryResultKeyTest extends SolrTestCaseJ4 {
 
-  @Test
-  public void testFiltersHashCode() {
+  public void testFiltersOutOfOrder1() {
     // the hashcode should be the same even when the list
     // of filters is in a different order
     
     Sort sort = new Sort(new SortField("test", SortField.Type.INT));
-    List<Query> filters = new ArrayList<Query>();
-    filters.add(new TermQuery(new Term("test", "field")));
-    filters.add(new TermQuery(new Term("test2", "field2")));
-    
     BooleanQuery query = new BooleanQuery();
     query.add(new TermQuery(new Term("test", "field")), Occur.MUST);
     
+    List<Query> filters = Arrays.<Query>asList(new TermQuery(new Term("test", "field")),
+                                               new TermQuery(new Term("test2", "field2")));
     QueryResultKey qrk1 = new QueryResultKey(query , filters, sort, 1);
     
-    List<Query> filters2 = new ArrayList<Query>();
-    filters2.add(new TermQuery(new Term("test2", "field2")));
-    filters2.add(new TermQuery(new Term("test", "field")));
+    List<Query> filters2 = Arrays.<Query>asList(new TermQuery(new Term("test2", "field2")),
+                                                new TermQuery(new Term("test", "field")));
     QueryResultKey qrk2 = new QueryResultKey(query , filters2, sort, 1);
-    
-    assertEquals(qrk1.hashCode(), qrk2.hashCode());
+    assertKeyEquals(qrk1, qrk2);
   }
 
   @Test
-  public void testQueryResultKeySortedFilters() {
+  public void testFiltersOutOfOrder2() {
     Query fq1 = new TermQuery(new Term("test1", "field1"));
     Query fq2 = new TermQuery(new Term("test2", "field2"));
 
     Query query = new TermQuery(new Term("test3", "field3"));
-    List<Query> filters = new ArrayList<Query>();
-    filters.add(fq1);
-    filters.add(fq2);
+    List<Query> filters = Arrays.asList(fq1, fq2);
 
     QueryResultKey key = new QueryResultKey(query, filters, null, 0);
 
-    List<Query> newFilters = new ArrayList<Query>();
-    newFilters.add(fq2);
-    newFilters.add(fq1);
+    List<Query> newFilters = Arrays.asList(fq2, fq1);
     QueryResultKey newKey = new QueryResultKey(query, newFilters, null, 0);
 
-    assertEquals(key, newKey);
+    assertKeyEquals(key, newKey);
+  }
+
+  public void testQueryResultKeyUnSortedFiltersWithDups() {
+    Query query = new TermQuery(new Term("main", "val"));
+
+    // we need Query clauses that have identical hashCodes 
+    // but are not equal unless the term is equals
+    Query fq_aa = new FlatHashTermQuery("fq_a");
+    Query fq_ab = new FlatHashTermQuery("fq_a");
+    Query fq_ac = new FlatHashTermQuery("fq_a");
+    Query fq_zz = new FlatHashTermQuery("fq_z");
+
+    assertEquals(fq_aa.hashCode(), fq_ab.hashCode());
+    assertEquals(fq_aa.hashCode(), fq_ac.hashCode());
+    assertEquals(fq_aa.hashCode(), fq_zz.hashCode());
+
+    assertEquals(fq_aa, fq_ab);
+    assertEquals(fq_aa, fq_ac);
+    assertEquals(fq_ab, fq_aa);
+    assertEquals(fq_ab, fq_ac);
+    assertEquals(fq_ac, fq_aa);
+    assertEquals(fq_ac, fq_ab);
+
+    assertTrue( ! fq_aa.equals(fq_zz) );
+    assertTrue( ! fq_ab.equals(fq_zz) );
+    assertTrue( ! fq_ac.equals(fq_zz) );
+    assertTrue( ! fq_zz.equals(fq_aa) );
+    assertTrue( ! fq_zz.equals(fq_ab) );
+    assertTrue( ! fq_zz.equals(fq_ac) );
+
+    List<Query> filters1 = Arrays.asList(fq_aa, fq_ab);
+    List<Query> filters2 = Arrays.asList(fq_zz, fq_ac);
+
+    QueryResultKey key1 = new QueryResultKey(query, filters1, null, 0);
+    QueryResultKey key2 = new QueryResultKey(query, filters2, null, 0);
+    
+    assertEquals(key1.hashCode(), key2.hashCode());
+
+    assertKeyNotEquals(key1, key2);
+  }
+
+  public void testRandomQueryKeyEquality() {
+
+
+    final int minIters = atLeast(100 * 1000);
+    final Query base = new FlatHashTermQuery("base");
+    
+    // ensure we cover both code paths at least once
+    boolean didEquals = false;
+    boolean didNotEquals = false;
+    int iter = 1;
+    while (iter <= minIters || (! didEquals ) || (! didNotEquals ) ) {
+      iter++;
+      int[] numsA = smallArrayOfRandomNumbers();
+      int[] numsB = smallArrayOfRandomNumbers();
+      QueryResultKey aa = new QueryResultKey(base, buildFiltersFromNumbers(numsA), null, 0);
+      QueryResultKey bb = new QueryResultKey(base, buildFiltersFromNumbers(numsB), null, 0);
+      // now that we have our keys, sort the numbers so we know what to expect
+      Arrays.sort(numsA);
+      Arrays.sort(numsB);
+      if (Arrays.equals(numsA, numsB)) {
+        didEquals = true;
+        assertKeyEquals(aa, bb);
+      } else {
+        didNotEquals = true;
+        assertKeyNotEquals(aa, bb);
+      }
+    }
+    assert minIters <= iter;
+  }
+
+  /**
+   * does bi-directional equality check as well as verifying hashCode
+   */
+  public void assertKeyEquals(QueryResultKey key1, QueryResultKey key2) {
+    assertNotNull(key1);
+    assertNotNull(key2);
+    assertEquals(key1.hashCode(), key2.hashCode());
+    assertEquals(key1, key2);
+    assertEquals(key2, key1);
+  }
+
+  /**
+   * does bi-directional check that the keys are <em>not</em> equals
+   */
+  public void assertKeyNotEquals(QueryResultKey key1, QueryResultKey key2) {
+    assertTrue( ! key1.equals(key2) );
+    assertTrue( ! key2.equals(key1) );
+  }
+
+  /**
+   * returns a "small" list of "small" random numbers.  The idea behind this method is 
+   * that multiple calls have a decent change of returning two arrays which are the 
+   * same size and contain the same numbers but in a differnet order.
+   *
+   * the array is garunteed to always have at least 1 element
+   */
+  private int[] smallArrayOfRandomNumbers() {
+    int size = _TestUtil.nextInt(random(), 1, 5);
+    int[] result = new int[size];
+    for (int i=0; i < size; i++) {
+      result[i] = _TestUtil.nextInt(random(), 1, 5);
+    }
+    return result;
   }
 
+  /**
+   * Creates an array of Filter queries using {@link FlatHashTermQuery} based on the 
+   * specified ints
+   */
+  private List<Query> buildFiltersFromNumbers(int[] values) {
+    ArrayList<Query> filters = new ArrayList<Query>(values.length);
+    for (int val : values) {
+      filters.add(new FlatHashTermQuery(String.valueOf(val)));
+    }
+    return filters;
+  }
+
+  /**
+   * Quick and dirty subclass of TermQuery that uses fixed field name and a constant 
+   * value hashCode, regardless of the Term value.
+   */
+  private static class FlatHashTermQuery extends TermQuery {
+    public FlatHashTermQuery(String val) {
+      super(new Term("some_field", val));
+    }
+
+    @Override
+    public int hashCode() {
+      return 42;
+    }
+  }
 }

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java Fri Jan 17 17:23:33 2014
@@ -799,7 +799,7 @@ public class TestReplicationHandler exte
           master.copyConfigFile(CONF_DIR + slaveSchema, "schema.xml");
         }
         
-        int docs = random().nextInt(maxDocs);
+        int docs = random().nextInt(maxDocs) + 1;
         for (int i = 0; i < docs; i++) {
           index(masterClient, "id", id++, "name", "name = " + i);
         }

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java Fri Jan 17 17:23:33 2014
@@ -274,4 +274,20 @@ public class CoreAdminHandlerTest extend
     }
   }
 
+  @Test
+  public void testNonexistentCoreReload() throws Exception {
+    final CoreAdminHandler admin = new CoreAdminHandler(h.getCoreContainer());
+    SolrQueryResponse resp = new SolrQueryResponse();
+
+    try {
+      admin.handleRequestBody(
+          req(CoreAdminParams.ACTION,
+              CoreAdminParams.CoreAdminAction.RELOAD.toString(),
+              CoreAdminParams.CORE, "non-existent-core")
+          , resp);
+      fail("Was able to successfully reload non-existent-core");
+    } catch (Exception e) {
+      assertEquals("Expected error message for non-existent core.", "Core with core name [non-existent-core] does not exist.", e.getMessage());
+    }
+  }
 }

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/component/DistributedSuggestComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/component/DistributedSuggestComponentTest.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/component/DistributedSuggestComponentTest.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/component/DistributedSuggestComponentTest.java Fri Jan 17 17:23:33 2014
@@ -20,6 +20,7 @@ package org.apache.solr.handler.componen
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
 
 import junit.framework.Assert;
 
@@ -27,6 +28,7 @@ import org.apache.lucene.util.LuceneTest
 import org.apache.solr.BaseDistributedSearchTestCase;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.util.NamedList;
+import org.apache.solr.common.util.SimpleOrderedMap;
 import org.apache.solr.spelling.suggest.SuggesterParams;
 import org.junit.BeforeClass;
 
@@ -67,9 +69,10 @@ public class DistributedSuggestComponent
   {    
     NamedList<Object> nl = control.getResponse();
     @SuppressWarnings("unchecked")
-    NamedList<Object> sc = (NamedList<Object>) nl.get("suggest");
-    if(sc.size()==0) {
-      Assert.fail("Control data did not return any suggestions.");
+    Map<String, SimpleOrderedMap<NamedList<Object>>> sc = (Map<String, SimpleOrderedMap<NamedList<Object>>>) nl.get("suggest");
+    String command = (String) nl.get("command");
+    if(sc.size() == 0 && command == null) {
+      Assert.fail("Control data did not return any suggestions or execute any command");
     }
   } 
   
@@ -100,12 +103,17 @@ public class DistributedSuggestComponent
     
     //Shortcut names
     String build = SuggesterParams.SUGGEST_BUILD;
+    String buildAll = SuggesterParams.SUGGEST_BUILD_ALL;
     String count = SuggesterParams.SUGGEST_COUNT;
     String dictionaryName = SuggesterParams.SUGGEST_DICT;
     
-    //Build the suggest dictionary 
-    query(buildRequest("", true, requestHandlerName, build, "true", dictionaryName, docDictName));
-    query(buildRequest("", true, requestHandlerName, build, "true", dictionaryName, docExprDictName));
+    //Build the suggest dictionary
+    if (random().nextBoolean()) { // build all the suggesters in one go
+      query(buildRequest("", true, requestHandlerName, buildAll, "true"));
+    } else { // build suggesters individually
+      query(buildRequest("", true, requestHandlerName, build, "true", dictionaryName, docDictName));
+      query(buildRequest("", true, requestHandlerName, build, "true", dictionaryName, docExprDictName)); 
+    }
     
     //Test Basic Functionality
     query(buildRequest("exampel", false, requestHandlerName, dictionaryName, docDictName, count, "2"));
@@ -113,6 +121,9 @@ public class DistributedSuggestComponent
     query(buildRequest("blah", true, requestHandlerName, dictionaryName, docExprDictName, count, "2"));
     query(buildRequest("blah", true, requestHandlerName, dictionaryName, docDictName, count, "2"));
     
+    //Test multiSuggester
+    query(buildRequest("exampel", false, requestHandlerName, dictionaryName, docDictName, dictionaryName, docExprDictName, count, "2"));
+    
   }
   private Object[] buildRequest(String q, boolean useSuggestQ, String handlerName, String... addlParams) {
     List<Object> params = new ArrayList<Object>();
@@ -123,6 +134,7 @@ public class DistributedSuggestComponent
       params.add("q");
     }
     params.add(q);
+    
 
     params.add("qt");
     params.add(handlerName);

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java Fri Jan 17 17:23:33 2014
@@ -641,6 +641,32 @@ public class QueryElevationComponentTest
       );
 
 
+      // Test setting ids and excludes from http parameters
+
+      booster.elevationCache.clear();
+      args.put(QueryElevationParams.IDS, "x,y,z");
+      args.put(QueryElevationParams.EXCLUDE, "b");
+
+      assertQ("All five should make it", req
+          , "//*[@numFound='5']"
+          , "//result/doc[1]/str[@name='id'][.='x']"
+          , "//result/doc[2]/str[@name='id'][.='y']"
+          , "//result/doc[3]/str[@name='id'][.='z']"
+          , "//result/doc[4]/str[@name='id'][.='a']"
+          , "//result/doc[5]/str[@name='id'][.='c']"
+      );
+
+      args.put(QueryElevationParams.IDS, "x,z,y");
+      args.put(QueryElevationParams.EXCLUDE, "b,c");
+
+      assertQ("All four should make it", req
+          , "//*[@numFound='4']"
+          , "//result/doc[1]/str[@name='id'][.='x']"
+          , "//result/doc[2]/str[@name='id'][.='z']"
+          , "//result/doc[3]/str[@name='id'][.='y']"
+          , "//result/doc[4]/str[@name='id'][.='a']"
+      );
+
       req.close();
     } finally {
       delete();

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/handler/component/SuggestComponentTest.java Fri Jan 17 17:23:33 2014
@@ -66,11 +66,11 @@ public class SuggestComponentTest extend
         SuggesterParams.SUGGEST_BUILD, "true",
         SuggesterParams.SUGGEST_Q, "exampel",
         SuggesterParams.SUGGEST_COUNT, "2"),
-        "//lst[@name='suggest']/lst[@name='exampel']/int[@name='numFound'][.='2']",
-        "//lst[@name='suggest']/lst[@name='exampel']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='example inputdata']",
-        "//lst[@name='suggest']/lst[@name='exampel']/arr[@name='suggestions']/lst[1]/long[@name='weight'][.='45']",
-        "//lst[@name='suggest']/lst[@name='exampel']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='example data']",
-        "//lst[@name='suggest']/lst[@name='exampel']/arr[@name='suggestions']/lst[2]/long[@name='weight'][.='40']"
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='exampel']/int[@name='numFound'][.='2']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='example inputdata']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[1]/long[@name='weight'][.='45']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='example data']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[2]/long[@name='weight'][.='40']"
         );
     
     assertQ(req("qt", rh, 
@@ -78,11 +78,11 @@ public class SuggestComponentTest extend
         SuggesterParams.SUGGEST_BUILD, "true",
         SuggesterParams.SUGGEST_Q, "Rad",
         SuggesterParams.SUGGEST_COUNT, "2"),
-        "//lst[@name='suggest']/lst[@name='Rad']/int[@name='numFound'][.='2']",
-        "//lst[@name='suggest']/lst[@name='Rad']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='Rad fox']",
-        "//lst[@name='suggest']/lst[@name='Rad']/arr[@name='suggestions']/lst[1]/long[@name='weight'][.='35']",
-        "//lst[@name='suggest']/lst[@name='Rad']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='Red fox']",
-        "//lst[@name='suggest']/lst[@name='Rad']/arr[@name='suggestions']/lst[2]/long[@name='weight'][.='30']"
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='Rad']/int[@name='numFound'][.='2']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='Rad']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='Rad fox']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='Rad']/arr[@name='suggestions']/lst[1]/long[@name='weight'][.='35']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='Rad']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='Red fox']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='Rad']/arr[@name='suggestions']/lst[2]/long[@name='weight'][.='30']"
         );
   }
   
@@ -93,11 +93,11 @@ public class SuggestComponentTest extend
         SuggesterParams.SUGGEST_BUILD, "true",
         SuggesterParams.SUGGEST_Q, "exampel",
         SuggesterParams.SUGGEST_COUNT, "2"),
-        "//lst[@name='suggest']/lst[@name='exampel']/int[@name='numFound'][.='2']",
-        "//lst[@name='suggest']/lst[@name='exampel']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='example inputdata']",
-        "//lst[@name='suggest']/lst[@name='exampel']/arr[@name='suggestions']/lst[1]/long[@name='weight'][.='120']",
-        "//lst[@name='suggest']/lst[@name='exampel']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='example data']",
-        "//lst[@name='suggest']/lst[@name='exampel']/arr[@name='suggestions']/lst[2]/long[@name='weight'][.='110']"
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_expr_dict']/lst[@name='exampel']/int[@name='numFound'][.='2']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_expr_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='example inputdata']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_expr_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[1]/long[@name='weight'][.='120']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_expr_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='example data']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_expr_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[2]/long[@name='weight'][.='110']"
         );
   }
   
@@ -108,11 +108,62 @@ public class SuggestComponentTest extend
         SuggesterParams.SUGGEST_BUILD, "true",
         SuggesterParams.SUGGEST_Q, "chn",
         SuggesterParams.SUGGEST_COUNT, "2"),
-        "//lst[@name='suggest']/lst[@name='chn']/int[@name='numFound'][.='2']",
-        "//lst[@name='suggest']/lst[@name='chn']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='chance']",
-        "//lst[@name='suggest']/lst[@name='chn']/arr[@name='suggestions']/lst[1]/long[@name='weight'][.='1']",
-        "//lst[@name='suggest']/lst[@name='chn']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='change']",
-        "//lst[@name='suggest']/lst[@name='chn']/arr[@name='suggestions']/lst[2]/long[@name='weight'][.='1']"
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_file_based']/lst[@name='chn']/int[@name='numFound'][.='2']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_file_based']/lst[@name='chn']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='chance']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_file_based']/lst[@name='chn']/arr[@name='suggestions']/lst[1]/long[@name='weight'][.='1']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_file_based']/lst[@name='chn']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='change']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_file_based']/lst[@name='chn']/arr[@name='suggestions']/lst[2]/long[@name='weight'][.='1']"
         );
   }
+  @Test
+  public void testMultiSuggester() throws Exception {
+    assertQ(req("qt", rh, 
+        SuggesterParams.SUGGEST_DICT, "suggest_fuzzy_doc_dict",
+        SuggesterParams.SUGGEST_DICT, "suggest_fuzzy_doc_expr_dict",
+        SuggesterParams.SUGGEST_BUILD, "true",
+        SuggesterParams.SUGGEST_Q, "exampel",
+        SuggesterParams.SUGGEST_COUNT, "2"),
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='exampel']/int[@name='numFound'][.='2']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='example inputdata']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[1]/long[@name='weight'][.='45']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='example data']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[2]/long[@name='weight'][.='40']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_expr_dict']/lst[@name='exampel']/int[@name='numFound'][.='2']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_expr_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='example inputdata']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_expr_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[1]/long[@name='weight'][.='120']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_expr_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='example data']",
+        "//lst[@name='suggest']/lst[@name='suggest_fuzzy_doc_expr_dict']/lst[@name='exampel']/arr[@name='suggestions']/lst[2]/long[@name='weight'][.='110']"
+        );
+  }
+  
+  @Test
+  public void testBuildAllSuggester() throws Exception {
+    assertQ(req("qt", rh, 
+        SuggesterParams.SUGGEST_BUILD_ALL, "true",
+        SuggesterParams.SUGGEST_Q, "exampel",
+        SuggesterParams.SUGGEST_COUNT, "2"),
+        "//str[@name='command'][.='buildAll']"
+        );
+    
+    assertQ(req("qt", rh, 
+        SuggesterParams.SUGGEST_BUILD_ALL, "true"),
+        "//str[@name='command'][.='buildAll']"
+        );
+  }
+  
+  @Test
+  public void testReloadAllSuggester() throws Exception {
+    assertQ(req("qt", rh, 
+        SuggesterParams.SUGGEST_RELOAD_ALL, "true",
+        SuggesterParams.SUGGEST_Q, "exampel",
+        SuggesterParams.SUGGEST_COUNT, "2"),
+        "//str[@name='command'][.='reloadAll']"
+        );
+    
+    assertQ(req("qt", rh, 
+        SuggesterParams.SUGGEST_RELOAD_ALL, "true"),
+        "//str[@name='command'][.='reloadAll']"
+        );
+  }
+  
 }

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/internal/csv/CSVPrinterTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/internal/csv/CSVPrinterTest.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/internal/csv/CSVPrinterTest.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/internal/csv/CSVPrinterTest.java Fri Jan 17 17:23:33 2014
@@ -156,11 +156,11 @@ public class CSVPrinterTest extends Test
   }
 
   public static String printable(String s) {
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     for (int i=0; i<s.length(); i++) {
       char ch = s.charAt(i);
       if (ch<=' ' || ch>=128) {
-        sb.append("(" + (int)ch + ")");
+        sb.append("(").append((int)ch).append(")");
       } else {
         sb.append(ch);
       }

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/internal/csv/writer/CSVConfigGuesserTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/internal/csv/writer/CSVConfigGuesserTest.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/internal/csv/writer/CSVConfigGuesserTest.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/internal/csv/writer/CSVConfigGuesserTest.java Fri Jan 17 17:23:33 2014
@@ -54,7 +54,7 @@ public class CSVConfigGuesserTest extend
         field.setSize(4);
         expected.addField(field);
         expected.addField(field);
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("1234;abcd;1234\n");
         sb.append("abcd;1234;abcd");
         ByteArrayInputStream in = new ByteArrayInputStream(sb.toString().getBytes("UTF-8"));
@@ -77,7 +77,7 @@ public class CSVConfigGuesserTest extend
         expected.setFill(CSVConfig.FILLRIGHT);
         expected.setIgnoreValueDelimiter(false);
 //        expected.setFixedWidth(false);
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("1,2,3,4\n");
         sb.append("abcd,1234,abcd,1234");
         ByteArrayInputStream in = new ByteArrayInputStream(sb.toString().getBytes("UTF-8"));

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/schema/SortableBinaryField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/schema/SortableBinaryField.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/schema/SortableBinaryField.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/schema/SortableBinaryField.java Fri Jan 17 17:23:33 2014
@@ -39,10 +39,7 @@ public class SortableBinaryField extends
 
   @Override
   public void checkSchemaField(final SchemaField field) {
-    if (field.hasDocValues() && !field.multiValued() && !(field.isRequired() || field.getDefaultValue() != null)) {
-      throw new IllegalStateException(
-          "Field " + this + " has single-valued doc values enabled, but has no default value and is not required");
-    }
+    // NOOP, It's Aaaaaall Good.
   }
 
   @Override

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/search/TestFiltering.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/search/TestFiltering.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/search/TestFiltering.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/search/TestFiltering.java Fri Jan 17 17:23:33 2014
@@ -20,6 +20,7 @@ package org.apache.solr.search;
 
 import org.apache.lucene.util.OpenBitSet;
 import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.request.SolrQueryRequest;
 import org.junit.BeforeClass;
@@ -259,6 +260,8 @@ public class TestFiltering extends SolrT
         }
       }
       assertU(commit());
+      // sanity check
+      assertJQ(req("q", "*:*"), "/response/numFound==" + model.indexSize);
 
       int totalMatches=0;
       int nonZeros=0;
@@ -322,11 +325,10 @@ public class TestFiltering extends SolrT
         } catch (Exception e) {
           // show the indexIter and queryIter for easier debugging
           SolrException.log(log, e);
-          String s= "FAILURE: iiter=" + iiter + " qiter=" + qiter + " request="+params;
+          String s= "FAILURE: indexSize=" + model.indexSize + " iiter=" + iiter + " qiter=" + qiter + " request="+params;
           log.error(s);
           fail(s);
         }
-
       }
 
       // After making substantial changes to this test, make sure that we still get a
@@ -336,4 +338,43 @@ public class TestFiltering extends SolrT
     }
   }
 
+  public void testHossssSanity() throws Exception {
+    clearIndex();
+
+    SolrParams match_0 
+      = params("q",  "{!frange v=val_i l=0 u=1}",
+               "fq", "{!frange v=val_i l=1 u=1}",
+               "fq", "{!frange v=val_i l=0 u=1}",
+               "fq", "-_query_:\"{!frange v=val_i l=1 u=1}\"",
+               "fq", "-_query_:\"{!frange v=val_i l=0 u=1}\"");
+    
+    SolrParams match_1
+      = params("q",  "{!frange v=val_i l=0 u=1}",
+               "fq", "{!frange v=val_i l=0 u=1}",
+               "fq", "{!frange v=val_i l=0 u=1}",
+               "fq", "-_query_:\"{!frange v=val_i l=1 u=1}\"",
+               "fq", "-_query_:\"{!frange v=val_i l=1 u=1}\"");
+    
+    final int numDocs = 10;
+
+    for (int i = 0; i < numDocs; i++) {
+      String val = Integer.toString(i);
+      assertU(adoc("id",val,f,val));
+    }
+    assertU(commit());
+
+    // sanity check
+    assertJQ(req("q", "*:*"), "/response/numFound==" + numDocs);
+
+    // 1 then 0
+    assertJQ(req(match_1), "/response/numFound==1");
+    assertJQ(req(match_0), "/response/numFound==0");
+
+    // clear caches
+    assertU(commit());
+
+    // 0 then 1
+    assertJQ(req(match_0), "/response/numFound==0");
+    assertJQ(req(match_1), "/response/numFound==1");
+  }
 }

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/spelling/TestSuggestSpellingConverter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/spelling/TestSuggestSpellingConverter.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/spelling/TestSuggestSpellingConverter.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/spelling/TestSuggestSpellingConverter.java Fri Jan 17 17:23:33 2014
@@ -48,8 +48,8 @@ public class TestSuggestSpellingConverte
     // lowercases, removes field names, other syntax, collapses runs of whitespace, etc.
     converter.setAnalyzer(new Analyzer() {
       @Override
-      protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
-        Tokenizer tokenizer = new KeywordTokenizer(reader);
+      protected TokenStreamComponents createComponents(String fieldName) {
+        Tokenizer tokenizer = new KeywordTokenizer();
         TokenStream filter = new PatternReplaceFilter(tokenizer, 
             Pattern.compile("([^\\p{L}\\p{M}\\p{N}\\p{Cs}]*[\\p{L}\\p{M}\\p{N}\\p{Cs}\\_]+:)|([^\\p{L}\\p{M}\\p{N}\\p{Cs}])+"), " ", true);
         filter = new LowerCaseFilter(TEST_VERSION_CURRENT, filter);

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/spelling/suggest/TestFileDictionaryLookup.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/spelling/suggest/TestFileDictionaryLookup.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/spelling/suggest/TestFileDictionaryLookup.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/spelling/suggest/TestFileDictionaryLookup.java Fri Jan 17 17:23:33 2014
@@ -22,39 +22,40 @@ import org.junit.BeforeClass;
 
 public class TestFileDictionaryLookup extends SolrTestCaseJ4  {
   static final String REQUEST_URI = "/fuzzy_suggest_analyzing_with_file_dict";
+  static final String DICT_NAME = "fuzzy_suggest_analyzing_with_file_dict";
   
   @BeforeClass
   public static void beforeClass() throws Exception {
     initCore("solrconfig-phrasesuggest.xml","schema-phrasesuggest.xml");
-    assertQ(req("qt", REQUEST_URI, "q", "", SuggesterParams.SUGGEST_BUILD, "true"));
+    assertQ(req("qt", REQUEST_URI, "q", "", SuggesterParams.SUGGEST_DICT, DICT_NAME, SuggesterParams.SUGGEST_BUILD, "true"));
   }
   
   public void testDefault() throws Exception {
     
     // tests to demonstrate default maxEdit parameter (value: 1), control for testWithMaxEdit2
-    assertQ(req("qt", REQUEST_URI, "q", "chagn", SuggesterParams.SUGGEST_COUNT, "3"),
-      "//lst[@name='suggest']/lst[@name='chagn']/int[@name='numFound'][.='2']",
-      "//lst[@name='suggest']/lst[@name='chagn']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='chance']",
-      "//lst[@name='suggest']/lst[@name='chagn']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='change']"
+    assertQ(req("qt", REQUEST_URI, "q", "chagn", SuggesterParams.SUGGEST_DICT, DICT_NAME, SuggesterParams.SUGGEST_COUNT, "3"),
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chagn']/int[@name='numFound'][.='2']",
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chagn']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='chance']",
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chagn']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='change']"
       );
     
-    assertQ(req("qt", REQUEST_URI, "q", "chacn", SuggesterParams.SUGGEST_COUNT, "3"),
-      "//lst[@name='suggest']/lst[@name='chacn']/int[@name='numFound'][.='2']",
-      "//lst[@name='suggest']/lst[@name='chacn']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='chance']",
-      "//lst[@name='suggest']/lst[@name='chacn']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='change']"
+    assertQ(req("qt", REQUEST_URI, "q", "chacn", SuggesterParams.SUGGEST_DICT, DICT_NAME, SuggesterParams.SUGGEST_COUNT, "3"),
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chacn']/int[@name='numFound'][.='2']",
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chacn']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='chance']",
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chacn']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='change']"
       );
     
-    assertQ(req("qt", REQUEST_URI, "q", "chagr", SuggesterParams.SUGGEST_COUNT, "3"),
-      "//lst[@name='suggest']/lst[@name='chagr']/int[@name='numFound'][.='1']",
-      "//lst[@name='suggest']/lst[@name='chagr']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='charge']"
+    assertQ(req("qt", REQUEST_URI, "q", "chagr", SuggesterParams.SUGGEST_DICT, DICT_NAME, SuggesterParams.SUGGEST_COUNT, "3"),
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chagr']/int[@name='numFound'][.='1']",
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chagr']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='charge']"
       );
     
-    assertQ(req("qt", REQUEST_URI, "q", "chanr", SuggesterParams.SUGGEST_COUNT, "3"),
-    "//lst[@name='suggest']/lst[@name='chanr']/int[@name='numFound'][.='3']"
+    assertQ(req("qt", REQUEST_URI, "q", "chanr", SuggesterParams.SUGGEST_DICT, DICT_NAME, SuggesterParams.SUGGEST_COUNT, "3"),
+    "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chanr']/int[@name='numFound'][.='3']"
     );
     
-    assertQ(req("qt", REQUEST_URI, "q", "cyhnce", SuggesterParams.SUGGEST_COUNT, "3"),
-    "//lst[@name='suggest']/lst[@name='cyhnce']/int[@name='numFound'][.='0']"
+    assertQ(req("qt", REQUEST_URI, "q", "cyhnce", SuggesterParams.SUGGEST_DICT, DICT_NAME, SuggesterParams.SUGGEST_COUNT, "3"),
+    "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='cyhnce']/int[@name='numFound'][.='0']"
     );
   }
 }

Modified: lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/spelling/suggest/TestHighFrequencyDictionaryFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/spelling/suggest/TestHighFrequencyDictionaryFactory.java?rev=1559196&r1=1559195&r2=1559196&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/spelling/suggest/TestHighFrequencyDictionaryFactory.java (original)
+++ lucene/dev/branches/lucene5376/solr/core/src/test/org/apache/solr/spelling/suggest/TestHighFrequencyDictionaryFactory.java Fri Jan 17 17:23:33 2014
@@ -23,6 +23,7 @@ import org.junit.BeforeClass;
 public class TestHighFrequencyDictionaryFactory extends SolrTestCaseJ4  {
   
   static final String REQUEST_URI = "/fuzzy_suggest_analyzing_with_high_freq_dict";
+  static final String DICT_NAME = "fuzzy_suggest_analyzing_with_high_freq_dict";
 
   @BeforeClass
   public static void beforeClass() throws Exception {
@@ -39,36 +40,36 @@ public class TestHighFrequencyDictionary
             "stext", "chance"));
 
     assertU(commit());
-    assertQ(req("qt", REQUEST_URI, "q", "", SuggesterParams.SUGGEST_BUILD, "true"));
+    assertQ(req("qt", REQUEST_URI, "q", "", SuggesterParams.SUGGEST_DICT, DICT_NAME, SuggesterParams.SUGGEST_BUILD, "true"));
   }
   
   
   public void testDefault() throws Exception {
     
  // tests to demonstrate default maxEdit parameter (value: 1), control for testWithMaxEdit2
-    assertQ(req("qt", REQUEST_URI, "q", "chagn", SuggesterParams.SUGGEST_COUNT, "3"),
-      "//lst[@name='suggest']/lst[@name='chagn']/int[@name='numFound'][.='2']",
-      "//lst[@name='suggest']/lst[@name='chagn']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='chance']",
-      "//lst[@name='suggest']/lst[@name='chagn']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='change']"
+    assertQ(req("qt", REQUEST_URI, "q", "chagn", SuggesterParams.SUGGEST_DICT, DICT_NAME, SuggesterParams.SUGGEST_COUNT, "3"),
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chagn']/int[@name='numFound'][.='2']",
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chagn']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='chance']",
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chagn']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='change']"
       );
     
-    assertQ(req("qt", REQUEST_URI, "q", "chacn", SuggesterParams.SUGGEST_COUNT, "3"),
-      "//lst[@name='suggest']/lst[@name='chacn']/int[@name='numFound'][.='2']",
-      "//lst[@name='suggest']/lst[@name='chacn']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='chance']",
-      "//lst[@name='suggest']/lst[@name='chacn']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='change']"
+    assertQ(req("qt", REQUEST_URI, "q", "chacn", SuggesterParams.SUGGEST_DICT, DICT_NAME, SuggesterParams.SUGGEST_COUNT, "3"),
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chacn']/int[@name='numFound'][.='2']",
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chacn']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='chance']",
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chacn']/arr[@name='suggestions']/lst[2]/str[@name='term'][.='change']"
       );
     
-    assertQ(req("qt", REQUEST_URI, "q", "chagr", SuggesterParams.SUGGEST_COUNT, "3"),
-      "//lst[@name='suggest']/lst[@name='chagr']/int[@name='numFound'][.='1']",
-      "//lst[@name='suggest']/lst[@name='chagr']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='charge']"
+    assertQ(req("qt", REQUEST_URI, "q", "chagr", SuggesterParams.SUGGEST_DICT, DICT_NAME, SuggesterParams.SUGGEST_COUNT, "3"),
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chagr']/int[@name='numFound'][.='1']",
+      "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chagr']/arr[@name='suggestions']/lst[1]/str[@name='term'][.='charge']"
       );
     
-    assertQ(req("qt", REQUEST_URI, "q", "chanr", SuggesterParams.SUGGEST_COUNT, "3"),
-    "//lst[@name='suggest']/lst[@name='chanr']/int[@name='numFound'][.='3']"
+    assertQ(req("qt", REQUEST_URI, "q", "chanr", SuggesterParams.SUGGEST_DICT, DICT_NAME, SuggesterParams.SUGGEST_COUNT, "3"),
+    "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='chanr']/int[@name='numFound'][.='3']"
     );
     
-    assertQ(req("qt", REQUEST_URI, "q", "cyhnce", SuggesterParams.SUGGEST_COUNT, "3"),
-    "//lst[@name='suggest']/lst[@name='cyhnce']/int[@name='numFound'][.='0']"
+    assertQ(req("qt", REQUEST_URI, "q", "cyhnce", SuggesterParams.SUGGEST_DICT, DICT_NAME, SuggesterParams.SUGGEST_COUNT, "3"),
+    "//lst[@name='suggest']/lst[@name='"+ DICT_NAME +"']/lst[@name='cyhnce']/int[@name='numFound'][.='0']"
     );
   }
 }



Mime
View raw message