More work on the search/contents
After some serious brainstorming with others in the lab, it seems that it's going to be virtually impossible to parse a Google-style search string in XQuery. The best approach is probably going to be using a Java class, which can be called from inside XQuery, to parse out the components of the search string and return a block of XQuery clauses which can be appended to the query as appropriate. This will entail enabling and configuring XACML in order to protect the db against the running of arbitrary Java code.
Started writing the Java package in Eclipse; so far it can parse out each of the components of the search string successfully, and decide which type of components they are. Next I need to build the XQuery in the most efficient way (for instance, amalgamating all of the single-word must-contain components into one &= clause).