mirror of https://github.com/apache/lucene.git
Excluding lines with comments
This commit is contained in:
parent
ecf53d921d
commit
7f95cd383e
|
@ -304,8 +304,7 @@ public class DocIdEncodingBenchmark {
|
||||||
out.writeLong(packedLong);
|
out.writeLong(packedLong);
|
||||||
}
|
}
|
||||||
for (; i < count; i++) {
|
for (; i < count; i++) {
|
||||||
// out.writeInt(docIds[i]);
|
out.writeInt(docIds[i]);
|
||||||
out.writeLong(docIds[i]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,8 +318,7 @@ public class DocIdEncodingBenchmark {
|
||||||
docIDs[i + 2] = (int) (packedLong & BPV_21_MASK);
|
docIDs[i + 2] = (int) (packedLong & BPV_21_MASK);
|
||||||
}
|
}
|
||||||
for (; i < count; i++) {
|
for (; i < count; i++) {
|
||||||
// docIDs[i] = in.readInt();
|
docIDs[i] = in.readInt();
|
||||||
docIDs[i] = (int) in.readLong();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -472,7 +470,8 @@ public class DocIdEncodingBenchmark {
|
||||||
try (Stream<String> lines = Files.lines(Path.of((String) args[0]))) {
|
try (Stream<String> lines = Files.lines(Path.of((String) args[0]))) {
|
||||||
return lines
|
return lines
|
||||||
.parallel()
|
.parallel()
|
||||||
.filter(x -> !x.trim().startsWith("#"))
|
.map(String::trim)
|
||||||
|
.filter(x -> !(x.startsWith("#") || x.isEmpty())) // Comments can start with a #
|
||||||
.map(
|
.map(
|
||||||
x ->
|
x ->
|
||||||
Arrays.stream(x.split(","))
|
Arrays.stream(x.split(","))
|
||||||
|
|
Loading…
Reference in New Issue