lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r1073415 - in /lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index: TermVectorsTermsWriter.java TermVectorsTermsWriterPerField.java
Date Tue, 22 Feb 2011 17:14:58 GMT
Author: buschmi
Date: Tue Feb 22 17:14:57 2011
New Revision: 1073415

URL: http://svn.apache.org/viewvc?rev=1073415&view=rev
Log:
fix small problems with term vectors

Modified:
    lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java
    lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java?rev=1073415&r1=1073414&r2=1073415&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java
(original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriter.java
Tue Feb 22 17:14:57 2011
@@ -94,7 +94,6 @@ final class TermVectorsTermsWriter exten
       // vector output files, we must abort this segment
       // because those files will be in an unknown
       // state:
-      hasVectors = true;
       tvx = docWriter.directory.createOutput(IndexFileNames.segmentFileName(docWriter.getSegment(),
"", IndexFileNames.VECTORS_INDEX_EXTENSION));
       tvd = docWriter.directory.createOutput(IndexFileNames.segmentFileName(docWriter.getSegment(),
"", IndexFileNames.VECTORS_DOCUMENTS_EXTENSION));
       tvf = docWriter.directory.createOutput(IndexFileNames.segmentFileName(docWriter.getSegment(),
"", IndexFileNames.VECTORS_FIELDS_EXTENSION));
@@ -112,7 +111,7 @@ final class TermVectorsTermsWriter exten
 
     assert docWriter.writer.testPoint("TermVectorsTermsWriter.finishDocument start");
 
-    if (numVectorFields == 0) {
+    if (!hasVectors) {
       return;
     }
 
@@ -201,7 +200,6 @@ final class TermVectorsTermsWriter exten
   @Override
   void startDocument() throws IOException {
     assert clearLastVectorFieldName();
-    perFields = new TermVectorsTermsWriterPerField[1];
     reset();
   }
 

Modified: lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java?rev=1073415&r1=1073414&r2=1073415&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java
(original)
+++ lucene/dev/branches/realtime_search/lucene/src/java/org/apache/lucene/index/TermVectorsTermsWriterPerField.java
Tue Feb 22 17:14:57 2011
@@ -70,6 +70,7 @@ final class TermVectorsTermsWriterPerFie
     }
 
     if (doVectors) {
+      termsWriter.hasVectors = true;
       if (termsWriter.tvx != null) {
         if (termsHashPerField.bytesHash.size() != 0) {
           // Only necessary if previous doc hit a



Mime
View raw message