internal/domain/recalllimits.go
internal/domain · 36 lines · 3 declarations · source
Declarations
const MaxRecallQuestionBytes, MaxRecallTerms, MaxRecallTermBytes and 1 more
const (
MaxRecallQuestionBytes = 8192
MaxRecallTerms = 512
MaxRecallTermBytes = 4 * MaxRecallQuestionBytes
MaxRecallMatches = 256
)
Recall limits protect question expansion, database parameters and traversal seeds. They are admission ceilings, not relevance thresholds. A refused question produces no partial bundle.
var ErrRecallQuestionSize, ErrRecallTerms, ErrRecallMatches
var (
ErrRecallQuestionSize = errors.New("question exceeds 8192 UTF-8 bytes")
ErrRecallTerms = errors.New("question exceeds the candidate-name limit; use a shorter question")
ErrRecallMatches = errors.New("question matches too many names; narrow the question or select a data subject")
)
func ValidateRecallTerms
func ValidateRecallTerms(terms []string) error
ValidateRecallTerms also protects direct store callers that bypass question expansion.