mirror of https://github.com/apache/lucene.git
SOLR-10371: There is some spelling mistakes in the Java source code Thanks hu xiaodong"
This commit is contained in:
parent
e11c86f6e4
commit
bd01064f69
|
@ -67,7 +67,7 @@ public class FileDictionary implements Dictionary {
|
|||
/**
|
||||
* Creates a dictionary based on an inputstream.
|
||||
* Using {@link #DEFAULT_FIELD_DELIMITER} as the
|
||||
* field seperator in a line.
|
||||
* field separator in a line.
|
||||
* <p>
|
||||
* NOTE: content is treated as UTF-8
|
||||
*/
|
||||
|
@ -78,7 +78,7 @@ public class FileDictionary implements Dictionary {
|
|||
/**
|
||||
* Creates a dictionary based on a reader.
|
||||
* Using {@link #DEFAULT_FIELD_DELIMITER} as the
|
||||
* field seperator in a line.
|
||||
* field separator in a line.
|
||||
*/
|
||||
public FileDictionary(Reader reader) {
|
||||
this(reader, DEFAULT_FIELD_DELIMITER);
|
||||
|
@ -86,7 +86,7 @@ public class FileDictionary implements Dictionary {
|
|||
|
||||
/**
|
||||
* Creates a dictionary based on a reader.
|
||||
* Using <code>fieldDelimiter</code> to seperate out the
|
||||
* Using <code>fieldDelimiter</code> to separate out the
|
||||
* fields in a line.
|
||||
*/
|
||||
public FileDictionary(Reader reader, String fieldDelimiter) {
|
||||
|
@ -96,7 +96,7 @@ public class FileDictionary implements Dictionary {
|
|||
|
||||
/**
|
||||
* Creates a dictionary based on an inputstream.
|
||||
* Using <code>fieldDelimiter</code> to seperate out the
|
||||
* Using <code>fieldDelimiter</code> to separate out the
|
||||
* fields in a line.
|
||||
* <p>
|
||||
* NOTE: content is treated as UTF-8
|
||||
|
|
|
@ -38,7 +38,7 @@ import org.apache.lucene.util.BytesRef;
|
|||
* Besides the usual {@link org.apache.lucene.analysis.Analyzer}s,
|
||||
* {@link CompletionAnalyzer}
|
||||
* can be used to tune suggest field only parameters
|
||||
* (e.g. preserving token seperators, preserving position increments
|
||||
* (e.g. preserving token separators, preserving position increments
|
||||
* when converting the token stream to an automaton)
|
||||
* </p>
|
||||
* <p>
|
||||
|
|
|
@ -76,7 +76,7 @@ public class AnalyticsStats {
|
|||
// Get filter to all docs
|
||||
Filter filter = docs.getTopFilter();
|
||||
|
||||
// Computing each Analytics Request Seperately
|
||||
// Computing each Analytics Request Separately
|
||||
for( AnalyticsRequest areq : requests ){
|
||||
// The Accumulator which will control the statistics generation
|
||||
// for the entire analytics request
|
||||
|
|
|
@ -145,7 +145,7 @@ public class XPathRecordReader {
|
|||
if (!xpath.startsWith("/"))
|
||||
throw new RuntimeException("xpath must start with '/' : " + xpath);
|
||||
List<String> paths = splitEscapeQuote(xpath);
|
||||
// deal with how split behaves when seperator starts a string!
|
||||
// deal with how split behaves when separator starts a string!
|
||||
if ("".equals(paths.get(0).trim()))
|
||||
paths.remove(0);
|
||||
rootNode.build(paths, name, multiValued, isRecord, flags);
|
||||
|
@ -600,19 +600,19 @@ public class XPathRecordReader {
|
|||
|
||||
|
||||
/**
|
||||
* The Xpath is split into segments using the '/' as a seperator. However
|
||||
* The Xpath is split into segments using the '/' as a separator. However
|
||||
* this method deals with special cases where there is a slash '/' character
|
||||
* inside the attribute value e.g. x/@html='text/html'. We split by '/' but
|
||||
* then reassemble things were the '/' appears within a quoted sub-string.
|
||||
*
|
||||
* We have already enforced that the string must begin with a seperator. This
|
||||
* We have already enforced that the string must begin with a separator. This
|
||||
* method depends heavily on how split behaves if the string starts with the
|
||||
* seperator or if a sequence of multiple seperator's appear.
|
||||
* separator or if a sequence of multiple separator's appear.
|
||||
*/
|
||||
private static List<String> splitEscapeQuote(String str) {
|
||||
List<String> result = new LinkedList<>();
|
||||
String[] ss = str.split("/");
|
||||
for (int i=0; i<ss.length; i++) { // i=1: skip seperator at start of string
|
||||
for (int i=0; i<ss.length; i++) { // i=1: skip separator at start of string
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int quoteCount = 0;
|
||||
while (true) {
|
||||
|
|
|
@ -44,7 +44,7 @@ public class CSVConfig {
|
|||
private int fill;
|
||||
/** The fill char. Defaults to a space */
|
||||
private char fillChar = ' ';
|
||||
/** The seperator character. Defaults to , */
|
||||
/** The separator character. Defaults to , */
|
||||
private char delimiter = ',';
|
||||
/** Should we ignore the delimiter. Defaults to false */
|
||||
private boolean ignoreDelimiter = false;
|
||||
|
|
|
@ -107,7 +107,7 @@ public class CSVConfigGuesser {
|
|||
|
||||
protected void analyseLines(String[] lines) {
|
||||
guessFixedWidth(lines);
|
||||
guessFieldSeperator(lines);
|
||||
guessFieldSeparator(lines);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -130,16 +130,16 @@ public class CSVConfigGuesser {
|
|||
}
|
||||
|
||||
|
||||
protected void guessFieldSeperator(String[] lines) {
|
||||
protected void guessFieldSeparator(String[] lines) {
|
||||
if (config.isFixedWidth()) {
|
||||
guessFixedWidthSeperator(lines);
|
||||
guessFixedWidthSeparator(lines);
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
}
|
||||
}
|
||||
|
||||
protected void guessFixedWidthSeperator(String[] lines) {
|
||||
protected void guessFixedWidthSeparator(String[] lines) {
|
||||
// keep track of the fieldlength
|
||||
int previousMatch = -1;
|
||||
for (int i = 0; i < lines[0].length(); i++) {
|
||||
|
|
|
@ -384,7 +384,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
|
|||
params.add("id",id);
|
||||
}
|
||||
} else {
|
||||
// add one or more comma seperated ids params
|
||||
// add one or more comma separated ids params
|
||||
params.add(buildCommaSepParams(random(), "ids", idsToRequest));
|
||||
}
|
||||
}
|
||||
|
@ -941,7 +941,7 @@ public class TestRandomFlRTGCloud extends SolrCloudTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Given an ordered list of values to include in a (key) param, randomly groups them (ie: comma seperated)
|
||||
* Given an ordered list of values to include in a (key) param, randomly groups them (ie: comma separated)
|
||||
* into actual param key=values which are returned as a new SolrParams instance
|
||||
*/
|
||||
private static SolrParams buildCommaSepParams(final Random rand, final String key, Collection<String> values) {
|
||||
|
|
|
@ -931,7 +931,7 @@ public class ZkStateReader implements Closeable {
|
|||
public static String getBaseUrlForNodeName(final String nodeName, String urlScheme) {
|
||||
final int _offset = nodeName.indexOf("_");
|
||||
if (_offset < 0) {
|
||||
throw new IllegalArgumentException("nodeName does not contain expected '_' seperator: " + nodeName);
|
||||
throw new IllegalArgumentException("nodeName does not contain expected '_' separator: " + nodeName);
|
||||
}
|
||||
final String hostAndPort = nodeName.substring(0,_offset);
|
||||
try {
|
||||
|
|
|
@ -501,7 +501,7 @@ public class JsonRecordReader {
|
|||
* <p>
|
||||
* We have already enforced that the string must begin with a separator. This
|
||||
* method depends heavily on how split behaves if the string starts with the
|
||||
* seperator or if a sequence of multiple separators appear.
|
||||
* separator or if a sequence of multiple separators appear.
|
||||
*/
|
||||
private static List<String> splitEscapeQuote(String str) {
|
||||
List<String> result = new LinkedList<>();
|
||||
|
|
|
@ -297,7 +297,7 @@ public class StrUtils {
|
|||
|
||||
/**
|
||||
* writes chars from item to out, backslash escaping as needed based on separator --
|
||||
* but does not append the seperator itself
|
||||
* but does not append the separator itself
|
||||
*/
|
||||
public static void appendEscapedTextToBuilder(StringBuilder out,
|
||||
String item,
|
||||
|
|
Loading…
Reference in New Issue