SimilarityLevel class
Leave feedback
On this page
Represents an algorithm of the fuzzy search that specifies the similarity level.
Learn more
The SimilarityLevel type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new SimilarityLevel instance. |
| Method | Description |
|---|---|
| get_max_mistake_count | Gets the maximum allowed number of mistakes for the specified term length. |
| get_similarity_level | Gets the similarity level value for the specified term length. |
from groupdocs.search import Index
from groupdocs.search.options import SearchOptions, SimilarityLevel
index = Index("./index")
index.add("./documents")
options = SearchOptions()
options.fuzzy_search.enabled = True
options.fuzzy_search.fuzzy_algorithm = SimilarityLevel(0.8) # 0.0 loose .. 1.0 strict
result = index.search("contarct", options)
print(result.document_count)
Task guides that use SimilarityLevel:
- module
groupdocs.search.options
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.