Vultus.Search 0.0.7

There is a newer version of this package available.
See the version list below for details.
dotnet add package Vultus.Search --version 0.0.7                
NuGet\Install-Package Vultus.Search -Version 0.0.7                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Vultus.Search" Version="0.0.7" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Vultus.Search --version 0.0.7                
#r "nuget: Vultus.Search, 0.0.7"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Vultus.Search as a Cake Addin
#addin nuget:?package=Vultus.Search&version=0.0.7

// Install Vultus.Search as a Cake Tool
#tool nuget:?package=Vultus.Search&version=0.0.7                

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .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.

Version Downloads Last updated
0.0.8 403 10/17/2022
0.0.7 383 9/10/2022
0.0.6 443 4/25/2022
0.0.5 425 3/9/2022
0.0.4 418 3/6/2022
0.0.3 416 3/3/2022