mirror of https://github.com/apache/lucene.git
parse skip for CSV
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@524299 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
731416af36
commit
f519838b7f
|
@ -229,6 +229,8 @@ abstract class CSVLoader {
|
|||
|
||||
Boolean hasHeader = params.getBool(HEADER);
|
||||
|
||||
skipLines = params.getInt(SKIP,0);
|
||||
|
||||
if (fieldnames==null) {
|
||||
if (null == hasHeader) {
|
||||
// assume the file has the headers if they aren't supplied in the args
|
||||
|
@ -239,7 +241,7 @@ abstract class CSVLoader {
|
|||
} else {
|
||||
// if the fieldnames were supplied and the file has a header, we need to
|
||||
// skip over that header.
|
||||
if (hasHeader!=null && hasHeader) skipLines=1;
|
||||
if (hasHeader!=null && hasHeader) skipLines++;
|
||||
|
||||
prepareFields();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue