LottaDB.Tiki
2.0.1
dotnet add package LottaDB.Tiki --version 2.0.1
NuGet\Install-Package LottaDB.Tiki -Version 2.0.1
<PackageReference Include="LottaDB.Tiki" Version="2.0.1" />
<PackageVersion Include="LottaDB.Tiki" Version="2.0.1" />
<PackageReference Include="LottaDB.Tiki" />
paket add LottaDB.Tiki --version 2.0.1
#r "nuget: LottaDB.Tiki, 2.0.1"
#:package LottaDB.Tiki@2.0.1
#addin nuget:?package=LottaDB.Tiki&version=2.0.1
#tool nuget:?package=LottaDB.Tiki&version=2.0.1
![]()
LottaDB.Tiki
Rich blob metadata extraction for LottaDB, powered by Tiki.Net.
When you upload a blob, Tiki.Net automatically parses it and stores strongly-typed metadata (EXIF from photos, ID3 from music, page counts from PDFs, etc.) as queryable entities in LottaDB.
Installation
dotnet add package LottaDB.Tiki
Quick Start
using Lotta;
using Lotta.Tiki;
var catalog = new LottaCatalog("myapp", connectionString);
var db = await catalog.GetDatabaseAsync("media", config =>
{
config.UseTikiExtraction(); // one line to enable
});
// Upload a photo — metadata is extracted automatically
await using var stream = File.OpenRead("vacation.jpg");
var photo = (BlobPhoto) await db.UploadBlobAsync("photos/vacation.jpg", stream);
// Rich metadata is available immediately
Console.WriteLine($"Camera: {photo.CameraModel}");
Console.WriteLine($"ISO: {photo.IsoSpeed}");
Console.WriteLine($"Size: {photo.Width}x{photo.Height}");
How It Works
UseTikiExtraction() registers an OnUpload handler that:
- Receives the blob content as a concurrent stream (zero-copy via TeeStream)
- Parses it with Tiki.Net's auto-detecting parser
- Maps the result to the correct
BlobFilesubtype - Saves the metadata entity — queryable and full-text searchable
The blob upload and parsing happen concurrently — no buffering the entire file in memory.
Querying Metadata
All metadata properties are queryable via LINQ and Lucene:
// Find high-ISO photos
var nightPhotos = db.Search<BlobPhoto>(p => p.IsoSpeed > 3200).ToList();
// Find large PDFs
var bigDocs = db.Search<BlobDocument>(p => p.PageCount > 50).ToList();
// Find music by artist
var songs = db.Search<BlobMusic>(m => m.Artist == "Pink Floyd").ToList();
// Full-text search across extracted document content
var results = db.Search<BlobFile>("quarterly revenue").ToList();
// Polymorphic — returns all file types
var allFiles = db.Search<BlobFile>().ToList();
Supported File Types
| File Type | BlobFile Subtype | Extracted Metadata |
|---|---|---|
| JPEG, PNG, TIFF, etc. | BlobPhoto |
Camera, ISO, aperture, focal length, GPS, dimensions |
| PDF, DOCX, DOC, RTF | BlobDocument |
Page count, word count, author, company, text content |
| XLSX, XLS | BlobSpreadsheet |
Sheet count, sheet names |
| PPTX, PPT | BlobPresentation |
Slide count |
| MP3, FLAC, WAV, OGG | BlobMusic |
Artist, album, track, year, genre, duration |
| MP4, AVI, MKV, MOV | BlobVideo |
Resolution, frame rate, codec, duration |
| EML | BlobMessage |
From, to, subject, date sent |
| HTML | BlobWebPage |
Language, charset, links |
Text content is automatically extracted and indexed for full-text search.
Configuration
// Default — uses auto-configured TikiEngine
config.UseTikiExtraction();
// Custom engine with specific parsers
var engine = new TikiEngine(TikiConfig.CreateBuilder()
.AddParser(new PdfParser())
.AddParser(new ImageParser())
.Build());
config.UseTikiExtraction(engine);
BlobFile Convenience Methods
var file = await db.GetAsync<BlobPhoto>("photos/vacation.jpg");
// Download the blob content
Stream? stream = await file.DownloadAsync();
// Delete blob + metadata in one call
await file.DeleteAsync();
Without Tiki (Default Handler)
LottaDB includes a built-in default handler that doesn't require Tiki.Net:
config.OnUpload(); // uses file extension for type detection
This gives you:
- File extension to MIME type mapping
- Correct
BlobFilesubtype (BlobPhoto for .jpg, BlobDocument for .pdf, etc.) - Text content extraction for known text formats (.txt, .md, .json, .cs, .py, etc.)
- Basic metadata (path, name, folder, media type, content length)
The Tiki handler adds deep content parsing (EXIF, ID3 tags, page counts, etc.) on top.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.