vectordb library
Kalan DB — embedded hybrid (vector + keyword) search engine for Android.
Public Dart API. Idiomatic async/await, typed results, no raw pointers.
Classes
- DocumentChunk
- A document chunk with its text and metadata.
- EmbeddedKalanDB
- A KalanDB paired with a TextEmbedder so callers can search by raw text: the query is embedded on-device, then hybrid-searched in one call.
- Encoded
- Result of WordPieceTokenizer.encode.
- KalanDB
-
A handle to an open, read-only
.vdbdatabase. - KalanDBConfig
- Open-time configuration.
- KalanDBStats
- Database statistics.
- MetadataFilter
- Metadata pre-filter. Null fields / empty lists mean "no constraint".
- SearchResult
- A ranked search result.
- TextEmbedder
- On-device text → embedding, mirroring the build-time embedding pipeline so runtime queries land in the same vector space as the indexed passages.
- WordPieceTokenizer
-
A BERT WordPiece tokenizer in pure Dart, faithful to HuggingFace
BertTokenizer(do_lower_case=true, strip_accents defaulted, WordPiece).
Enums
- Pooling
-
Pooling strategy applied to the transformer's
last_hidden_state. - SearchMode
- Search strategy.
Constants
-
kIntToDistance
→ const Map<
int, String> -
kIntToLanguage
→ const Map<
int, String> -
kIntToSubject
→ const Map<
int, String> -
kLanguageToInt
→ const Map<
String, int> -
kSubjectToInt
→ const Map<
String, int>
Functions
-
kalanDbAbiVersion(
) → int -
The
.vdbformat ABI version supported by the bundled engine. -
languageName(
int v) → String -
subjectName(
int v) → String
Exceptions / Errors
- KalanDBException
- Thrown for any native-side failure (open/search/corrupt file, etc.).