Skip to main content

STRING_PREFIX_CHARS

Constant STRING_PREFIX_CHARS 

Source
pub const STRING_PREFIX_CHARS: usize = 512;
Expand description

How many leading characters of a string value its prefix B-tree covers.

A B-tree entry must fit in a third of a page (2704 bytes), and a long narrative such as a ValueSet.description does not. Indexing only the first characters keeps every value indexable: at most four UTF-8 bytes a character, this many fit with room for the scope columns. A prefix term is never this long, so a search loses nothing; the full value is still stored and the trigram index still covers all of it.