lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1158029 [15/15] - in /lucene/dev/branches/fieldtype_conflicted: lucene/ lucene/contrib/ lucene/contrib/demo/src/java/org/apache/lucene/demo/ lucene/contrib/highlighter/src/java/org/apache/lucene/search/highlight/ lucene/contrib/highlighter...
Date Mon, 15 Aug 2011 22:03:52 GMT
Modified: lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerOptimizeTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerOptimizeTest.java?rev=1158029&r1=1158028&r2=1158029&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerOptimizeTest.java
(original)
+++ lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/update/DirectUpdateHandlerOptimizeTest.java
Mon Aug 15 22:03:41 2011
@@ -18,7 +18,12 @@ package org.apache.solr.update;
 
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
+<<<<<<<
 import org.apache.solr.common.SolrInputDocument;
+=======
+import org.apache.lucene.document.StringField;
+import org.apache.lucene.document.TextField;
+>>>>>>>
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.util.AbstractSolrTestCase;
@@ -56,9 +61,15 @@ public class DirectUpdateHandlerOptimize
     //the merge factor is 100 and the maxBufferedDocs is 2, so there should be 50 segments
     for (int i = 0; i < 99; i++) {
       // Add a valid document
+<<<<<<<
       cmd.solrDoc = new SolrInputDocument();
       cmd.solrDoc.addField("id", "id_" + i);
       cmd.solrDoc.addField("subject", "subject_" + i);
+=======
+      cmd.doc = new Document();
+      cmd.doc.add(new Field("id", StringField.TYPE_STORED, "id_" + i));
+      cmd.doc.add(new TextField("subject", "subject_" + i));
+>>>>>>>
       updater.addDoc(cmd);
     }
 

Modified: lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java?rev=1158029&r1=1158028&r2=1158029&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java
(original)
+++ lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/update/DocumentBuilderTest.java
Mon Aug 15 22:03:41 2011
@@ -109,8 +109,8 @@ public class DocumentBuilderTest extends
     doc.addField( "home", "2.2,3.3", 1.0f );
     Document out = DocumentBuilder.toDocument( doc, core.getSchema() );
     assertNotNull( out.get( "home" ) );//contains the stored value and term vector, if there
is one
-    assertNotNull( out.getFieldable( "home_0" + FieldType.POLY_FIELD_SEPARATOR + "double"
) );
-    assertNotNull( out.getFieldable( "home_1" + FieldType.POLY_FIELD_SEPARATOR + "double"
) );
+    assertNotNull( out.getField( "home_0" + FieldType.POLY_FIELD_SEPARATOR + "double" ) );
+    assertNotNull( out.getField( "home_1" + FieldType.POLY_FIELD_SEPARATOR + "double" ) );
   }
 
 }

Modified: lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/update/TestIndexingPerformance.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/update/TestIndexingPerformance.java?rev=1158029&r1=1158028&r2=1158029&view=diff
==============================================================================
--- lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/update/TestIndexingPerformance.java
(original)
+++ lucene/dev/branches/fieldtype_conflicted/solr/core/src/test/org/apache/solr/update/TestIndexingPerformance.java
Mon Aug 15 22:03:41 2011
@@ -19,8 +19,13 @@ package org.apache.solr.update;
 
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
+<<<<<<<
 import org.apache.lucene.document.Fieldable;
 import org.apache.solr.common.SolrInputDocument;
+=======
+import org.apache.lucene.document.StringField;
+import org.apache.lucene.index.IndexableField;
+>>>>>>>
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.schema.IndexSchema;
 import org.apache.solr.util.AbstractSolrTestCase;
@@ -95,7 +100,21 @@ public class TestIndexingPerformance ext
     add.overwrite = overwrite;
 
     for (int i=0; i<iter; i++) {
+<<<<<<<
       add.clear();
+=======
+      if (includeDoc || add.doc==null) {
+        add.doc = new Document();
+        idField = new Field("id",StringField.TYPE_STORED,"");
+        add.doc.add(idField);
+        for (int j=0; j<fields.length; j+=2) {
+          String field = fields[j];
+          String val = fields[j+1];
+          IndexableField f = schema.getField(field).createField(val, 1.0f);
+          add.doc.add(f);
+        }
+      }
+>>>>>>>
       add.solrDoc = new SolrInputDocument();
       add.solrDoc.addField("id", Integer.toString(i));
       for (int j=0; j<fields.length; j+=2) {



Mime
View raw message