GroupDocs.Search for .NET

Search for text in business documents

GroupDocs.Search for .NET enables powerful and flexible text searches in your documents. Easily integrate search functionality into .NET applications.

How to search in TXT data

GroupDocs.Search enables efficient text searches in TXT documents, making it ideal for .NET applications.

  1. Set up a folder for storing the search index.
  2. Select the folder containing your files.
  3. Configure search options to process only TXT documents.
  4. Execute the search and retrieve results.
// Path to store the reusable search index
Index index = new Index("c:/MyIndex");

// Folder containing documents
index.Add("c:/MyDocuments");

// Search only within specific file formats
SearchOptions options = new SearchOptions();
options.SearchDocumentFilter = 
    SearchDocumentFilter.CreateFileExtension(".txt");

// Retrieve search results
SearchResult result = index.Search("Lorem", options);
dotnet add package GroupDocs.Search
click to copy
copied
More examples Documentation

Advanced searching features

GroupDocs.Search for .NET enables sophisticated text searches across more than 70 file formats. Indexing improves search efficiency and helps manage document content effectively.

Main features of GroupDocs.Search

Advanced text search

Extract relevant text from popular business documents, including PDFs, Word files, presentations, and spreadsheets. Supports multiple search techniques such as fuzzy search, homophone detection, and wildcards.

Optimized indexing for faster searches

Build and reuse search indexes to enhance search speed. Indexing optimizes performance when searching through large document collections.

Support for multiple languages

Perform searches in documents written in over 80 languages. Detects different keyboard layouts and word variations to improve accuracy.

Flexible search settings

Refine search results with customizable options, including filters, regular expressions, and case sensitivity settings.

Filter documents to be processed

Learn how to narrow down document searches using filters

C#

// Set up an index that excludes certain file formats
IndexSettings settings = new IndexSettings();
DocumentFilter fileExtensionFilter = 
  DocumentFilter.CreateFileExtension(".odp", ".png", ".rtf");

DocumentFilter invertedFilter = DocumentFilter.CreateNot(fileExtensionFilter);
settings.DocumentFilter = invertedFilter;

Index index = new Index("c:/MyIndex", settings);
    
// Specify the document directory
index.Add("c:/MyDocuments");

// Retrieve search results
SearchResult result = index.Search("Lorem");

// Process and use the search output
Console.WriteLine("Documents: " + result.DocumentCount);
Console.WriteLine("Occurrences: " + result.OccurrenceCount);
dotnet add package GroupDocs.Search
click to copy
copied
More examples Documentation

What is GroupDocs.Search?

GroupDocs.Search for .NET is a powerful library for efficient text search and document indexing. It supports over 70 file formats, including industry-standard documents such as PDF, Word, Excel, and PowerPoint. Improve search performance with fast and accurate results.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Search for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Key features

Perform accurate and efficient data searches.

Find data in your business documents

GroupDocs.Search supports 70+ file formats, allowing efficient processing and searching of popular office documents.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English