Highlighting
The module enables you to highlight the occurrences of a clue in search results. Highlighting is the process of retrieving the location of every instance of a clue in the search text.
SELECT etx_GetHilite (description, rc) FROM videos
WHERE etx_contains(description,
'multimedia', rc # etx_ReturnType);
multimedia
in
the description column of the table videos. In addition,
for each row returned, the query also returns etx_HiliteType values
that contain information about the location of every instance of the
word multimedia
in the corresponding document. The etx_HiliteType row data type consists of two fields: vec_offset and viewer_doc. The vec_offset field contains pairs of integers that describe the location of every instance of the highlight string in the document. The viewer_doc field contains the text document itself.
You can highlight occurrences of a clue in an individual document you have retrieved with an etx_contains scan with the etx_HiliteDoc() routine.
You can view the highlighted text contained in the etx_HiliteType object by using etx_ViewHilite() routine.
You can also use standard routines, such as ifx_lo_open() and ifx_lo_read(), or DataBlade® API large object routines, such as mi_lo_open() and mi_lo_read(), to manipulate etx_HiliteType objects.