Skip to main content

MAX_INDEXED_LEXICAL_BYTES

Constant MAX_INDEXED_LEXICAL_BYTES 

Source
pub const MAX_INDEXED_LEXICAL_BYTES: usize = _; // 1_048_576usize
Expand description

Largest string-literal lexical the text index accepts, in bytes.

The text plugin indexes every string literal, and the wire payload of a PutTextIndex document carries the full lexical — so a literal larger than a single wire frame cannot be indexed at all. Rather than fail with a transport error mid-insert (or silently skip the document, the silently-missing-candidate state), the write path REJECTS oversized lexicals fail-closed: a PutTextIndex frame containing one errors before any axis write, and rebuilds skip the term and refuse to stamp the epoch. One mebibyte sits far above every realistic RDF literal while leaving ample headroom under the PutTextIndex frame budget (TEXT_INDEX_WIRE_BUDGET_BYTES, 3.5 MiB). The number is deliberately the string registry’s MAX_REGISTERED_STRING_BYTES (waratah_registry): on a clustered store, RegisterStrings precedes the text document write in the insert path, so the registry rejects these strings first, plugin on or off; this constant is the guard on in-process paths (standalone, import --offline), where the registry performs no length check. A store that must hold bigger literals is therefore an in-process store with the text plugin disabled.