AntIndex 2.4.1

There is a newer version of this package available.
See the version list below for details.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package AntIndex --version 2.4.1
                    
NuGet\Install-Package AntIndex -Version 2.4.1
                    
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="AntIndex" Version="2.4.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AntIndex" Version="2.4.1" />
                    
Directory.Packages.props
<PackageReference Include="AntIndex" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AntIndex --version 2.4.1
                    
#r "nuget: AntIndex, 2.4.1"
                    
#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.
#:package AntIndex@2.4.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AntIndex&version=2.4.1
                    
Install as a Cake Addin
#tool nuget:?package=AntIndex&version=2.4.1
                    
Install as a Cake Tool

AntIndex

Linked data text search engine.

Features

  • Fast text search using 2-gramm words index
  • Designed to search for entities of different types (up to 250 types)
  • Support for data hierarchy and relatedness
  • Flexible sorting settings
  • MessagePack binary serialization enabled index file saving utilities

Documentation

Normalizing and splitting

The library provides built-in tools for normalizing and splitting a name into words for searching. Use this static objects.

AntIndex.Services.Normalizing.DefaultNormalizer.Instance AntIndex.Services.Splitting.DefaultPhraseSplitter.Instance

Also, you can redefine normalization and phrases splitting on words for use in your cases. Implement: IPhraseSplitter and INormalizer

  • Your search entity must implement the interface IIndexedEntity
    • GetKey() - Defines an entity keys
      • Use Ant.Key() for create key, entityType must be greater than 0
    • GetNames() - Define the phrases by which the search will be carried out
      • Use the Ant.Phrase() method and its overloads to specify names to search for and to define the name type for flexible sorting and scoring.
      • If you are using the extended phrase configuration Ant.Phrase(string phrase, byte phraseType), use phraseType > 0
    • Links() - Identify the keys that are associated with your entity (when creating an index, the entity will be a child of each element in the Links list)
    • Parent() - Determine the parent if the entity cannot be found outside the given parent's hierarchy

Build index

  • Use Ant.Build() to build Anthill index isntance, passing the normalizer and splitter instances to the method, as well as an enumeration entities for searching
  • Also, you can get an instance of the builder using Ant.GetBuilder(INormalizer normalizer, IPhraseSplitter phraseSplitter)
    • Call builder AddEntity method to add entity (multithreading is not working)
    • Call Build to get Anthill instance

Create SearchContext

Implement abstract SearchContextBase

  • Implement SearchContextBase.Request property (array of requests to search) to configure your search request. The query options are presented below (use in the same order for proper operation)
    • Search - search current type entities
    • SearchBy - search current type entities in parents hierarchy (parents must be found in the Search block above)
    • Select - performs forced addition of entities of the target type based on the passed ids
    • AppendChilds - use to force adding entities by parent
  • Override GetLinkedEntityMatchMiltipler(byte entityType, byte linkedType) for flexible scoring mathes of linked entities
  • Override GetPhraseTypeMultipler(byte phraseType) for flexible scoring by phrase types
  • Override OnLinkedEntityMatched(Key entityKey, Key linkedKey) to add individual sorting rules if linked entity is match
  • Override OnEntityProcessed(EntityMatchesBundle entityMatchesBundle) to add individual sorting rules
  • Override ResultVisionFilter(byte type, IEnumerable<EntityMatchesBundle> result) to filter the results that will be output as a result

Search

  • Use AntHill instance method Search passing the search context
  • Or use AntHill instance method SearchTypes passing the search context and list of target entities with their count

Save

  • Use Ant.WriteIndex(AntHill index, string filePath) for saving index file
  • Use Ant.ReadIndex(string filePath) for read index file

Optimizations

  • If your entity cannot be found if the hierarchy parent is not found, be sure to set the IIndexedEntity.Parent field to improve performance.
  • If you using overrides OnLinkedEntityMatched or OnEntityProcessed use a static AdditionalRule intances for smaller memory allocations
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
2.5.2 108 2/3/2026
2.5.1 105 1/31/2026
2.5.0 101 1/31/2026
Loading failed