Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,8 @@ public static void main(String[] args) throws Exception {
cmdLineArgs.vectorSpace(),
cmdLineArgs.numDocs()
);
if (Files.exists(indexPath) == false) {
if (cmdLineArgs.reindex() == false) {
throw new IllegalArgumentException("Index path does not exist: " + indexPath);
}
if (cmdLineArgs.forceMerge()) {
throw new IllegalArgumentException("Force merging without an existing index in: " + indexPath);
}
if (cmdLineArgs.reindex() == false && Files.exists(indexPath) == false) {
throw new IllegalArgumentException("Index path does not exist: " + indexPath);
}
if (cmdLineArgs.reindex()) {
knnIndexer.createIndex(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ private void readNext() throws IOException {
bytes.position(0);
// wrap around back to the start of the file if we hit the end:
logger.warn("VectorReader hit EOF when reading " + this.input + "; now wrapping around to start of file again");
this.input.position(position);
input.position(position);
bytesRead = Channels.readFromFileChannel(this.input, position, bytes);
if (bytesRead < bytes.capacity()) {
throw new IllegalStateException(
Expand Down