Skip to content

Commit cad76cc

Browse files
Grammar fixes in comments (#14100)
1 parent 16da44a commit cad76cc

23 files changed

+45
-48
lines changed

lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99ScalarQuantizedVectorsWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public FlatFieldVectorsWriter<?> addField(FieldInfo fieldInfo) throws IOExceptio
223223
public void mergeOneField(FieldInfo fieldInfo, MergeState mergeState) throws IOException {
224224
rawVectorDelegate.mergeOneField(fieldInfo, mergeState);
225225
// Since we know we will not be searching for additional indexing, we can just write the
226-
// the vectors directly to the new segment.
226+
// vectors directly to the new segment.
227227
// No need to use temporary file as we don't have to re-open for reading
228228
if (fieldInfo.getVectorEncoding().equals(VectorEncoding.FLOAT32)) {
229229
ScalarQuantizer mergedQuantizationState =

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ static CompositeReaderContext create(CompositeReader reader) {
3232
}
3333

3434
/**
35-
* Creates a {@link CompositeReaderContext} for intermediate readers that aren't not top-level
36-
* readers in the current context
35+
* Creates a {@link CompositeReaderContext} for intermediate readers that aren't top-level readers
36+
* in the current context
3737
*/
3838
CompositeReaderContext(
3939
CompositeReaderContext parent,

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public static DirectoryReader open(final IndexCommit commit) throws IOException
124124

125125
/**
126126
* Expert: returns an IndexReader reading the index on the given {@link IndexCommit}. This method
127-
* allows to open indices that were created wih a Lucene version older than N-1 provided that all
127+
* allows to open indices that were created with a Lucene version older than N-1 provided that all
128128
* codecs for this index are available in the classpath and the segment file format used was
129129
* created with Lucene 7 or newer. Users of this API must be aware that Lucene doesn't guarantee
130130
* semantic compatibility for indices created with versions older than N-1. All backwards
@@ -150,8 +150,7 @@ public static DirectoryReader open(
150150
/**
151151
* If the index has changed since the provided reader was opened, open and return a new reader;
152152
* else, return null. The new reader, if not null, will be the same type of reader as the previous
153-
* one, ie an NRT reader will open a new NRT reader, a MultiReader will open a new MultiReader,
154-
* etc.
153+
* one, ie an NRT reader will open a new NRT reader etc.
155154
*
156155
* <p>This method is typically far less costly than opening a fully new <code>DirectoryReader
157156
* </code> as it shares resources (for example sub-readers) with the provided <code>
@@ -192,7 +191,7 @@ public static DirectoryReader openIfChanged(DirectoryReader oldReader, IndexComm
192191
* never returns null).
193192
*
194193
* <p>This provides "near real-time" searching, in that changes made during an {@link IndexWriter}
195-
* session can be quickly made available for searching without closing the writer nor calling
194+
* session can be quickly made available for searching without closing the writer or calling
196195
* {@link IndexWriter#commit}.
197196
*
198197
* <p>It's <i>near</i> real-time because there is no hard guarantee on how quickly you can get a

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ private void doFlush(DocumentsWriterPerThread flushingDWPT) throws IOException {
486486
* flush 'B' starts and freezes all deletes occurred since 'A' has
487487
* started. if 'B' finishes before 'A' we need to wait until 'A' is done
488488
* otherwise the deletes frozen by 'B' are not applied to 'A' and we
489-
* might miss to deletes documents in 'A'.
489+
* might miss to delete documents in 'A'.
490490
*/
491491
try {
492492
assert assertTicketQueueModification(flushingDWPT.deleteQueue);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ && delta < ramBufferGranularity()) {
216216
// we need to commit this under lock but calculate it outside of the lock to minimize the time
217217
// this lock is held
218218
// per document. The reason we update this under lock is that we mark DWPTs as pending without
219-
// acquiring it's
219+
// acquiring its
220220
// lock in #setFlushPending and this also reads the committed bytes and modifies the
221221
// flush/activeBytes.
222222
// In the future we can clean this up to be more intuitive.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ long getLastCommittedBytesUsed() {
736736
}
737737

738738
/**
739-
* Commits the current {@link #ramBytesUsed()} and stores it's value for later reuse. The last
739+
* Commits the current {@link #ramBytesUsed()} and stores its value for later reuse. The last
740740
* committed bytes used can be retrieved via {@link #getLastCommittedBytesUsed()}
741741
*/
742742
void commitLastBytesUsed(long delta) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import java.util.List;
2020

2121
/**
22-
* A struct like class that represents a hierarchical relationship between {@link IndexReader}
22+
* A struct-like class that represents a hierarchical relationship between {@link IndexReader}
2323
* instances.
2424
*/
2525
public abstract sealed class IndexReaderContext permits CompositeReaderContext, LeafReaderContext {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2979,7 +2979,7 @@ private List<Lock> acquireWriteLocks(Directory... dirs) throws IOException {
29792979
* @throws CorruptIndexException if the index is corrupt
29802980
* @throws IOException if there is a low-level IO error
29812981
* @throws IllegalArgumentException if addIndexes would cause the index to exceed {@link
2982-
* #MAX_DOCS}, or if the indoming index sort does not match this index's index sort
2982+
* #MAX_DOCS}, or if the incoming index sort does not match this index's index sort
29832983
*/
29842984
public long addIndexes(Directory... dirs) throws IOException {
29852985
ensureOpen();
@@ -6029,7 +6029,7 @@ private void processEvents(boolean triggerMerge) throws IOException {
60296029
/**
60306030
* Interface for internal atomic events. See {@link DocumentsWriter} for details. Events are
60316031
* executed concurrently and no order is guaranteed. Each event should only rely on the
6032-
* serializeability within its process method. All actions that must happen before or after a
6032+
* serializability within its process method. All actions that must happen before or after a
60336033
* certain action must be encoded inside the {@link #process(IndexWriter)} method.
60346034
*/
60356035
@FunctionalInterface

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ public boolean useCompoundFile(
756756

757757
/**
758758
* Return the byte size of the provided {@link SegmentCommitInfo}, prorated by percentage of
759-
* non-deleted documents is set.
759+
* non-deleted documents.
760760
*/
761761
protected long size(SegmentCommitInfo info, MergeContext mergeContext) throws IOException {
762762
long byteSize = info.sizeInBytes();
@@ -838,7 +838,7 @@ public void setMaxCFSSegmentSizeMB(double v) {
838838
}
839839

840840
/**
841-
* Returns true if the segment represented by the given CodecReader should be keep even if it's
841+
* Returns true if the segment represented by the given CodecReader should be kept even if it's
842842
* fully deleted. This is useful for testing of for instance if the merge policy implements
843843
* retention policies for soft deletes.
844844
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ boolean writeDocValuesUpdatesForMerge(List<SegmentCommitInfo> infos) throws IOEx
273273
}
274274

275275
/**
276-
* Returns a list of all currently maintained ReadersAndUpdates sorted by it's ram consumption
276+
* Returns a list of all currently maintained ReadersAndUpdates sorted by their ram consumption
277277
* largest to smallest. This list can also contain readers that don't consume any ram at this
278278
* point i.e. don't have any updates buffered.
279279
*/

0 commit comments

Comments
 (0)