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





void ixLongQueryFormToShortQueryForm( UCharT *Query, size_t Proximity )


Query: A string holding the query to be converted.

Proximity: A value to set all proximity operators to.



If an error occurred, Status will be set to the error number.


ixLongQueryToShortForm is a utility function designed to easily take the form of queries where operators like AND, OR and related operators are spelled out. It converts these queries into the form of queries that Onix expects.

The operators it coverts are AND, OR, NOT, and NEAR. Note that to be recognized these must appear in uppercase. NEAR is expected to not contain any values for the proximity. Instead the value passed to the function in the proximity argument is used.

Consider the following long query

   apple AND orange NEAR pear

If you call ixLongQueryToShortForm with a value of 3 for proximity this query will become

apple & orange w/3 pear

Note that the function takes only one string and converts the text within the string you pass it. It does not create a new copy of the query. If you need to retain the original query text it is up to you to make a copy. Note that this function also does not convert the query to hexadecimal form. You must still call ixConvertQuery prior to calling ixProcessQuery if your query terms are not in hexadecimal format.

See Also

ixProcessQuery, ixConvertQuery