Skip to contents

Search a prepared exact reference

Usage

knn_search_prepared(
  ref,
  query = NULL,
  k = 10L,
  block_size = knn_default_block_size(),
  plan = NULL,
  exclude_self = is.null(query)
)

Arguments

ref

A prepared reference returned by knn_prepare_bigmatrix().

query

Optional query source. Supply NULL for self-search, another big.matrix or external pointer for streamed queries, or a dense numeric matrix.

k

Number of neighbours to return.

block_size

Number of rows to process per query and reference block.

plan

Optional execution plan returned by knn_plan_bigmatrix().

exclude_self

Logical flag controlling whether a query row may return itself as a neighbour when query references the same matrix as the prepared reference.

Value

A list with components index, distance, k, metric, n_ref, n_query, exact, and backend.