Class IngestionFingerprint
Content bytes alone are not enough to decide whether a file can stay
indexed. A parser, chunker, selector, or KnowledgeUnit upgrade
must rebuild the same bytes so retrieval cannot serve chunks from a
previous pipeline.
KnowledgeUnit.AUTO is omitted from the payload, so declaring
a unit is by itself never a reason an undeclared source
re-ingests: a non-AUTO unit is a field of its own rather than a
CHUNKER_VERSION bump, so only sources that set the member are
invalidated by this member.
ChunkContext.NONE is omitted the same way: opting into
contextual retrieval is a trailing field of its own, appended after
unit when both are set. Field order is part of the hash.
That is a claim about these members alone, and it is the only claim
that holds. It is not a promise that a given source keeps a
hash it had in some earlier release: any other pipeline change — a
parser, a selector, or a CHUNKER_VERSION bump — re-ingests
every source regardless of what unit or chunkContext
says. Pinning the promise to a version number is what makes it false
the first time something else in the pipeline moves.
- Since:
- 0.14.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringStable identifier ofNormalizedDocumentChunker.static final StringVersion of the shared chunker contract.static final StringMetadata key written onto each ingested chunk.static final StringSchema version of the canonical payload. -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringcompute(String sourceName, String sourcePath, String fileIdentity, String contentHash, String declaredFormat, String detectedFormat, String extractorId, String extractorVersion, List<String> include, List<String> exclude, int maxDepth, boolean followSymlinks) Computes the pipeline fingerprint for one admitted file.static Stringcompute(String sourceName, String sourcePath, String fileIdentity, String contentHash, String declaredFormat, String detectedFormat, String extractorId, String extractorVersion, List<String> include, List<String> exclude, int maxDepth, boolean followSymlinks, ChunkContext chunkContext, String chunkContextTemplate, String chunkContextModel) Computes the pipeline fingerprint including chunk-context identity.static Stringcompute(String sourceName, String sourcePath, String fileIdentity, String contentHash, String declaredFormat, String detectedFormat, String extractorId, String extractorVersion, List<String> include, List<String> exclude, KnowledgeUnit unit, int maxDepth, boolean followSymlinks) Computes the pipeline fingerprint including a declared slicing unit.static Stringcompute(String sourceName, String sourcePath, String fileIdentity, String contentHash, String declaredFormat, String detectedFormat, String extractorId, String extractorVersion, List<String> include, List<String> exclude, KnowledgeUnit unit, int maxDepth, boolean followSymlinks, ChunkContext chunkContext, String chunkContextTemplate, String chunkContextModel) Computes the pipeline fingerprint including unit and chunk-context identity.static Stringcompute(String sourceName, String sourcePath, String fileIdentity, String contentHash, String declaredFormat, String detectedFormat, String extractorId, String extractorVersion, List<String> include, List<String> exclude, KnowledgeUnit unit, int maxDepth, boolean followSymlinks, ChunkContext chunkContext, String chunkContextTemplate, String chunkContextModel, String select) Computes the pipeline fingerprint including the source'sselect.
-
Field Details
-
SCHEMA_VERSION
Schema version of the canonical payload. Bump when field meaning changes.- See Also:
-
CHUNKER_ID
Stable identifier ofNormalizedDocumentChunker.- See Also:
-
CHUNKER_VERSION
Version of the shared chunker contract. Bump whenNormalizedDocumentChunkerlimits or split rules change.- See Also:
-
METADATA_KEY
Metadata key written onto each ingested chunk.- See Also:
-
-
Method Details
-
compute
public static String compute(String sourceName, String sourcePath, String fileIdentity, String contentHash, String declaredFormat, String detectedFormat, String extractorId, String extractorVersion, List<String> include, List<String> exclude, int maxDepth, boolean followSymlinks) Computes the pipeline fingerprint for one admitted file.- Parameters:
sourceName- declared knowledge-source namesourcePath- declared source pathfileIdentity- normalized file identity inside the sourcecontentHash- SHA-256 of the admitted source bytesdeclaredFormat- declaredDocumentFormatdetectedFormat- effective concrete format after detectionextractorId- extractor implementation class nameextractorVersion- extractorContentExtractor.version()include- declared include selectorsexclude- declared exclude selectorsmaxDepth- admitted directory walk depthfollowSymlinks- whether the walk follows symbolic links- Returns:
- lowercase hex SHA-256
-
compute
public static String compute(String sourceName, String sourcePath, String fileIdentity, String contentHash, String declaredFormat, String detectedFormat, String extractorId, String extractorVersion, List<String> include, List<String> exclude, KnowledgeUnit unit, int maxDepth, boolean followSymlinks) Computes the pipeline fingerprint including a declared slicing unit.KnowledgeUnit.AUTOis omitted from the canonical payload, so this overload and the twelve-argument form produce the same hash for anAUTOsource. Equality is between these two overloads in the same build — not with any particular released version.- Since:
- 0.15.0
-
compute
public static String compute(String sourceName, String sourcePath, String fileIdentity, String contentHash, String declaredFormat, String detectedFormat, String extractorId, String extractorVersion, List<String> include, List<String> exclude, int maxDepth, boolean followSymlinks, ChunkContext chunkContext, String chunkContextTemplate, String chunkContextModel) Computes the pipeline fingerprint including chunk-context identity.ChunkContext.NONEomits the extra fields so a source that does not opt in stays byte-identical to the twelve-argument form in the same build.- Since:
- 0.15.0
-
compute
public static String compute(String sourceName, String sourcePath, String fileIdentity, String contentHash, String declaredFormat, String detectedFormat, String extractorId, String extractorVersion, List<String> include, List<String> exclude, KnowledgeUnit unit, int maxDepth, boolean followSymlinks, ChunkContext chunkContext, String chunkContextTemplate, String chunkContextModel) Computes the pipeline fingerprint including unit and chunk-context identity.Conditional trailing fields keep a pinned order:
unitthenchunkContext/chunkContextTemplate/chunkContextModel. Defaults are omitted so an undeclared source matches the twelve-argument form in the same build.- Since:
- 0.15.0
-
compute
public static String compute(String sourceName, String sourcePath, String fileIdentity, String contentHash, String declaredFormat, String detectedFormat, String extractorId, String extractorVersion, List<String> include, List<String> exclude, KnowledgeUnit unit, int maxDepth, boolean followSymlinks, ChunkContext chunkContext, String chunkContextTemplate, String chunkContextModel, String select) Computes the pipeline fingerprint including the source'sselect.A blank
selectis omitted, so a source that selects nothing matches the sixteen-argument form in the same build. A non-blank one is the last field, after the chunk-context fields.- Since:
- 0.18.0
-