HtmlHighlighter Class |
Namespace: GroupDocs.Search.Highlighters
The HtmlHighlighter type exposes the following members.
Name | Description | |
---|---|---|
![]() | HtmlHighlighter |
Initializes a new instance of the HtmlHighlighter class.
|
Name | Description | |
---|---|---|
![]() | OutputAdapter |
Gets the output adapter passed in the constructor.
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
string indexFolder = @"c:\MyIndex\"; string documentsFolder = @"c:\MyDocuments\"; // Creating an index Index index = new Index(indexFolder); // Indexing documents from the specified folder index.Add(documentsFolder); // Search for the phase 'Theory of Relativity' SearchResult result = index.Search("\"Theory of Relativity\""); // Highlighting found words in the text of a document FoundDocument document = result.GetFoundDocument(0); OutputAdapter outputAdapter = new FileOutputAdapter("Highlighted.html"); Highlighter highlighter = new HtmlHighlighter(outputAdapter); index.Highlight(document, highlighter);