one of the documented procedures in this installation of the ACS
ad_clean_query_for_intermedia   query_string
What it does:
Cleans up user input into a form suitable for feeding to interMedia. Tries to turn user input into a simple AND query.
Defined in: /web/philip/tcl/ad-intermedia-text.tcl

Source code:

    # Replace all ConText search operators with space. 
    regsub -all {[,&]+} $query_string { } query_string 

    # Replace all words that are ConText operators 
    regsub -all { (and|or) } $query_string { } query_string 

    # Separate all words with "&" to get an AND query. 
    return [join $query_string "&"]