Vultus.Search
0.0.6
See the version list below for details.
dotnet add package Vultus.Search --version 0.0.6
NuGet\Install-Package Vultus.Search -Version 0.0.6
<PackageReference Include="Vultus.Search" Version="0.0.6" />
paket add Vultus.Search --version 0.0.6
#r "nuget: Vultus.Search, 0.0.6"
// Install Vultus.Search as a Cake Addin #addin nuget:?package=Vultus.Search&version=0.0.6 // Install Vultus.Search as a Cake Tool #tool nuget:?package=Vultus.Search&version=0.0.6
Vultus Search
Simple, lightweight, in-memory search index
Overview
Vultus is a lightweight search index for .NET, using the concept of indexes over an in-memory key-value store i.e. a Dictionary<Key, Value>.
Out of the box it supports a property field indexer, allowing you to create property value buckets that you can easily filter on.
You can add your own custom Indexers by implementing the IIndexer interface.
Installation
Vultus is available as a NuGet package. You can install it using the NuGet Package Console window:
PM> Install-Package Vultus.Search
Usage
Creating and populating an index
var index = new Index<string, MyObject>(x => x.Key);
var items = new List<MyObject> {
new MyObject { Key = "item1", Property = "property1" },
new MyObject { Key = "item2", Property = "property2" }
};
index.Update(items);
Adding a field indexer and filtering
// Add indexer for "Property"
var indexByProp = index.AddIndex("MyPropIndex", x => x.Property);
// Filter on the indexer will return a list of matching keys
var keys = indexByProp.Filter("property1");
// We can then lookup our values from the index using the keys
var items = index.Filter(keys);
Filtering over multiple indexers
// Add some indexers for titles and UK counties
var indexByTitle = index.AddIndex("Title", x => x.Title); // Mrs, Mr, Miss, Ms
var indexByCounty = index.AddIndex("County", x => x.County); // London, Yorkshire, Merseyside, Devon etc.
// Find matches in our indexers
var titles = indexByTitle.Filter("Ms");
var counties = indexByCounty.Filter("London");
// Now lookup items where the result is both a match on the title and the county i.e. Ms and London
var items = index.Filter(titles.Intersect(counties));
License
Distributed under the MIT License. See LICENSE
for more information.
Acknowledgments
Inspired by the day job and the following articles and repositories:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.