mirror of https://github.com/apache/lucene.git
don't create new Term() for every term flushed when there are deletes
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1405420 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7897cff44c
commit
fb9f59e9ea
|
@ -376,6 +376,7 @@ final class FreqProxTermsWriterPerField extends TermsHashConsumerPerField implem
|
||||||
long sumTotalTermFreq = 0;
|
long sumTotalTermFreq = 0;
|
||||||
long sumDocFreq = 0;
|
long sumDocFreq = 0;
|
||||||
|
|
||||||
|
Term protoTerm = new Term(fieldName);
|
||||||
for (int i = 0; i < numTerms; i++) {
|
for (int i = 0; i < numTerms; i++) {
|
||||||
final int termID = termIDs[i];
|
final int termID = termIDs[i];
|
||||||
//System.out.println("term=" + termID);
|
//System.out.println("term=" + termID);
|
||||||
|
@ -398,7 +399,8 @@ final class FreqProxTermsWriterPerField extends TermsHashConsumerPerField implem
|
||||||
|
|
||||||
final int delDocLimit;
|
final int delDocLimit;
|
||||||
if (segDeletes != null) {
|
if (segDeletes != null) {
|
||||||
final Integer docIDUpto = segDeletes.get(new Term(fieldName, text));
|
protoTerm.bytes = text;
|
||||||
|
final Integer docIDUpto = segDeletes.get(protoTerm);
|
||||||
if (docIDUpto != null) {
|
if (docIDUpto != null) {
|
||||||
delDocLimit = docIDUpto;
|
delDocLimit = docIDUpto;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue