mirror of https://github.com/apache/lucene.git
fix small problems with term vectors
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/realtime_search@1073415 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6b9c787a9b
commit
541a7263fa
|
@ -94,7 +94,6 @@ final class TermVectorsTermsWriter extends TermsHashConsumer {
|
|||
// 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 extends TermsHashConsumer {
|
|||
|
||||
assert docWriter.writer.testPoint("TermVectorsTermsWriter.finishDocument start");
|
||||
|
||||
if (numVectorFields == 0) {
|
||||
if (!hasVectors) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -201,7 +200,6 @@ final class TermVectorsTermsWriter extends TermsHashConsumer {
|
|||
@Override
|
||||
void startDocument() throws IOException {
|
||||
assert clearLastVectorFieldName();
|
||||
perFields = new TermVectorsTermsWriterPerField[1];
|
||||
reset();
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ final class TermVectorsTermsWriterPerField extends TermsHashConsumerPerField {
|
|||
}
|
||||
|
||||
if (doVectors) {
|
||||
termsWriter.hasVectors = true;
|
||||
if (termsWriter.tvx != null) {
|
||||
if (termsHashPerField.bytesHash.size() != 0) {
|
||||
// Only necessary if previous doc hit a
|
||||
|
|
Loading…
Reference in New Issue