Links
dtSearch Text Retrieval Engine Programmer's Reference
Highlighting hits
Highlighting Hits

How to display retrieved documents with hits highlighted

Remarks

To display a retrieved document with hits highlighted, the dtSearch Engine provides APIs that can convert documents to easily-displayed formats (HTML, RTF, or text) with caller-supplied highlight markings around the hits. 

To highlight hits in a document, dtSearch needs the following information:

  1. The name of the file to use as input
  2. The word offsets of the hits, usually obtained from search results
  3. The location of the alphabet file to use for word breaking. For indexed searches, this should be the index folder. (If the alphabet file used when a file is indexed is different from the one used when generating hit highlighting, word counts may be incorrect because different characters are treated as causing a word break.)
  4. The location of the index the document was retrieved from, and the document id of the document in the index.
  5. The output format (it_HTML, it_RTF, it_Utf8, or it_Ansi)
  6. The markings to be used around each hit.

When highlighting hits in a document retrieved from a search, use FileConverter.SetInputItem() to transfer all document properties from search results to the FileConverter in one step, eliminating the need to set items (1) through (4) individually. 

For information on highlighting hits in specific formats, see: 

Highlighting hits in HTML files 

Highlighting hits in PDF files 

Highlighting hits in XML files 

For information on implementing hit navigation, see: 

Hit navigation 

Group
Links
You are here: Overviews > Highlighting Hits > Highlighting hits
Copyright (c) 1995-2008 dtSearch Corp. All rights reserved.