Share the source index with validators
This commit is contained in:
@@ -40,7 +40,7 @@ func (v *Validator) Validate(_ context.Context, req contracts.TypedValidationReq
|
||||
if req.Stage == string(pipeline.StageExtract) {
|
||||
coverage = shared.NewChunkCoverage(req.Chunk)
|
||||
}
|
||||
issues, corrections := sourceRefIssues(source.NewDocumentIndex(req.Source), req.Source, coverage, req.Stage == string(pipeline.StageExtract), req.Value)
|
||||
issues, corrections := sourceRefIssues(shared.DocumentIndexForSource(req.Source, req.SourceIndex), req.Source, coverage, req.Stage == string(pipeline.StageExtract), req.Value)
|
||||
if len(issues) == 0 {
|
||||
return contracts.ValidationResult{Approved: true}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user