GroupDocs.Search allows creating a full-text index or a metadata index of documents. To index only metadata without the main content of documents, set the IndexType property of the index settings to IndexType.MetadataIndex when creating an index. The size of an index of this type will be very small. The index type is fixed when the index is created, so it cannot be changed for an existing index.
The following example demonstrates the creation of the metadata index.
C#
stringindexFolder=@"c:\MyIndex\";stringdocumentsFolder=@"c:\MyDocuments\";// Creating an instance of index settingsIndexSettingssettings=newIndexSettings();settings.IndexType=IndexType.MetadataIndex;// Setting index type// Creating a new index in the specified folderIndexindex=newIndex(indexFolder,settings,true);// Indexing documents from the specified folderindex.Add(documentsFolder);// Searching in the indexSearchResultresult=index.Search("Einstein");
More resources
GitHub examples
You may easily run the code from documentation articles and see the features in action in our GitHub examples: