---
title: "oneindex cookbook"
url: https://recursiveai.org/oneindex/cookbook/
description: "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…"
version: "0.4.0-preview.2"
---

# 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#](https://recursiveai.org/oneindex/cookbook/full-text-search-csharp/index.md): 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 .NET](https://recursiveai.org/oneindex/cookbook/vector-search-dotnet/index.md): Semantic 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#](https://recursiveai.org/oneindex/cookbook/hybrid-search-reranking-csharp/index.md): 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 entities](https://recursiveai.org/oneindex/cookbook/search-ef-core-entities/index.md): Add 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 citations](https://recursiveai.org/oneindex/cookbook/search-folder-files-citations-csharp/index.md): Index 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 OneIndex](https://recursiveai.org/oneindex/cookbook/migrate-from-lucene-net/index.md): Move 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.
