Ferret 0.3.0
See the version list below for details.
dotnet add package Ferret --version 0.3.0
NuGet\Install-Package Ferret -Version 0.3.0
<PackageReference Include="Ferret" Version="0.3.0" />
<PackageVersion Include="Ferret" Version="0.3.0" />
<PackageReference Include="Ferret" />
paket add Ferret --version 0.3.0
#r "nuget: Ferret, 0.3.0"
#:package Ferret@0.3.0
#addin nuget:?package=Ferret&version=0.3.0
#tool nuget:?package=Ferret&version=0.3.0
Ferret
Lexical (BM25), semantic and hybrid file search for .NET. Point it at some folders and search: it ranks whole files, best first, with excerpts, and keeps a persisted index so later searches are fast.
Install
dotnet add package Ferret
Use
open Ferret
use ferret = new FerretClient(FerretOptions(Roots = [| "docs" |]))
for doc in ferret.Search("how do I install it", 10, Hybrid) do
printfn "%.3f %s" doc.Score doc.File
Search takes Lexical, Semantic or Hybrid. Semantic and hybrid use a small local model that downloads on first use; EnsureModel() fetches it ahead of time. BuildIndex indexes ahead of the first search, Search and BuildIndex take a CancellationToken and have SearchAsync/BuildIndexAsync variants, and Grep does regex search like rg. FerretOptions sets the roots, cache directory, model directory, default mode, offline mode, extra ignore patterns and a progress callback.
The cache is shared with the ferret command (Ferret.Tool).
Docs and source: https://github.com/dburriss/ferret
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- Flexi.Yaml (>= 0.1.0)
- FSharp.Core (>= 10.1.403)
- Microsoft.ML.OnnxRuntime (>= 1.31.1)
- Microsoft.ML.Tokenizers (>= 2.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
`FerretOptions.ModelUrl` and `FERRET_MODEL_URL` to download the model from a mirror (checksums still verified).
`FerretClient.IsModelAvailable`, a non-throwing check so a host can decide when to download the model.
`CancellationToken` overloads of `FerretClient.Search` and `BuildIndex`, `SearchAsync` and `BuildIndexAsync`, and `EnsureModelAsync(ct)`. A cancelled run throws `OperationCanceledException` and leaves the saved indexes untouched; the model download is now asynchronous I/O and cancellable.
Ctrl+C during `--index`, `--lex`, `--sem`, `--hybrid` or `--model download` now stops cleanly (exit 130).