Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Created June 13, 2019 06:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/e334ad082c0414bbbace70c424f64136 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/e334ad082c0414bbbace70c424f64136 to your computer and use it in GitHub Desktop.
//For complete examples and data files, please go to https://github.com/groupdocs-search/GroupDocs.Search-for-.NET
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.LogSettings.FileName = @"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.LogSettings.MaxSize = 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