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

svn commit: r1026453 - in /lucene/dev/branches/docvalues/lucene: contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ src/java/org/apache/lucene/document/ src/java/org/apache/lucene/index/values/

Author: simonw
Date: Fri Oct 22 19:12:12 2010
New Revision: 1026453

URL: http://svn.apache.org/viewvc?rev=1026453&view=rev
Log:
fixed copy method in ValuesAttribute

Modified:
    lucene/dev/branches/docvalues/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java
    lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/document/ValuesField.java
    lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/values/ValuesAttributeImpl.java

Modified: lucene/dev/branches/docvalues/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java?rev=1026453&r1=1026452&r2=1026453&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java (original)
+++ lucene/dev/branches/docvalues/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java Fri Oct 22 19:12:12 2010
@@ -175,7 +175,8 @@ public class DocMaker {
     Field idField = ds.getField(ID_FIELD, storeVal, Index.NOT_ANALYZED_NO_NORMS, termVecVal);
     idField.setValue("doc" + (r != null ? r.nextInt(updateDocIDLimit) : incrNumDocsCreated()));
     doc.add(idField);
-    
+    trySetIndexValues(idField);
+
     // Set NAME_FIELD
     String name = docData.getName();
     if (name == null) name = "";
@@ -390,16 +391,15 @@ public class DocMaker {
     String[] split = fields.split(";");
     Map<String, Values> result = new HashMap<String, Values>();
     for (String tuple : split) {
-      final String[] nameValue = tuple.split(":");
+      final String[] nameValue = tuple.split("=");
       if (nameValue.length != 2) {
         throw new IllegalArgumentException("illegal doc.stored.values format: "
-            + fields + " expected fieldname:ValuesType;...;...;");
+            + fields + " expected fieldname=ValuesType;...;...;");
       }
       result.put(nameValue[0].trim(), Values.valueOf(nameValue[1]));
     }
     return result;
   }
-  
   /** Set the configuration parameters of this doc maker. */
   public void setConfig(Config config) {
     this.config = config;

Modified: lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/document/ValuesField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/document/ValuesField.java?rev=1026453&r1=1026452&r2=1026453&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/document/ValuesField.java (original)
+++ lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/document/ValuesField.java Fri Oct 22 19:12:12 2010
@@ -130,7 +130,6 @@ public class ValuesField extends Abstrac
     default:
       throw new IllegalArgumentException("unknown type: " + type);
     }
-    
     return valField.set(field);
   }
 }

Modified: lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/values/ValuesAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/values/ValuesAttributeImpl.java?rev=1026453&r1=1026452&r2=1026453&view=diff
==============================================================================
--- lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/values/ValuesAttributeImpl.java (original)
+++ lucene/dev/branches/docvalues/lucene/src/java/org/apache/lucene/index/values/ValuesAttributeImpl.java Fri Oct 22 19:12:12 2010
@@ -77,15 +77,15 @@ public class ValuesAttributeImpl extends
     case BYTES_VAR_DEREF:
     case BYTES_VAR_SORTED:
     case BYTES_VAR_STRAIGHT:
-      bytes = (BytesRef) other.bytes.clone();
+      other.bytes.copy(bytes);
       break;
     case PACKED_INTS:
     case PACKED_INTS_FIXED:
-      ints = (LongsRef) other.ints.clone();
+      other.ints.copy(ints);
       break;
     case SIMPLE_FLOAT_4BYTE:
     case SIMPLE_FLOAT_8BYTE:
-      floats = (FloatsRef) other.floats.clone();
+      other.floats.copy(floats);
       break;
 
     }