NAME
SQLite::VecDB::Result - Search result from SQLite::VecDB
VERSION
version 0.001
SYNOPSIS
my @results = $collection->search(vector => [...], limit => 5);
for my $r (@results) {
say $r->id; # 'doc1'
say $r->distance; # 0.042
say $r->metadata; # { title => 'Hello' }
say $r->content; # 'Original text...'
say "$r"; # 'doc1' (stringifies to id)
}
DESCRIPTION
Immutable result object returned by "search" in SQLite::VecDB::Collection. Stringifies to id.
id
The unique identifier of the stored vector.
distance
The distance from the query vector. Lower means more similar. The scale depends on the distance metric (cosine: 0..2, l2: 0..inf).
metadata
The metadata HashRef stored with this vector.
content
The original text content, if stored.
vector
The stored vector, if requested.
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-sqlite-vecdb/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.us>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.