IndxSearchLib 3.3.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package IndxSearchLib --version 3.3.0.4                
NuGet\Install-Package IndxSearchLib -Version 3.3.0.4                
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="IndxSearchLib" Version="3.3.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IndxSearchLib --version 3.3.0.4                
#r "nuget: IndxSearchLib, 3.3.0.4"                
#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 IndxSearchLib as a Cake Addin
#addin nuget:?package=IndxSearchLib&version=3.3.0.4

// Install IndxSearchLib as a Cake Tool
#tool nuget:?package=IndxSearchLib&version=3.3.0.4                

IndxSearchLib

IndxSearchLib Developer Kit v3.3.0.4

Indx is a modern search system that stands out from the established monoliths with its simplicity, efficiency, flexibility and unique functionality.

Indx differs from other search libraries by using a pattern recognition system, rather than a linguistic model. This means that the search engine can recognize fragments of the same pattern. With this method, the entire search string is indexed, which allows the system to recognize relationships between hierarchies, unlike traditional search systems which merely index single words.

Documentation: Indx Documentation.

Features at a glance

  • Real-time, instant search as you type
  • Intelligent handling of major typos
  • No configuration needed
  • Lightweight software with minimal resource usage

Developer license

This version is licensed for testing purposes only and will expire on September 30, 2024. To extend the license, please register as a developer.

A commercial license is required to use the system in a production environment.

Installation

Prerequisites: Download .NET 8.

// Namespaces
using IndxSearchLib;
using IndxSearchLib.API_Files;

Get started

Download a test console app with a dataset to see how to use IndxSearchLib here: https://github.com/indxSearch/indx-csharp-console.

This guide includes some arguments set to null. These arguments are intended for more advanced usage scenarios.

Create an instance

var SearchEngine = new IndxSearchEngine(null, null, 100, false, null, null);
// Configuration 100 is default

Insert a document

The Insert function also accepts arrays.

int key = 0; 
// Foreign key. This can also be an ID or a key of your choice.
int segment = 0; 
// Use this if you want to search for multiple segments of the same key
string item = "The Matrix Reloaded"; 
// The indexed text pattern
string clientText = ""; 
// Use this to add non-indexed information
var doc = new Document(key, segment, item, clientText);
SearchEngine.Insert(doc);

Index

SearchEngine.IndexAsync();

Check status

The search engine will not be able to search before indexing is complete. Await SystemState 3.

var status = SearchEngine.Status;
var state = status.SystemState;
// Returns an int to check if system is ready
// 0 idle, 1 processing, 2 indexing, 3 ready
int progress = status.IndexProgressPercent;
// Returns an int 0-100 to check indexing state.

Search query

var text = "The Matrix"; // Pattern to be searched for

var applyCoverage = true; // Coverage is a function to detect and boost entire strings, words, joined words and prefix/suffix. Disable this to run pure pattern recognition search
var numRecords = 30; // Records to be returned
var timeOutLimit = 1000; // Timeout if cpu overload in milliseconds
var rmDuplicates = true; // Only return one of entries with the same key
var logPrefix = ""; // Logger prefix per search

var query = new SearchQuery(text, applyCoverage, numRecords, timeOutLimit, null, null, null, null, rmDuplicates, logPrefix, null, null);
var result = SearchEngine.Search(query);

List results

int index = 0;
foreach (var record in result.SearchRecords)
{
    // If applyCoverage is activated, the result class returns CoverageBottomIndex to use to truncate the list.
    if (result.CoverageBottomIndex != -1 && index > result.CoverageBottomIndex) { break; }

    // List index, Indexed Text and Metric Score
    Console.Write($"{index}\t");
    Console.Write(record.DocumentTextToBeIndexed);
    Console.WriteLine($" ({record.MetricScore})");
    
    index++;
}

Delete documents

SearchEngine.Delete(key); // Specify a key to a single doc
SearchEngine.DeleteAllDocuments(); // Delete all docs of instance

Check if reindex is required

Indx is a vector based engine that compares all searchable patterns to each other to create a vector model. Therefore when you alter the dataset more than 20% by inserting and deleting single documents, you should run indexing again. The status class has a bool to tell you this.

bool reIndexRequired = SearchEngine.Status.ReIndexRequired;

Searching will still be possible even if reindexing is necessary, but the automatic relevancy ranking function will be somewhat degraded.

Licensing

Check version and license

string version = SearchEngine.Status.Version;
bool validLicense = SearchEngine.Status.ValidLicense;
DateTime licenseExpiration = SearchEngine.Status.LicenseExpirationDate;

This version is an unregistered developer license, and will expire within months. You can extend this by applying as a registered developer.

Extending the license

After registering as a developer, or by purchasing rights for commercial use, you will receive an indx.license file. This should be referenced in your project for IndxSearchLib to interact with it.

//project.csproj
<ItemGroup>
    <None Include="indx.license">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
</ItemGroup>

Commercial use

Indx has a licensing fee for commercial use. Please contact us on post@indx.co to inquire.

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. 
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
3.3.0.6 89 9/2/2024
3.3.0.5 114 6/18/2024
3.3.0.4 100 6/11/2024