mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-24 05:18:58 +00:00
(index-creation) Print whether full or prio is created
Previous state of saying reverse index for both was pretty confusing.
This commit is contained in:
parent
95f74c5ea7
commit
313cc2965c
@ -38,7 +38,9 @@ public class ReverseIndexConstructor {
|
|||||||
this.tmpDir = tmpDir;
|
this.tmpDir = tmpDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createReverseIndex(ProcessHeartbeat processHeartbeat, Path sourceBaseDir) throws IOException
|
public void createReverseIndex(ProcessHeartbeat processHeartbeat,
|
||||||
|
String processName,
|
||||||
|
Path sourceBaseDir) throws IOException
|
||||||
{
|
{
|
||||||
var inputs = IndexJournalFileNames.findJournalFiles(sourceBaseDir);
|
var inputs = IndexJournalFileNames.findJournalFiles(sourceBaseDir);
|
||||||
if (inputs.isEmpty()) {
|
if (inputs.isEmpty()) {
|
||||||
@ -46,7 +48,7 @@ public class ReverseIndexConstructor {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try (var heartbeat = processHeartbeat.createProcessTaskHeartbeat(CreateReverseIndexSteps.class, "createReverseIndex")) {
|
try (var heartbeat = processHeartbeat.createProcessTaskHeartbeat(CreateReverseIndexSteps.class, processName)) {
|
||||||
|
|
||||||
heartbeat.progress(CreateReverseIndexSteps.CONSTRUCT);
|
heartbeat.progress(CreateReverseIndexSteps.CONSTRUCT);
|
||||||
|
|
||||||
|
@ -111,7 +111,9 @@ public class IndexConstructorMain {
|
|||||||
new ReverseIndexConstructor(outputFileDocs, outputFileWords,
|
new ReverseIndexConstructor(outputFileDocs, outputFileWords,
|
||||||
IndexJournalReader::singleFile,
|
IndexJournalReader::singleFile,
|
||||||
this::addRankToIdEncoding, tmpDir)
|
this::addRankToIdEncoding, tmpDir)
|
||||||
.createReverseIndex(heartbeat, workDir);
|
.createReverseIndex(heartbeat,
|
||||||
|
"createReverseIndexFull",
|
||||||
|
workDir);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +131,9 @@ public class IndexConstructorMain {
|
|||||||
new ReverseIndexConstructor(outputFileDocs, outputFileWords,
|
new ReverseIndexConstructor(outputFileDocs, outputFileWords,
|
||||||
(path) -> IndexJournalReader.singleFile(path).filtering(wordMetaFilter),
|
(path) -> IndexJournalReader.singleFile(path).filtering(wordMetaFilter),
|
||||||
this::addRankToIdEncoding, tmpDir)
|
this::addRankToIdEncoding, tmpDir)
|
||||||
.createReverseIndex(heartbeat, workDir);
|
.createReverseIndex(heartbeat,
|
||||||
|
"createReverseIndexPrio",
|
||||||
|
workDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static LongPredicate getPriorityIndexWordMetaFilter() {
|
private static LongPredicate getPriorityIndexWordMetaFilter() {
|
||||||
|
@ -242,7 +242,7 @@ public class IndexQueryServiceIntegrationSmokeTest {
|
|||||||
if (!Files.isDirectory(tmpDir)) Files.createDirectories(tmpDir);
|
if (!Files.isDirectory(tmpDir)) Files.createDirectories(tmpDir);
|
||||||
|
|
||||||
new ReverseIndexConstructor(outputFileDocs, outputFileWords, IndexJournalReader::singleFile, DocIdRewriter.identity(), tmpDir)
|
new ReverseIndexConstructor(outputFileDocs, outputFileWords, IndexJournalReader::singleFile, DocIdRewriter.identity(), tmpDir)
|
||||||
.createReverseIndex(new FakeProcessHeartbeat(), workDir);
|
.createReverseIndex(new FakeProcessHeartbeat(), "name", workDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createPrioReverseIndex() throws SQLException, IOException {
|
private void createPrioReverseIndex() throws SQLException, IOException {
|
||||||
@ -255,7 +255,7 @@ public class IndexQueryServiceIntegrationSmokeTest {
|
|||||||
if (!Files.isDirectory(tmpDir)) Files.createDirectories(tmpDir);
|
if (!Files.isDirectory(tmpDir)) Files.createDirectories(tmpDir);
|
||||||
|
|
||||||
new ReverseIndexConstructor(outputFileDocs, outputFileWords, IndexJournalReader::singleFile, DocIdRewriter.identity(), tmpDir)
|
new ReverseIndexConstructor(outputFileDocs, outputFileWords, IndexJournalReader::singleFile, DocIdRewriter.identity(), tmpDir)
|
||||||
.createReverseIndex(new FakeProcessHeartbeat(), workDir);
|
.createReverseIndex(new FakeProcessHeartbeat(), "name", workDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createForwardIndex() throws SQLException, IOException {
|
private void createForwardIndex() throws SQLException, IOException {
|
||||||
|
@ -495,7 +495,7 @@ public class IndexQueryServiceIntegrationTest {
|
|||||||
if (!Files.isDirectory(tmpDir)) Files.createDirectories(tmpDir);
|
if (!Files.isDirectory(tmpDir)) Files.createDirectories(tmpDir);
|
||||||
|
|
||||||
new ReverseIndexConstructor(outputFileDocs, outputFileWords, IndexJournalReader::singleFile, DocIdRewriter.identity(), tmpDir)
|
new ReverseIndexConstructor(outputFileDocs, outputFileWords, IndexJournalReader::singleFile, DocIdRewriter.identity(), tmpDir)
|
||||||
.createReverseIndex(new FakeProcessHeartbeat(), workDir);
|
.createReverseIndex(new FakeProcessHeartbeat(), "name", workDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createPrioReverseIndex() throws SQLException, IOException {
|
private void createPrioReverseIndex() throws SQLException, IOException {
|
||||||
@ -508,7 +508,7 @@ public class IndexQueryServiceIntegrationTest {
|
|||||||
if (!Files.isDirectory(tmpDir)) Files.createDirectories(tmpDir);
|
if (!Files.isDirectory(tmpDir)) Files.createDirectories(tmpDir);
|
||||||
|
|
||||||
new ReverseIndexConstructor(outputFileDocs, outputFileWords, IndexJournalReader::singleFile, DocIdRewriter.identity(), tmpDir)
|
new ReverseIndexConstructor(outputFileDocs, outputFileWords, IndexJournalReader::singleFile, DocIdRewriter.identity(), tmpDir)
|
||||||
.createReverseIndex(new FakeProcessHeartbeat(), workDir);
|
.createReverseIndex(new FakeProcessHeartbeat(), "name", workDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createForwardIndex() throws SQLException, IOException {
|
private void createForwardIndex() throws SQLException, IOException {
|
||||||
|
Loading…
Reference in New Issue
Block a user