Skip to main content

text_index_key

Function text_index_key 

Source
pub fn text_index_key(predicate: &[u8], term: &[u8]) -> Vec<u8> ⓘ
Expand description

The logical identity of one text document: (predicate, literal).

The predicate is length-prefixed so the concatenation is injective: the two encoded terms are self-delimiting only while their lengths are known, and a bare join of two variable-length byte strings can collide. The key is compared exactly by the index’s indexed key field (delete_term), so any injective encoding works.