Represents an algorithm of the fuzzy search that specifies the similarity level. The similarity level algorithm calculates the maximum number of mistakes for a word as inversely proportional to the word length.
The example demonstrates a typical usage of the class.
stringindexFolder=@"c:\MyIndex\";stringdocumentsFolder=@"c:\MyDocuments\";stringquery="Einstein";Indexindex=newIndex(indexFolder);// Creating an index in the specified folderindex.Add(documentsFolder);// Indexing documents from the specified folderSearchOptionsoptions=newSearchOptions();options.FuzzySearch.Enabled=true;// Enabling the fuzzy searchoptions.FuzzySearch.FuzzyAlgorithm=newSimilarityLevel(0.8);// Creating the fuzzy search algorithm// This function specifies 0 as the maximum number of mistakes for words from 1 to 4 characters.// It specifies 1 as the maximum number of mistakes for words from 5 to 9 characters.// It specifies 2 as the maximum number of mistakes for words from 10 to 14 characters. And so on.SearchResultresult=index.Search(query,options);// Search in index