mirror of https://github.com/apache/lucene.git
LUCENE-2693: Add delete term and query need to more precisely record the bytes used (trunk)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1062832 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2ea5e65959
commit
047d76bf6a
|
@ -689,6 +689,9 @@ Bug fixes
|
|||
internally, it now calls Similarity.idfExplain(Collection, IndexSearcher).
|
||||
(Robert Muir)
|
||||
|
||||
* LUCENE-2693: RAM used by IndexWriter was slightly incorrectly computed.
|
||||
(Jason Rutherglen via Shai Erera)
|
||||
|
||||
New features
|
||||
|
||||
* LUCENE-2128: Parallelized fetching document frequencies during weight
|
||||
|
|
|
@ -140,8 +140,11 @@ class SegmentDeletes {
|
|||
}
|
||||
|
||||
public void addQuery(Query query, int docIDUpto) {
|
||||
queries.put(query, docIDUpto);
|
||||
bytesUsed.addAndGet(BYTES_PER_DEL_QUERY);
|
||||
Integer current = queries.put(query, docIDUpto);
|
||||
// increment bytes used only if the query wasn't added so far.
|
||||
if (current == null) {
|
||||
bytesUsed.addAndGet(BYTES_PER_DEL_QUERY);
|
||||
}
|
||||
}
|
||||
|
||||
public void addDocID(int docID) {
|
||||
|
|
Loading…
Reference in New Issue