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 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 5 characters.// It specifies 1 as the maximum number of mistakes for words from 6 to 10 characters.// It specifies 2 as the maximum number of mistakes for words from 11 to 15 characters. And so on.SearchResultresult=index.Search(query,options);// Search in index