Skip to main content

Module value_match

Module value_match 

Source
Expand description

Matching a search text against stored values. Matching a search text against stored values: contains, prefix, exact and similar (near spellings), and dates written in another layout. The wire form is rushdb_protocol::ValueSearch; this is the engine’s side of it, shared by the value dictionaries, the facet scan and the cross-property value search.

A string matches as stored; a number, boolean or datetime matches as the records response renders it; an array matches when any element does. A text that reads as a date (year first, at least a month: 1993-11-12, 1993/11/12, 2010/2/22, 2013-06) also matches values holding that date in another layout (1993-11-12T00:00:00Z, 1993.11.12, 19931112, 201306), at the text’s precision.

Structs§

ValueMatcher
A search text prepared for matching many values.

Enums§

TextMatch
How the search text must match a value.

Functions§

similarity
How closely stored spells text, from 0 to 1. Exactly 1 when some run of whole words of stored spells text once case, punctuation and spacing are ignored (“Spider-Man” for “spiderman”); otherwise the share of the text’s character trigrams that occur in stored (a typo keeps most of them, an unrelated word few).