The Main Manual Page Dynamic API Documentation CD-ROM API Documentation About Onix Types About Onix Errors Onix's Web Site at Lextek International Lextek International Onix Full Text Indexing and Retrieval Toolkit

ixLongQueryFormToShortQueryForm

NAME

     ixLongQueryFormToShortQueryForm -- Converts one type of query to a normalized form.

SYNOPSIS

     void ixLongQueryFormToShortQueryForm(UCharT *Query, size_t Proximity)

ARGUMENTS

Query  -- A query in the long query form as a NULL terminated string.

Proximity  --  How close two words must be to be considered "NEAR".  The maximum possible value is 99.

RETURNS

 Nothing

DESCRIPTION

ixLongQueryFormToShortQueryForm takes queries using "AND", "OR", "NOT", and "NEAR" and converts them to queries using &, |, !, and w/x (where x is a word proximity distance) respectively.  Some users like the ability to use AND, OR, NOT, and NEAR instead of what Onix uses internally (&, |, !, w/x).  This function is case sensitive replacing all of the "AND"s, "OR"s, "NOT"s and "NEAR"s in upper case with the shorter forms.  Please be aware however, that in this current version of the function, AND, OR, NOT, and NEAR can not in upper case should not be used inside quotes.

The query is passed in as a NULL terminated string and the output overwrites this string with a new NULL terminated (shorter) string.  The parameter Proximity is used to determine what is "NEAR".  So, for example, if Proximity is 10, NEAR would equate to "w/10".  An example query passed to ixLongQueryFormToShortQueryForm and its result with Proximity set to 10 is:

Input:  (bob AND mary) NEAR (john OR henry)

Output: (bob & mary) w/10 (john | henry)

The output of this function is suitable for processing by ixConvertQuery.  (Which you will need to do before ixProcessQuery.)

SEE ALSO

 ixConvertQuery, ixConvertQuery2ixProcessQuery