import_corpus_export_for_user(..., reingest_and_remap=True) already supports preserving an export's prepared parsing/structural artifacts when explicitly passed False. The direct REST endpoint and chunked completion path omit that argument, so callers cannot select the existing mode.
Implementation
- Add a validated
reingest_and_remap boolean to CorpusExportImportSerializer, defaulting to True for backward compatibility.
- Pass the value through
CorpusExportImportView to the existing service.
- Accept and validate the same option in corpus-export chunked-upload metadata. Persist the normalized boolean and pass it through final assembly/completion; handle explicit
False correctly rather than using truthiness/defaulting that replaces it.
- Keep authorization, archive validation, destination-corpus behavior, and supported export formats unchanged. Reuse the existing importer and annotation/relationship remapping logic.
- Document the default and the fidelity/processing trade-off. Update any frontend import helper that constructs these requests to preserve an explicitly supplied option.
Acceptance criteria
- Direct and chunked requests with omission or
True retain the current reingest behavior.
- Explicit
False reaches the importer and preserves supported exported parsing artifacts, structural annotations, annotation IDs/remappings, labels, metadata, and relationships without scheduling a reparse.
- Tests cover boolean serialization, malformed values, unauthorized destinations, chunked resume/completion, and a supported export containing cross-document relationships.
- Use the existing REST/chunked and V2/V3 import regression fixtures; do not introduce a separate import format or pipeline.
Code pointers
serializer; REST view; service option; chunked completion; reingest regression tests.
import_corpus_export_for_user(..., reingest_and_remap=True)already supports preserving an export's prepared parsing/structural artifacts when explicitly passedFalse. The direct REST endpoint and chunked completion path omit that argument, so callers cannot select the existing mode.Implementation
reingest_and_remapboolean toCorpusExportImportSerializer, defaulting toTruefor backward compatibility.CorpusExportImportViewto the existing service.Falsecorrectly rather than using truthiness/defaulting that replaces it.Acceptance criteria
Trueretain the current reingest behavior.Falsereaches the importer and preserves supported exported parsing artifacts, structural annotations, annotation IDs/remappings, labels, metadata, and relationships without scheduling a reparse.Code pointers
serializer; REST view; service option; chunked completion; reingest regression tests.