lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject svn commit: r1051624 - in /lucene/solr/branches/branch-1.4: ./ src/java/org/apache/solr/handler/ src/java/org/apache/solr/request/ src/java/org/apache/solr/search/ src/solrj/org/apache/solr/client/solrj/impl/ src/solrj/org/apache/solr/client/solrj/requ...
Date Tue, 21 Dec 2010 19:34:39 GMT
Author: hossman
Date: Tue Dec 21 19:34:39 2010
New Revision: 1051624

URL: http://svn.apache.org/viewvc?rev=1051624&view=rev
Log:
SOLR-1993: merge r1051611 from trunk, manually massaged patch from Maxim Valyanskiy

Added:
    lucene/solr/branches/branch-1.4/src/test/org/apache/solr/client/solrj/embedded/SolrExampleBinaryTest.java
  (with props)
Modified:
    lucene/solr/branches/branch-1.4/   (props changed)
    lucene/solr/branches/branch-1.4/CHANGES.txt
    lucene/solr/branches/branch-1.4/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java
  (props changed)
    lucene/solr/branches/branch-1.4/src/java/org/apache/solr/handler/DumpRequestHandler.java
  (props changed)
    lucene/solr/branches/branch-1.4/src/java/org/apache/solr/handler/MoreLikeThisHandler.java
  (props changed)
    lucene/solr/branches/branch-1.4/src/java/org/apache/solr/request/RawResponseWriter.java
  (props changed)
    lucene/solr/branches/branch-1.4/src/java/org/apache/solr/search/SolrFieldCacheMBean.java
  (props changed)
    lucene/solr/branches/branch-1.4/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
  (props changed)
    lucene/solr/branches/branch-1.4/src/solrj/org/apache/solr/client/solrj/request/JavaBinUpdateRequestCodec.java

Propchange: lucene/solr/branches/branch-1.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 21 19:34:39 2010
@@ -1,2 +1,2 @@
-/lucene/dev/trunk/solr:950125,954336
+/lucene/dev/trunk/solr:950125,954336,1051611
 /lucene/solr/trunk:881642,881906,882734,882838,883178,883388,883518,883566,884393,890243,891596,891889,892217,898119,903271,909705,911245,919871,925898

Modified: lucene/solr/branches/branch-1.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/branches/branch-1.4/CHANGES.txt?rev=1051624&r1=1051623&r2=1051624&view=diff
==============================================================================
--- lucene/solr/branches/branch-1.4/CHANGES.txt (original)
+++ lucene/solr/branches/branch-1.4/CHANGES.txt Tue Dec 21 19:34:39 2010
@@ -68,6 +68,10 @@ Bug Fixes
 * SOLR-1667: PatternTokenizer does not reset attributes such as positionIncrement
   (Robert Muir via shalin)
 
+ * SOLR-1993: fix String cast assumption in JavaBinCodec - specific
+   addresses "commitWithin" option on Update requests.
+   (noble, hossman, and Maxim Valyanskiy)
+
 ================== Release 1.4.1 ==================
 Release Date:  See http://lucene.apache.org/solr for the official release date.
 

Propchange: lucene/solr/branches/branch-1.4/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 21 19:34:39 2010
@@ -1,2 +1,2 @@
-/lucene/dev/trunk/solr/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java:950125,954336
+/lucene/dev/trunk/solr/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java:950125,954336,1051611
 /lucene/solr/trunk/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java:881642,881906,882734,882838,883178,883388,883518,883566,884393,890243,891596,891889,892217,898119,903271,906553,909705,911245,919871,925898

Propchange: lucene/solr/branches/branch-1.4/src/java/org/apache/solr/handler/DumpRequestHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 21 19:34:39 2010
@@ -1,2 +1,2 @@
-/lucene/dev/trunk/solr/src/java/org/apache/solr/handler/DumpRequestHandler.java:950125,954336
+/lucene/dev/trunk/solr/src/java/org/apache/solr/handler/DumpRequestHandler.java:950125,954336,1051611
 /lucene/solr/trunk/src/java/org/apache/solr/handler/DumpRequestHandler.java:881642,881906,882734,882838,883178,883388,883518,883566,884393,890243,891596,891889,892217,898119,903271,906553,909705,911245,919871,925898

Propchange: lucene/solr/branches/branch-1.4/src/java/org/apache/solr/handler/MoreLikeThisHandler.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 21 19:34:39 2010
@@ -1,2 +1,2 @@
-/lucene/dev/trunk/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java:950125,954336
+/lucene/dev/trunk/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java:950125,954336,1051611
 /lucene/solr/trunk/src/java/org/apache/solr/handler/MoreLikeThisHandler.java:881642,881906,882734,882838,883178,883388,883518,883566,884393,890243,891596,891889,892217,898119,903271,906553,909705,911245,919871,925898

Propchange: lucene/solr/branches/branch-1.4/src/java/org/apache/solr/request/RawResponseWriter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 21 19:34:39 2010
@@ -1,3 +1,3 @@
-/lucene/dev/trunk/solr/src/java/org/apache/solr/request/RawResponseWriter.java:950125,954336
+/lucene/dev/trunk/solr/src/java/org/apache/solr/request/RawResponseWriter.java:950125,954336,1051611
 /lucene/solr/trunk/src/java/org/apache/solr/request/RawResponseWriter.java:881642,881906,882734,882838,883178,883388,883518,883566,884393,890243,891596,891889,892217,898119,903271,909705,911245,919871,925898
 /lucene/solr/trunk/src/java/org/apache/solr/response/RawResponseWriter.java:906553

Propchange: lucene/solr/branches/branch-1.4/src/java/org/apache/solr/search/SolrFieldCacheMBean.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 21 19:34:39 2010
@@ -1,2 +1,2 @@
-/lucene/dev/trunk/solr/src/java/org/apache/solr/search/SolrFieldCacheMBean.java:950125,954336,984589
+/lucene/dev/trunk/solr/src/java/org/apache/solr/search/SolrFieldCacheMBean.java:950125,954336,984589,1051611
 /lucene/solr/trunk/src/java/org/apache/solr/search/SolrFieldCacheMBean.java:881642,881906,882734,882838,883178,883388,883518,883566,884393,890243,891596,891889,892217,898119,903271,909705,911245,919871,925898

Propchange: lucene/solr/branches/branch-1.4/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 21 19:34:39 2010
@@ -1,2 +1,2 @@
-/lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java:950125,954336
+/lucene/dev/trunk/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java:950125,954336,1051611
 /lucene/solr/trunk/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java:829939-906553,909705,911245,919871,925898

Modified: lucene/solr/branches/branch-1.4/src/solrj/org/apache/solr/client/solrj/request/JavaBinUpdateRequestCodec.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/branch-1.4/src/solrj/org/apache/solr/client/solrj/request/JavaBinUpdateRequestCodec.java?rev=1051624&r1=1051623&r2=1051624&view=diff
==============================================================================
--- lucene/solr/branches/branch-1.4/src/solrj/org/apache/solr/client/solrj/request/JavaBinUpdateRequestCodec.java
(original)
+++ lucene/solr/branches/branch-1.4/src/solrj/org/apache/solr/client/solrj/request/JavaBinUpdateRequestCodec.java
Tue Dec 21 19:34:39 2010
@@ -128,7 +128,7 @@ public class JavaBinUpdateRequestCodec {
 
       private List readOuterMostDocIterator(FastInputStream fis) throws IOException {
         NamedList params = (NamedList) namedList[0].getVal(0);
-        updateRequest.setParams(namedListToSolrParams(params));
+        updateRequest.setParams(new ModifiableSolrParams(SolrParams.toSolrParams(params)));
         if (handler == null) return super.readIterator(fis);
         while (true) {
           Object o = readVal(fis);
@@ -207,17 +207,6 @@ public class JavaBinUpdateRequestCodec {
     return nl;
   }
 
-  private ModifiableSolrParams namedListToSolrParams(NamedList nl) {
-    ModifiableSolrParams solrParams = new ModifiableSolrParams();
-    for (int i = 0; i < nl.size(); i++) {
-      List<String> l = (List) nl.getVal(i);
-      if (l != null)
-        solrParams.add(nl.getName(i),
-                (String[]) l.toArray(new String[l.size()]));
-    }
-    return solrParams;
-  }
-
   public static interface StreamingDocumentHandler {
     public void document(SolrInputDocument document, UpdateRequest req);
   }

Added: lucene/solr/branches/branch-1.4/src/test/org/apache/solr/client/solrj/embedded/SolrExampleBinaryTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/branch-1.4/src/test/org/apache/solr/client/solrj/embedded/SolrExampleBinaryTest.java?rev=1051624&view=auto
==============================================================================
--- lucene/solr/branches/branch-1.4/src/test/org/apache/solr/client/solrj/embedded/SolrExampleBinaryTest.java
(added)
+++ lucene/solr/branches/branch-1.4/src/test/org/apache/solr/client/solrj/embedded/SolrExampleBinaryTest.java
Tue Dec 21 19:34:39 2010
@@ -0,0 +1,55 @@
+/**
+ * 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.
+ */
+
+package org.apache.solr.client.solrj.embedded;
+
+import org.apache.solr.client.solrj.SolrExampleTests;
+import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.impl.BinaryRequestWriter;
+import org.apache.solr.client.solrj.impl.BinaryResponseParser;
+import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
+import org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer;
+import org.junit.BeforeClass;
+
+
+/**
+ * A subclass of SolrExampleTests that explicitly uses the binary 
+ * codec for communication. 
+ */
+public class SolrExampleBinaryTest extends SolrExampleJettyTest {
+  @Override
+  public SolrServer createNewSolrServer()
+  {
+    try {
+      // setup the server...
+      String url = "http://localhost:"+port+context;
+      CommonsHttpSolrServer s = new CommonsHttpSolrServer( url );
+      s.setConnectionTimeout(100); // 1/10th sec
+      s.setDefaultMaxConnectionsPerHost(100);
+      s.setMaxTotalConnections(100);
+
+      // setup binary mode
+      s.setParser(new BinaryResponseParser());
+      s.setRequestWriter(new BinaryRequestWriter());
+
+      return s;
+    }
+    catch( Exception ex ) {
+      throw new RuntimeException( ex );
+    }
+  }
+}

Propchange: lucene/solr/branches/branch-1.4/src/test/org/apache/solr/client/solrj/embedded/SolrExampleBinaryTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/solr/branches/branch-1.4/src/test/org/apache/solr/client/solrj/embedded/SolrExampleBinaryTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL



Mime
View raw message