GroupDocs.Search supports indexing of many document formats. But there is also the possibility to implement support for any format other than the existing ones.
The following example demonstrates how to implement a custom text extractor.
The next example shows how to use the custorm extractor for indexing.
C#
stringindexFolder=@"c:\MyIndex\";// Specify path to the index folderstringdocumentsFolder=@"c:\MyDocuments\";// Specify path to a folder containing documents to searchIndexSettingssettings=newIndexSettings();settings.CustomExtractors.Add(newLogExtractor());// Adding custom text extractor to the index settingsIndexindex=newIndex(indexFolder,settings);// Creating or loading an indexindex.Add(documentsFolder);// Indexing documents from the specified folder
Note that custom extractors are not saved in an index and must be created and added each time the index is created or loaded. However, the same code can be used to create a new index and open an existing one. In this case, when opening an existing index, custom extractors from the index settings passed to the constructor will be used, the remaining index settings will be loaded from disk.
More resources
GitHub examples
You may easily run the code from documentation articles and see the features in action in our GitHub examples: