prefilterTokens property
Fragments of needle that every entry matching this condition contains in the ASCII-lowercased JSON
text of the entry (logEntryJson): a prefilter for a SQL store that keeps entries as JSON and can
fold only ASCII, instr(lower(entry), ?) > 0 per fragment. The prefilter only drops rows that
cannot match; the store still decides with matches.
A fragment is a maximal run of printable ASCII without space, ", \ and :: JSON escapes the
quote and the backslash, anything beyond ASCII would need the folding SQL lacks, and the error text
joins type and message with : while JSON keeps them apart. Longest first, so that the most
selective fragment is checked first. Empty for a needle without such characters (all Cyrillic): no
prefilter, the store scans.
Two exceptions to the guarantee: the Kelvin sign (K) and the dotted İ, which String.toLowerCase
turns into ASCII k and i and SQL's lower() leaves as they are. An entry containing them can be
dropped by the prefilter.
Implementation
final List<String> prefilterTokens;