mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-24 05:18:58 +00:00
Bugfix in forward converter, should force both files before exiting. Also don't need to create an intermediate file.
This commit is contained in:
parent
58cae7d963
commit
0b6200705e
@ -49,8 +49,6 @@ public class ForwardIndexConverter {
|
|||||||
|
|
||||||
logger.info("Converting {} {}",inputFile, journalReader.fileHeader);
|
logger.info("Converting {} {}",inputFile, journalReader.fileHeader);
|
||||||
|
|
||||||
final Path intermediateDocsFile = Files.createTempFile(tmpFileDir, "words-sorted", ".dat");
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
LongArray docsFileId = getDocIds(outputFileDocsId, journalReader);
|
LongArray docsFileId = getDocIds(outputFileDocsId, journalReader);
|
||||||
|
|
||||||
@ -74,15 +72,11 @@ public class ForwardIndexConverter {
|
|||||||
});
|
});
|
||||||
|
|
||||||
docFileData.force();
|
docFileData.force();
|
||||||
|
docsFileId.force();
|
||||||
|
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
logger.error("Failed to convert", ex);
|
logger.error("Failed to convert", ex);
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
finally {
|
|
||||||
Files.deleteIfExists(intermediateDocsFile);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private LongArray getDocIds(Path outputFileDocs, SearchIndexJournalReader journalReader) throws IOException {
|
private LongArray getDocIds(Path outputFileDocs, SearchIndexJournalReader journalReader) throws IOException {
|
||||||
|
Loading…
Reference in New Issue
Block a user