I've inherited code that was ported from ML7 to ML9 last year and the facet pane of a search page does not display a facet clear control like it did in the legacy system. The XQuery logic to build the control depends on the result of search:parse()
containing a @qtextpre
attribute. In the older system, the parsed query is:
<cts:element-range-query qtextpre="Status:" qtextref="cts:annotation" operator="=" xmlns:cts="http://marklogic.com/cts" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<cts:element xmlns:_1="http://www.marklogic.com/ps/ns/qanda/">_1:Status</cts:element>
<cts:annotation qtextref="following-sibling::cts:value"></cts:annotation>
<cts:value xsi:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Review</cts:value>
<cts:option>collation=http://marklogic.com/collation/codepoint</cts:option>
</cts:element-range-query>
But in the new system the same query text with the same options parses to:
<cts:element-range-query operator="=" xmlns:cts="http://marklogic.com/cts">
<cts:element xmlns:_1="http://www.marklogic.com/ps/ns/qanda/">_1:Status</cts:element>
<cts:value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Review</cts:value>
<cts:option>collation=http://marklogic.com/collation/codepoint</cts:option>
</cts:element-range-query>
I'm not real clear on what that attribute is for, but this application code depends on finding the @qtextpre
attribute in the query to decide whether to display the facet clear control in the facet pane. Can anyone explain why it's not there in the ML9 version of the parsed query?