Skip to content

Commit 2a5ae4b

Browse files
kitohavigyasharma
authored andcommitted
Deprecate MergeSpecification#segString(Directory) (#14908)
1 parent b77259c commit 2a5ae4b

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

lucene/CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ API Changes
1515
* GITHUB#14426: Support determining desired off-heap memory requirements through
1616
KnnVectorsReader::getOffHeapByteSize (Chris Hegarty)
1717

18+
* GITHUB#14899: Deprecate MergeSpecification#segString(Directory) (kitoha)
19+
1820
New Features
1921
---------------------
2022
* GITHUB#14404: Introducing DocValuesMultiRangeQuery.SortedNumericStabbingBuilder into sandbox.

lucene/core/src/java/org/apache/lucene/index/MergePolicy.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -494,16 +494,15 @@ public void add(OneMerge merge) {
494494
merges.add(merge);
495495
}
496496

497-
// TODO: deprecate me (dir is never used! and is sometimes difficult to provide!)
498-
/** Returns a description of the merges in this specification. */
497+
/**
498+
* Returns a description of the merges in this specification
499+
*
500+
* @deprecated Use {@link #toString()} instead. The {@code Directory} parameter is ignored and
501+
* will be removed in a future release.
502+
*/
503+
@Deprecated
499504
public String segString(Directory dir) {
500-
StringBuilder b = new StringBuilder();
501-
b.append("MergeSpec:\n");
502-
final int count = merges.size();
503-
for (int i = 0; i < count; i++) {
504-
b.append(" ").append(1 + i).append(": ").append(merges.get(i).segString());
505-
}
506-
return b.toString();
505+
return toString();
507506
}
508507

509508
@Override

0 commit comments

Comments
 (0)