Skip to main content

SearchV Must Be Used on a Vector Type

Erroneous Code Example

This error occurs when you use SearchV on a type that is not a vector type.
QUERY findSimilar(embedding: [F32; 128]) =>
    results <- N<User>::SearchV(embedding, 10)
    RETURN results

Solution

Use SearchV on a vector type, not a node or edge type.
QUERY findSimilar(embedding: [F32; 128]) =>
    results <- V<Document>::SearchV(embedding, 10)
    RETURN results