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

Namespace: GroupDocs.Search
Assembly: GroupDocs.Search (in GroupDocs.Search.dll) Version: 20.11
Syntax
public SearchResult Search(
	string query
)

Parameters

query
Type: SystemString
The search query.

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

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