% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/block.R
\name{block_fuzzy_lookup}
\alias{block_fuzzy_lookup}
\title{Fuzzy-match query keys against a materialized block}
\usage{
block_fuzzy_lookup(
  block,
  column,
  keys,
  method = "dl",
  max_dist = 0.2,
  block_col = NULL,
  block_keys = NULL,
  n_threads = 4L
)
}
\arguments{
\item{block}{A \code{vectra_block} from \code{\link[=materialize]{materialize()}}.}

\item{column}{Character scalar. Name of the string column to fuzzy-match against.}

\item{keys}{Character vector. Query strings to match.}

\item{method}{Character. Distance method: \code{"dl"} (Damerau-Levenshtein, default),
\code{"levenshtein"}, or \code{"jw"} (Jaro-Winkler).}

\item{max_dist}{Numeric. Maximum normalized distance (default 0.2).}

\item{block_col}{Optional character scalar. Column name for exact-match blocking
(e.g., genus). When provided, only rows where \code{block_col} matches the
corresponding \code{block_keys} value are compared.}

\item{block_keys}{Optional character vector (same length as \code{keys}). Exact-match
values for blocking. Required when \code{block_col} is provided.}

\item{n_threads}{Integer. Number of OpenMP threads (default 4L).}
}
\value{
A data.frame with columns \code{query_idx} (1-based position in \code{keys}),
\code{fuzzy_dist} (normalized distance), plus all columns from the block.
}
\description{
Computes string distances between query keys and a string column in a
materialized block. Optionally uses exact-match blocking on a second column
(e.g., genus) to reduce the search space.
}
