Skip to content

Repository files navigation

Flatseek

Flatseek

Powerful disk-first full-text search without the infrastructure.

Flatlens Dashboard

Explore, filter, and search structured data at any scale — from live application data to historical archives, and AI-ready datasets.

PythonLicenseTestsPyPI version


GitHub:https://github.com/flatseek/flatrun · Organization:https://github.com/flatseek



Part of the Flatseek ecosystem

Flatseek (Keyword Search) • Flatvec (Vector Search) • Flatask (RAG Runtime) • Flatrun (LLM Inference Runtime) • Flatweight (AI Model Storage) • Flattune (LLM Fine-Tuning) • Flatlens (Data Visualization)


Demo:flatlens.demo.flatseek.io · Docs:flatseek.io/docs · Sample Datasets:HuggingFace


See it work

Search a 14 GB index hosted on HuggingFace through a serverless API running with only 2 GB of memory.
# demo CLI
flatseek search https://huggingface.co/datasets/flatseek/public-dataset/resolve/main/6.3M-books.fsk \
"title:dune"
[reading remote index] ✓
[searching remote] ✓
Found: 1,018 matches
{'name':'Statisticity','author':['Yaron Glazer'],'genres':['Science Fiction'],'...':'...'}
# demo API
curl -X 'GET' \
'https://api.demo.flatseek.io/6.3M-books/_search?q=dune&from=0&size=20&bucket=https%3A%2F%2Fhuggingface.co%2Fdatasets%2Fflatseek%2Fpublic-dataset' \
-H 'accept: application/json'
{"hits":{"total":1018,"hits":[{"_source":{"name":"Statisticity","author":["Yaron Glazer"],"...":"..."}}]},"took":1}

That query runs against 6.3M books dataset hosted on HuggingFace, and only pulls the byte ranges it needs to answer it. The same index also powers the Flatlens - live dashboard — try it with zero installation.

Chat with Your Data

Need natural language instead of search syntax? Flatask is the AI companion for Flatseek. It turns any Flatseek index into a chat-ready knowledge base.

flatask chat https://huggingface.co/datasets/flatseek/public-dataset/resolve/main/6.3M-books.fsk
You> Recommend books similar to Dune.
Assistant> Foundation, Hyperion, Children of Time...
You> How many books were published after 2010?
Assistant> 482,391

Flatask translates natural language into optimized Flatseek queries, retrieves only the relevant records, then lets any LLM generate accurate, grounded answers. Learn more: github.com/flatseek/flatask


The problem

Distributed search engines like Elasticsearch and OpenSearch are excellent at large-scale production systems—but they assume always-on infrastructure.

For many workloads, that means paying for 24/7 servers, storage, replicas, and operational overhead even when you're simply searching documents.

Whether you're powering a production API, exploring a dataset, preparing training data, building a RAG pipeline, or publishing a searchable archive, the infrastructure often costs more than the search itself.

Lightweight alternatives avoid the cluster, but they're usually limited to local files. If your data lives in S3, HuggingFace, or object storage, you still need to download it before you can search it, making remote search harder than it should be.

What Flatseek does differently

Flatseek uses one query language across two index formats, so the same search engine works for both live production data and portable datasets.

Directory index.fsk archive
DataMutableImmutable
Best forProduction APIs, applications, internal analyticsAI & RAG datasets, training data, historical archives, public searchable datasets
UpdatesInserts, updates, deletesRebuild the archive or renew the license
DistributionMulti-file indexSingle portable file

Both formats expose the same query language, embedded library, CLI, and REST API—switching between mutable production data and immutable archives doesn't require changing your application.

The .fsk format packages an entire index into a single portable file, making it easy to publish on object storage, CDN, or platforms with file-count limits while preserving the same query capabilities.


Performance at a glance

500K documents • Article schema • SSD • Compared against Elasticsearch

MetricFlatseekElasticsearch
Search p507.9ms16.1ms
Range query hits501,011 (exact)505,044 (approximate)
Build 500K rows216s113s

Full comparison including tantivy, Typesense, Whoosh, ZincSearch: docs/benchmark.md or bench.flatseek.io


Core capabilities

CapabilityDescription
Full-text searchTrigram-based search with wildcard, phrase, and boolean queries — docs/search.md
Range queriesExact filtering on numeric, date, and keyword fields — docs/search.md
SortingSingle or multi-field sorting — docs/search.md
AggregationsTerms, stats, cardinality, date histograms — docs/aggregate.md
Nested & array fieldsQuery nested objects and match values inside arrays — docs/search.md
Multi-index searchQuery multiple index directories with glob patterns — docs/multiindex.md
Cross-lookupJoin two indexes on a shared key field — docs/cross-lookup.md
Remote indexesSearch HTTP-hosted indexes without downloading the entire dataset — docs/storage.md
Portable archivesPackage complete indexes into a single .fsk file — docs/cmd.md
Distribution & licensingPublic, password-protected, time-limited, or renewable license-based archives — docs/distribution.md
Embedded libraryQuery directly from Python without a server — docs/python.md
REST APIElasticsearch-compatible Search, Bulk, and CRUD APIs — docs/restapi.md
CLI commandsFull reference for all subcommands (build, search, pack, unpack, export, slice, ...) — docs/cmd.md
Parallel indexingMulti-worker index builds for faster ingestion — docs/build.md
ExportStream matching documents as JSONL or CSV — docs/export.md
SliceMaterialize query results as a new standalone index — docs/build.md
CompactionReclaim disk space after large delete operations — docs/cmd.md
Serve & dashboardSelf-hosted API server with embedded dashboard — docs/serving.md

Installation

Recommended — one-liner

curl -fsSL flatseek.io/install.sh | sh

Includes: • CLI • REST API • Flatlens dashboard (http://localhost:8000/dashboard)

PyPI

pip install flatseek

CLI only. For the Flatlens dashboard:

git clone https://github.com/flatseek/flatlens

From source

git clone https://github.com/flatseek/flatseek.git
cd flatseek
pip install -e .

Requirements: Python ≥ 3.10, macOS / Linux / WSL.


Quick start

# Generate 100K dummy data
flatseek generate -r 100000 -s article -f csv -o ./data.csv
# Build index
flatseek build ./data.csv -o ./data
# Query via CLI
flatseek search ./data "program:raydium AND amount:>1000000"# Serve API + dashboard
flatseek serve -d ./data
# Pack index into single portable .fsk file
flatseek pack ./data -o ./data.fsk
# Query from portable file
flatseek search data.fsk "program:raydium AND amount:>1000000"# Serve API + dashboard from portable file
flatseek serve data.fsk
# Query a .fsk archive directly from HTTP — no full download
flatseek search https://huggingface.co/datasets/owner/repo/resolve/main/data.fsk "program:raydium AND amount:>1000000"# Serve a .fsk archive directly from HTTP — no full download
flatseek serve https://huggingface.co/datasets/owner/repo/resolve/main/data.fsk
# Export results
flatseek export ./data "program:raydium AND amount:>1000000" -f jsonl --out exported.jsonl
flatseek export data.fsk "program:raydium AND amount:>1000000" -f jsonl --out exported.jsonl

→ API: http://localhost:8000 → Dashboard: http://localhost:8000/dashboard


Remote datasets

Build an index once, upload it to any HTTP-accessible storage, and query it from anywhere using the same embedded library, CLI, or REST API.

Flatseek reads only the byte ranges required to answer each query, so even large indexes can be searched remotely without downloading the entire file.

Supported providers:

  • HuggingFace Datasets / Buckets
  • S3-compatible storage (Amazon S3, MinIO, Cloudflare R2)
  • Vercel Blob
  • Any static HTTP server or CDN

Try it now: Use the live dashboard at flatlens.demo.flatseek.io to explore remote .fsk indexes directly from your browser—no installation required.


Example indexed datasets

All datasets below are hosted on HuggingFace. The Flatseek API serving the dashboard is deployed on a free Vercel hobby account — and it searches a 14 GB index in under 5 seconds by fetching only the byte ranges it needs.

DatasetIndex SizeDocumentsIndex FileTry in Flatlens
6.3M Books14.1 GB6.3M Goodreads booksDownloadOpen →
1.2M Movies2.1 GB1.2M TMDB moviesDownloadOpen →
5M Wikipedia1.39 GB5M Wikipedia articlesDownloadOpen →
1.2M Songs947 MB1.2M Spotify tracksDownloadOpen →
500K Startups600 MB500K Product Hunt launches (2013–2026)DownloadOpen →
800K Domains539 MB800K WHOIS domain registrationsDownloadOpen →
500K Actors84.2 MB500K movie actorsDownloadOpen →
271K Athletes75.6 MB271K Olympic athletes (1800–2000)DownloadOpen →

Distribution & Licensing

Flatseek supports four distribution models, depending on your distribution and access-control requirements.

ModelFormatIndex FileEncryptionExpirationAccess Renewal
PublicFoldersample-articlesNoneNever
Password-ProtectedFoldersample-encryptedPer-file ChaCha20NeverChange the passphrase
Time-LimitedSingle .fskdemo_enclosed_activeFull-file ChaCha20Fixed dateMust repack the archive
License-BasedSingle .fskdemo_licenseSection-level ChaCha20Renewable tokenIssue a new token — no repack needed

Key difference — time-limited vs. license-based: when a time-limited archive expires, you must repack it from existing non-fsk index to extend access. When a license-based archive expires, you issue a new HMAC token — the index itself stays unchanged.

The credentials below are public demo credentials for the samples above — not secrets.

ModelDashboard linkCredentials
Public foldersample-articles →None
Password-protected foldersample-encrypted →Passphrase: flatseek
Time-limited .fskdemo_enclosed_active →Passphrase: flatlens_demo_enclosed
License-based .fskdemo_license →Token: ZGVtby11c2VyfDE4MTQ3NDU2MDB8MHxtUkJaTkN4WUdLeWhrV2NUMGN3Wlo0MkhUc1IvelNpYXBzUGo4a2tZdVhzPQ==

Full Documentation

GuideDescription
Quick StartInstall, index, query — in 5 minutes
IndexingFormats, column types, parallel builds, encryption
Query LanguageFull syntax reference
CLI ReferenceAll CLI commands
Command ReferenceDetailed reference for every CLI subcommand
REST APIAPI endpoints
SearchFull-text, wildcard, range, boolean, nested/array queries
AggregationsTerms, stats, date histogram, cardinality
Multi-IndexWildcard search across multiple index directories
Cross-LookupJoin two indexes on a shared key field
Python LibraryQuery, insert, upsert, update, delete, bulk from Python
Upsert & Write OpsInsert, upsert, update, delete, bulk operations
ExportStream matching documents as JSONL or CSV
Serve & DashboardSelf-hosted API server with embedded dashboard
Remote StorageHuggingFace, S3, Vercel Blob backends
DistributionPublic, password-protected, time-limited, or license-based archives
SchemasSupported column types
ArchitectureStructural and behavioral map
InternalsDeep technical breakdown
TestsTest coverage matrix and gap analysis
Implementation MatrixFeature checklist across CLI, library, and REST API (auto-generated)

Contributing

PRs welcome. Run tests:

pytest tests/ -v # all tests

License

Apache 2.0. See LICENSE.

About

Powerful disk-first full-text search for production data and portable datasets. No always-on infrastructure required.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages