Recursive AI
oneindexCookbook

oneindex cookbook

Answers to common search tasks in C# with OneIndex: full-text search, vector search, hybrid search with reranking, search over EF Core entities, a folder of PDFs with citations, and moving over from Lucene.NET. Each recipe is a complete program with the output it really prints on OneIndex 0.4.0-preview.2 from NuGet.

Recipes

Full-text search in C#Add full-text search to a .NET app in C# with OneIndex: BM25 ranking, phrases, typo tolerance, filters, facets and highlights, in-process with no server and no native code. A complete program and its real output.Vector search in .NETSemantic vector search in C# with OneIndex: embed text locally with the bundled bge-small-en-v1.5 model, store the vectors in an HNSW index and find the nearest documents by meaning, with filters. No server, no Python, no API key. Real output.Hybrid search with reranking in C#Combine keyword (BM25) and vector search in one ranking in C#, then rerank the top hits with a cross-encoder, all in-process with OneIndex and bundled models. Compare the three rankings on real output.Full-text search over EF Core entitiesAdd full-text search to Entity Framework Core entities in C# with OneIndex: SaveChanges keeps a search index in step through a transactional outbox, and one query mixes index filters with database filters. SQLite example with real output.Search a folder of PDFs and documents in C# with citationsIndex a folder of PDF, Markdown, HTML, text and archive files in C# with OneIndex.Files, search it, and get a citation for every hit: file, page, character range and the exact text. Local only, incremental re-runs. Real output on a NIST PDF.Migrate from Lucene.NET to OneIndexMove a Lucene.NET 4.8 search to OneIndex in C#: which call replaces IndexWriter, QueryParser, Sort, FacetsCollector and Highlighter, how scoring and analysis differ, and how to move an existing index. A complete program with real output.