ixLongQueryFormToShortQueryForm -- Converts one type of query to a normalized form.
void ixLongQueryFormToShortQueryForm(UCharT *Query, size_t Proximity)
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.
Nothing
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.)