Onix Text Retrieval Toolkit
API Reference

API
Function List
Topical List

Main Index

Introduction
Calling Sequences
Query Processing
Relevancy Ranking
Data Types
Error Handling
   
Support
   
Lextek Products
Onix Text Retrieval Engine
Lextek Document Profiler & Categorizer
Brevity Document Summarizer
RouteX Routing Engine
Language Identifier

HIGHLIGHTING QUERY TERMS

When displaying search results to a user, it is often useful to highlight the terms the user searched for making it easier to find the information they are interested in. Onix provides several routines which can assist in highlighting the search terms in retrieved portions of text. Onix's highlighting routines also support the wildcards just as the search engine does.

To use the highlighting routines, simply create a highlightmatcher using ixCreateHighlightMatcher, add each of the terms (wildcarded or not) you want to highlight to the highlight matcher using ixAddWildCardPatternToHighlightMatcher. To highlight the search terms in your text, simply parse out each word in the text and test it against the highlight matcher using the ixHighlightMatcherMatch. If the word matches, highlight it appropriately for whatever display system you are using. when finished with the highlight matcher, delete it using ixDeleteHighlightMatcher.

 

See Also

ixCreateHighlightMatcher, ixDeleteHighlightMatcher, ixAddWildCardPatternToHighlightMatcher, ixHighlightMatcherMatch