Skip to main content

match_score

Function match_score 

Source
pub fn match_score(filter: &str, entry: &Entry) -> Option<i32>
Expand description

How well an entry answers the filter, by name or by column.

Searching column names is what turns a list of files into something you can ask a question of: “which of these has a customer_id?” is the question a data person actually has, and the answer is already in the Parquet footer datui read to get the row count. A name match always outranks a column match, so typing a dataset’s name still finds the dataset.

Higher is better, as in fzf — see crate::fuzzy for why datui scores the way that program does.