Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active December 9, 2023 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/df551dadf1dd1962199de2ec68dc2f46 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/df551dadf1dd1962199de2ec68dc2f46 to your computer and use it in GitHub Desktop.
Fuzzy Search in Files across Folders using C#
// Fuzzy Search multiple files across multiple folders using C#
// Creating an index folder and add document's folder to it
Index index = new Index("indexing-folder-path");
index.Add("path/parent-folder");
SearchOptions options = new SearchOptions();
options.FuzzySearch.Enabled = true; // Enabling the fuzzy search
options.FuzzySearch.FuzzyAlgorithm = new SimilarityLevel(0.8);
string query = "nulla"; // search approximate matches of the provided query
SearchResult result = index.Search(query, options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment