nearestNeighborsF32 method

Condition<EntityT> nearestNeighborsF32(
  1. List<double> queryVector,
  2. int maxResultCount, {
  3. String? alias,
})

Performs an approximate nearest neighbor (ANN) search to find objects near to the given queryVector.

This requires the vector property to have an HnswIndex.

The dimensions of the query vector should be at least the dimensions of this vector property.

Use maxResultCount to set the maximum number of objects to return by the ANN condition. Hint: it can also be used as the "ef" HNSW parameter to increase the search quality in combination with a query limit. For example, use maxResultCount of 100 with a Query.limit of 10 to have 10 results that are of potentially better quality than just passing in 10 for maxResultCount (quality/performance tradeoff).

Implementation

Condition<EntityT> nearestNeighborsF32(
        List<double> queryVector, int maxResultCount,
        {String? alias}) =>
    _NearestNeighborsCondition(this, queryVector, maxResultCount, alias);