Created
June 14, 2019 13:13
-
-
Save GroupDocsGists/314c845edb2685e5c90118f5472e2437 to your computer and use it in GitHub Desktop.
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
//For complete examples and data files, please go to https://github.com/groupdocs-search/GroupDocs.Search-for-Java | |
String indexFolder = "c:\\MyIndex"; | |
String documentFolder = "c:\\MyDocuments"; | |
//Creating index | |
Index index = new Index(indexFolder); | |
//Setting the log file name. The log file name can be relative or absolute. | |
index.getLogSettings().setFileName("Log\\Log.txt"); | |
//Setting the maximum size of the log file in megabytes. This value must be in the range from 0.1 to 1000. | |
index.getLogSettings().setMaxSize(2.0); | |
//Adding documents to index | |
index.addToIndex(documentFolder); | |
//Searching | |
SearchResults results = index.search("big"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment