mirror of https://github.com/apache/lucene.git
Fix typos in various comments and log msgs (#1000)
This commit is contained in:
parent
451e2da779
commit
f70e21c91c
|
@ -1655,7 +1655,7 @@ public final class DirectPostingsFormat extends PostingsFormat {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Docs + freqs + positions/offets:
|
// Docs + freqs + positions/offsets:
|
||||||
private final static class LowFreqDocsEnum extends PostingsEnum {
|
private final static class LowFreqDocsEnum extends PostingsEnum {
|
||||||
private int[] postings;
|
private int[] postings;
|
||||||
private final int posMult;
|
private final int posMult;
|
||||||
|
|
|
@ -28,6 +28,6 @@ public interface TermFrequencyAttribute extends Attribute {
|
||||||
/** Set the custom term frequency of the current term within one document. */
|
/** Set the custom term frequency of the current term within one document. */
|
||||||
public void setTermFrequency(int termFrequency);
|
public void setTermFrequency(int termFrequency);
|
||||||
|
|
||||||
/** Returns the custom term frequencey. */
|
/** Returns the custom term frequency. */
|
||||||
public int getTermFrequency();
|
public int getTermFrequency();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ import org.apache.lucene.util.AttributeReflector;
|
||||||
public class TermFrequencyAttributeImpl extends AttributeImpl implements TermFrequencyAttribute, Cloneable {
|
public class TermFrequencyAttributeImpl extends AttributeImpl implements TermFrequencyAttribute, Cloneable {
|
||||||
private int termFrequency = 1;
|
private int termFrequency = 1;
|
||||||
|
|
||||||
/** Initialize this attribute with term frequencey of 1 */
|
/** Initialize this attribute with term frequency of 1 */
|
||||||
public TermFrequencyAttributeImpl() {}
|
public TermFrequencyAttributeImpl() {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -93,7 +93,7 @@ public final class CompetitiveImpactAccumulator {
|
||||||
assertConsistent();
|
assertConsistent();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get the set of competitive freq and norm pairs, orderer by increasing freq and norm. */
|
/** Get the set of competitive freq and norm pairs, ordered by increasing freq and norm. */
|
||||||
public Collection<Impact> getCompetitiveFreqNormPairs() {
|
public Collection<Impact> getCompetitiveFreqNormPairs() {
|
||||||
List<Impact> impacts = new ArrayList<>();
|
List<Impact> impacts = new ArrayList<>();
|
||||||
int maxFreqForLowerNorms = 0;
|
int maxFreqForLowerNorms = 0;
|
||||||
|
|
|
@ -515,7 +515,7 @@ final class IntersectTermsEnum extends BaseTermsEnum {
|
||||||
assert savedStartTerm == null || term.compareTo(savedStartTerm) > 0: "saveStartTerm=" + savedStartTerm.utf8ToString() + " term=" + term.utf8ToString();
|
assert savedStartTerm == null || term.compareTo(savedStartTerm) > 0: "saveStartTerm=" + savedStartTerm.utf8ToString() + " term=" + term.utf8ToString();
|
||||||
return term;
|
return term;
|
||||||
} else {
|
} else {
|
||||||
// This term is a prefix of a term accepted by the automaton, but is not itself acceptd
|
// This term is a prefix of a term accepted by the automaton, but is not itself accepted
|
||||||
}
|
}
|
||||||
|
|
||||||
isSubBlock = popPushNext();
|
isSubBlock = popPushNext();
|
||||||
|
|
|
@ -239,7 +239,7 @@ final class IndexedDISI extends DocIdSetIterator {
|
||||||
return jumps;
|
return jumps;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flushes the offet & index jump-table for blocks. This should be the last data written to out
|
// Flushes the offset & index jump-table for blocks. This should be the last data written to out
|
||||||
// This method returns the blockCount for the blocks reachable for the jump_table or -1 for no jump-table
|
// This method returns the blockCount for the blocks reachable for the jump_table or -1 for no jump-table
|
||||||
private static short flushBlockJumps(int[] jumps, int blockCount, IndexOutput out, long origo) throws IOException {
|
private static short flushBlockJumps(int[] jumps, int blockCount, IndexOutput out, long origo) throws IOException {
|
||||||
if (blockCount == 2) { // Jumps with a single real entry + NO_MORE_DOCS is just wasted space so we ignore that
|
if (blockCount == 2) { // Jumps with a single real entry + NO_MORE_DOCS is just wasted space so we ignore that
|
||||||
|
|
|
@ -193,7 +193,7 @@ class SimpleGeoJSONPolygonParser {
|
||||||
// OK, we recurse
|
// OK, we recurse
|
||||||
} else {
|
} else {
|
||||||
upto = uptoStart;
|
upto = uptoStart;
|
||||||
throw newParseException("can only handle type FeatureCollection (if it has a single polygon geometry), Feature, Polygon or MutiPolygon, but got " + type);
|
throw newParseException("can only handle type FeatureCollection (if it has a single polygon geometry), Feature, Polygon or MultiPolygon, but got " + type);
|
||||||
}
|
}
|
||||||
} else if (key.equals("coordinates") && isValidGeometryPath(path)) {
|
} else if (key.equals("coordinates") && isValidGeometryPath(path)) {
|
||||||
if (o instanceof List == false) {
|
if (o instanceof List == false) {
|
||||||
|
|
|
@ -27,7 +27,7 @@ abstract class DocValuesIterator extends DocIdSetIterator {
|
||||||
* {@code target} must be greater than or equal to the current
|
* {@code target} must be greater than or equal to the current
|
||||||
* {@link #docID() doc ID} and must be a valid doc ID, ie. ≥ 0 and
|
* {@link #docID() doc ID} and must be a valid doc ID, ie. ≥ 0 and
|
||||||
* < {@code maxDoc}.
|
* < {@code maxDoc}.
|
||||||
* After this method returns, {@link #docID()} retuns {@code target}. */
|
* After this method returns, {@link #docID()} returns {@code target}. */
|
||||||
public abstract boolean advanceExact(int target) throws IOException;
|
public abstract boolean advanceExact(int target) throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ final class DocumentsWriterPerThread {
|
||||||
private Throwable abortingException;
|
private Throwable abortingException;
|
||||||
|
|
||||||
final void onAbortingException(Throwable throwable) {
|
final void onAbortingException(Throwable throwable) {
|
||||||
assert abortingException == null: "aborting excpetion has already been set";
|
assert abortingException == null: "aborting exception has already been set";
|
||||||
abortingException = throwable;
|
abortingException = throwable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -275,7 +275,7 @@ public class FieldInfos implements Iterable<FieldInfo> {
|
||||||
private final Map<String,FieldDimensions> dimensions;
|
private final Map<String,FieldDimensions> dimensions;
|
||||||
|
|
||||||
// TODO: we should similarly catch an attempt to turn
|
// TODO: we should similarly catch an attempt to turn
|
||||||
// norms back on after they were already ommitted; today
|
// norms back on after they were already committed; today
|
||||||
// we silently discard the norm but this is badly trappy
|
// we silently discard the norm but this is badly trappy
|
||||||
private int lowestUnassignedFieldNumber = -1;
|
private int lowestUnassignedFieldNumber = -1;
|
||||||
|
|
||||||
|
|
|
@ -250,13 +250,13 @@ final class FieldUpdatesBuffer {
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
throw new UnsupportedOperationException(
|
throw new UnsupportedOperationException(
|
||||||
"this struct should not be use in map or other data-stuctures that use hashCode / equals");
|
"this struct should not be use in map or other data-structures that use hashCode / equals");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
throw new UnsupportedOperationException(
|
throw new UnsupportedOperationException(
|
||||||
"this struct should not be use in map or other data-stuctures that use hashCode / equals");
|
"this struct should not be use in map or other data-structures that use hashCode / equals");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ public class SegmentWriteState {
|
||||||
}
|
}
|
||||||
|
|
||||||
// currently only used by assert? clean up and make real check?
|
// currently only used by assert? clean up and make real check?
|
||||||
// either it's a segment suffix (_X_Y) or it's a parseable generation
|
// either it's a segment suffix (_X_Y) or it's a parsable generation
|
||||||
// TODO: this is very confusing how ReadersAndUpdates passes generations via
|
// TODO: this is very confusing how ReadersAndUpdates passes generations via
|
||||||
// this mechanism, maybe add 'generation' explicitly to ctor create the 'actual suffix' here?
|
// this mechanism, maybe add 'generation' explicitly to ctor create the 'actual suffix' here?
|
||||||
private boolean assertSegmentSuffix(String segmentSuffix) {
|
private boolean assertSegmentSuffix(String segmentSuffix) {
|
||||||
|
|
|
@ -422,7 +422,7 @@ public class IndexSearcher {
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
// general case: create a collecor and count matches
|
// general case: create a collector and count matches
|
||||||
final CollectorManager<TotalHitCountCollector, Integer> collectorManager = new CollectorManager<TotalHitCountCollector, Integer>() {
|
final CollectorManager<TotalHitCountCollector, Integer> collectorManager = new CollectorManager<TotalHitCountCollector, Integer>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -162,7 +162,7 @@ public abstract class ReferenceManager<G> implements Closeable {
|
||||||
|
|
||||||
private void doMaybeRefresh() throws IOException {
|
private void doMaybeRefresh() throws IOException {
|
||||||
// it's ok to call lock() here (blocking) because we're supposed to get here
|
// it's ok to call lock() here (blocking) because we're supposed to get here
|
||||||
// from either maybeRefreh() or maybeRefreshBlocking(), after the lock has
|
// from either maybeRefresh() or maybeRefreshBlocking(), after the lock has
|
||||||
// already been obtained. Doing that protects us from an accidental bug
|
// already been obtained. Doing that protects us from an accidental bug
|
||||||
// where this method will be called outside the scope of refreshLock.
|
// where this method will be called outside the scope of refreshLock.
|
||||||
// Per ReentrantLock's javadoc, calling lock() by the same thread more than
|
// Per ReentrantLock's javadoc, calling lock() by the same thread more than
|
||||||
|
|
|
@ -496,7 +496,7 @@ public class Automaton implements Accountable {
|
||||||
|
|
||||||
int upto = t.transitionUpto;
|
int upto = t.transitionUpto;
|
||||||
if (upto == states[2*t.source]) {
|
if (upto == states[2*t.source]) {
|
||||||
// Transition isn't initialzed yet (this is the first transition); don't check:
|
// Transition isn't initialized yet (this is the first transition); don't check:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class CharacterRunAutomaton extends RunAutomaton {
|
||||||
/**
|
/**
|
||||||
* Construct specifying maxDeterminizedStates.
|
* Construct specifying maxDeterminizedStates.
|
||||||
* @param a Automaton to match
|
* @param a Automaton to match
|
||||||
* @param maxDeterminizedStates maximum number of states that the automataon
|
* @param maxDeterminizedStates maximum number of states that the automaton
|
||||||
* can have once determinized. If more states are required to determinize
|
* can have once determinized. If more states are required to determinize
|
||||||
* it then a TooComplexToDeterminizeException is thrown.
|
* it then a TooComplexToDeterminizeException is thrown.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -273,7 +273,7 @@ public class CompiledAutomaton implements Accountable {
|
||||||
if (transition.min < leadLabel) {
|
if (transition.min < leadLabel) {
|
||||||
maxIndex = i;
|
maxIndex = i;
|
||||||
} else {
|
} else {
|
||||||
// Transitions are alway sorted
|
// Transitions are always sorted
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ import org.apache.lucene.util.BitUtil;
|
||||||
* <li>Ints: if BitsPerValue is <tt>0</tt>, then there is nothing to read and
|
* <li>Ints: if BitsPerValue is <tt>0</tt>, then there is nothing to read and
|
||||||
* all values perfectly match the result of the function. Otherwise, these
|
* all values perfectly match the result of the function. Otherwise, these
|
||||||
* are the {@link PackedInts packed} deltas from the expected value
|
* are the {@link PackedInts packed} deltas from the expected value
|
||||||
* (computed from the function) using exaclty BitsPerValue bits per value.
|
* (computed from the function) using exactly BitsPerValue bits per value.
|
||||||
* </ul>
|
* </ul>
|
||||||
* @see MonotonicBlockPackedReader
|
* @see MonotonicBlockPackedReader
|
||||||
* @lucene.internal
|
* @lucene.internal
|
||||||
|
|
|
@ -855,7 +855,7 @@ public class PackedInts {
|
||||||
case PACKED_SINGLE_BLOCK:
|
case PACKED_SINGLE_BLOCK:
|
||||||
return new DirectPacked64SingleBlockReader(bitsPerValue, valueCount, in);
|
return new DirectPacked64SingleBlockReader(bitsPerValue, valueCount, in);
|
||||||
default:
|
default:
|
||||||
throw new AssertionError("Unknwown format: " + format);
|
throw new AssertionError("Unknown format: " + format);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -306,7 +306,7 @@ public class TokenSourcesTest extends BaseTokenStreamTestCase {
|
||||||
int curOffset;
|
int curOffset;
|
||||||
|
|
||||||
/** Just make a token with the text, and set the payload
|
/** Just make a token with the text, and set the payload
|
||||||
* to the text as well. Offets increment "naturally". */
|
* to the text as well. Offsets increment "naturally". */
|
||||||
private Token getToken(String text) {
|
private Token getToken(String text) {
|
||||||
Token t = new Token(text, curOffset, curOffset+text.length());
|
Token t = new Token(text, curOffset, curOffset+text.length());
|
||||||
t.setPayload(new BytesRef(text));
|
t.setPayload(new BytesRef(text));
|
||||||
|
|
Loading…
Reference in New Issue