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

QUERY PROCESSING

 

Searching is of course, the heart of Onix and it is also what Onix really excels at. Onix provides as part of its query processor a query optimizer which actually evaluates the query and deduces the optimal way that a query should be performed by the query processor. This along with a number of other enhancements give Onix the ability to solve queries in a fraction of the time that could be done otherwise and is also one of the reasons why Onix is significantly faster than many other systems.

To start processing queries using Onix, you first need to have an index manager (created with ixCreateIndexManager) and an opened index (ixOpenIndex) that has had some data added to it. From this point, you simply need to start a retrieval session with ixStartRetrievalSession and obtain your query from the user or other source.

Onix takes all its queries in a normalized form which allows it to search on any data which was indexed -- even binary data. It does this by representing your query terms in hexadecimal. For example, a search for the term "whale" would be represented as: "0x7768616c65" and a search for "white & whale" would be "0x7768697465 & 0x7768616c65". Onix provides some support routines to help you convert your queries into this normalized form. The primary one is ixConvertQuery which takes a standard query using a-z, A-Z, 0-9 as letters in the query terms and it converts it to a hexadecimal query. This works for most people in most situations. However, occasionally, people have special needs or need to be able to search on other characters. For this, Onix provides ixCharToHex, ixHexToChar, and ixCharWordToHexWord to allow you to change the query term characters to their normalized form yourself.

ixLongQueryFormToShortQueryForm changes such things as "NEAR" to their shorter normalized form which may make forming queries a bit easier for users.

In either case, once your query is ready to go, simply pass it to ixProcessQuery. A result vector is returned with your query results listed in it. You may navigate the results using Onix's list navigation functions.

Note: When you are finished navigating a hit list, you need to delete it using ixDeleteResultVector.

 

Unicode

Processing Unicode queries are basically the same as processing standard queries. See the description in the manual's Unicode section.

 

Navigating the Hit List

Onix provides a number of routines for navigating the result vectors that you create or the ones which are returned from processing queries via ixProcessQuery. These are relatively straightforward.

Each does what what you might expect and allows you to go forward and backwards in the results list.

See Also

ixStartRetrievalSession, ixEndRetrievalSession, ixConvertQuery, ixConvertQuery2, ixLongQueryFormToShortQueryForm, ixCharToHex, ixHexToChar, ixCharWordToHexWord, ixProcessQuery, ixNumHits, ixVectorPreviousHit, ixVectorCurrentHit, ixVectorNextHit, ixVectorPreviousHit, ixVectorPreviousRecord, ixVectorNextRecord