cleanup code
This commit is contained in:
@@ -14,11 +14,6 @@ final readonly class ChunkWriteService
|
||||
private ChunkManager $chunkManager,
|
||||
) {}
|
||||
|
||||
public function getIndexPath(): string
|
||||
{
|
||||
return $this->chunkManager->getIndexPath();
|
||||
}
|
||||
|
||||
public function countAllChunks(): int
|
||||
{
|
||||
return $this->chunkManager->countAllChunks();
|
||||
@@ -37,29 +32,6 @@ final readonly class ChunkWriteService
|
||||
$this->chunkManager->appendChunks($chunks);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lokaler Ingest für eine einzelne DocumentVersion.
|
||||
*
|
||||
* Ablauf:
|
||||
* 1. Entfernt bestehende Chunks dieses Dokuments
|
||||
* 2. Appendet neue Chunks
|
||||
*
|
||||
* @param iterable<array<string,mixed>> $chunks
|
||||
*/
|
||||
public function writeForDocumentVersion(
|
||||
DocumentVersion $version,
|
||||
iterable $chunks
|
||||
): void {
|
||||
$documentId = $version->getDocument()->getId();
|
||||
|
||||
if (!$documentId instanceof Uuid) {
|
||||
throw new \RuntimeException('Document ID must be a Uuid instance');
|
||||
}
|
||||
|
||||
$this->chunkManager->compactByDocument($documentId);
|
||||
$this->chunkManager->appendChunks($chunks);
|
||||
}
|
||||
|
||||
/**
|
||||
* Vollständiger Rewrite des NDJSON-Index (Global Reindex).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user