TableDiscreteFunction Class |
Namespace: GroupDocs.Search.Options
The TableDiscreteFunction type exposes the following members.
Name | Description | |
---|---|---|
![]() | TableDiscreteFunction(Int32, Step) |
Initializes a new instance of the TableDiscreteFunction class.
|
![]() | TableDiscreteFunction(Int32, Int32) |
Initializes a new instance of the TableDiscreteFunction class.
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetMaxMistakeCount |
Gets a maximum allowed number of mistakes for specified term length.
(Overrides FuzzyAlgorithmGetMaxMistakeCount(Int32).) |
![]() | GetSimilarityLevel |
Gets a similarity level for specified term length.
(Overrides FuzzyAlgorithmGetSimilarityLevel(Int32).) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
string indexFolder = @"c:\MyIndex\"; string documentsFolder = @"c:\MyDocuments\"; string query = "Einstein"; Index index = new Index(indexFolder); // Creating an index in the specified folder index.Add(documentsFolder); // Indexing documents from the specified folder SearchOptions options = new SearchOptions(); options.FuzzySearch.Enabled = true; // Enabling the fuzzy search options.FuzzySearch.FuzzyAlgorithm = new TableDiscreteFunction(1, new Step(5, 2), new Step(8, 3)); // Creating the fuzzy search algorithm // This function specifies 1 as the maximum number of mistakes for words from 1 to 4 characters. // It specifies 2 as the maximum number of mistakes for words from 5 to 7 characters. // It specifies 3 as the maximum number of mistakes for words from 8 and more characters. SearchResult result = index.Search(query, options); // Search in index