Onix Text Retrieval Toolkit
API Reference

Function List
Topical List

Main Index

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

Onix Types

This Onix Type page is aimed at helping the developer use the Onix API in environments other than C or C++ for which the API was primarily designed.  By supplying the equivalent values in whatever language you are working, Onix may be easily run from just about any programming environment available.

The following types are defined in the Onix API.  As you will notice, a number of the types used within Onix are "void pointers" (also called "generic pointers").  Void pointers do not have a type associated with them unlike character pointers or integer pointers.  These type explanations should help you if you have need to port the Onix API to a language other than C/C++.

As you will notice are several "enumerated" integer types.  These types are a standard integer which may be one of each of its possible enumerated values.  A standard integer may be substituted for an enumerated value as long as its value is one of the values specified.

Onix Type

"Real" Type

OnixIndexManagerT void pointer
OnixIndexingEngineT void pointer
OnixFileSpecT void pointer
OnixQueryVectorT void pointer
OnixResultVectorT void pointer
OnixTermCountVectorT void pointer
HighlightMatcherT void pointer
RobotsTxtParserT void pointer
RecordNumT unsigned 32 bit integer
WordNumT unsigned 32 bit integer
UCharT unsigned 8 bit integer
ULongT unsigned 32 bit integer
UShortT unsigned 16 bit integer
FloatT IEEE 32 bit floating point
LongT signed 32 bit integer
UnicodeCharT unsigned 16 bit integer


Onix Structures

Structures are user definable types which are aggregates of base types.  Pascal calls them "records" and many other languages have similar constructs.  In short, a structure is a block of memory which can be programically treated as a unit.  A structure also generally contains a number of sub objects.  The structures used by the Onix API are as follows:


Onix Structure Name

Structure Contents
struct {
         UCharT Length;
         UCharT TermType;
         ULongT FileNumber;
         ULongT RecordNumber;
         ULongT RecordOffset;
         ULongT LastWordNumber;
       } WordTypeT;
struct {
         BooleanT HasCurrentWord;
         ULongT  NumberOfRecords;
          ULongT  NumberOfWords;
       } DictionaryCursorT;
typedef struct {
         size_t  N;
         RecordNumT RecordNumber;
         ULongT  DataOffset;
         ULongT  DataLength;
         ULongT  CurrentPos;
         BooleanT  Done;
      } OnixDataCursorT;

If you are working with a language other than C or C++, you will want to use your language equivalent of a structure.  If the language you are working with does not have structures or their equivalent, you can mimic one by treating a block of memory of the same size and filling in the values at the appropriate byte offset within the block.

Generic Types

The following types are defined by Onix.  However, they are to your compiler equivalent.  This can be dangerous as it is possible if you are not careful to get variables of "different" types mixed up and the compiler will not catch it.  So, be careful when naming variables of these types so that they don't get mixed up by accident and cause Onix to crash.  These types are as follows:

typedef void * OnixIndexManagerT;
typedef void * OnixIndexingEngineT;
typedef void * OnixQueryVectorT;
typedef void * OnixResultVectorT;
typedef void * OnixTermCountVectorT;
typedef void * HighlightMatcherT;
typedef void * RobotsTxtParserT;


See Also