IndexRepositorySearch Method (String, SearchOptions)
Searches in all indexes of the repository.

Namespace: GroupDocs.Search
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 20.8
Syntax
public SearchResult Search(
	string query,
	SearchOptions options
)

Parameters

query
Type: SystemString
The search query.
options
Type: GroupDocs.Search.OptionsSearchOptions
The search options.

Return Value

Type: SearchResult
The search result.
Examples
The example demonstrates how to perform search in index repository.
C#
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";
string query = "Einstein";

IndexRepository repository = new IndexRepository();
Index index = repository.Create(indexFolder); // Creating index
index.Add(documentsFolder); // Indexing documents

SearchOptions options = new SearchOptions();
options.UseCaseSensitiveSearch = true; // Setting flag of case sensitive search

SearchResult result = repository.Search(query, options); // Searching
See Also