Related Article(s):
Created
December 10, 2023 15:27
-
-
Save GroupDocsGists/a3c8b78d8df5fea31964bf5dd2174d32 to your computer and use it in GitHub Desktop.
Fuzzy Search in Files across Folders using Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fuzzy Search multiple files across multiple folders using Java | |
// Creating an index folder and add document's folder to it | |
Index index = new Index("path/indexing-folder-path"); | |
index.add("path/parent-folder"); | |
SearchOptions options = new SearchOptions(); | |
options.getFuzzySearch().setEnabled(true); // Enabling the fuzzy search | |
options.getFuzzySearch().setFuzzyAlgorithm(new SimilarityLevel(0.75)); | |
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