Greetings,

I'm working on upgrading from ML 5 to ML 8 and am getting an error with a 
specific search due to multiple constraints being defined for the same element.

Specifically, we have the following defined in our search options (obviously 
more are defined, but these are the relevant ones):

<constraint name="author">
                                <word>
                                        <element ns="" name="meta-value"/>
                                        <term-option>wildcarded</term-option>
                                        
<term-option>case-insensitive</term-option>
                                        
<term-option>diacritic-insensitive</term-option>
                                </word>
</constraint>
<constraint name="author">
                                <range type="xs:string">
                                        <element ns="" name="meta-value"/>
                                        
<facet-option>frequency-order</facet-option>
                                        <facet-option>descending</facet-option>
                                        <facet-option>limit=100</facet-option>
                                </range>
</constraint>

The error I'm getting is:

[1.0-ml] XDMP-AS: (err:XPTY0004) ast:matched-constraint($query-elem, $options, 
$state) -- Invalid coercion: (<constraint name="author" 
xmlns="http://marklogic.com/appservices/search";><word><element ns="" 
name="meta-value"/><term-option>wildcarded<...</constraint>, <constraint 
name="author" xmlns="http://marklogic.com/appservices/search";><range 
type="xs:string" facet="true"><element ns="" name="meta-v...</constraint>) as 
element()?

Stack Trace
In /MarkLogic/appservices/search/ast.xqy on line 2195
In ast:matched-constraint(<search:word-constraint-query 
xmlns:search="http://marklogic.com/appservices/search";><search:constraint-name>author</search:constraint-name><search:t...</search:word-constraint-query>,
 <options 
xmlns="http://marklogic.com/appservices/search";><searchable-expression>fn:collection(&quot;content&quot;)</searc...</options>,
 map:map())

Is there a new way these should be handled in ML 8?

Thanks much,

-Chad


~~~~~~~~~~~
Chad Bishop
Lead Developer
Science Societies


_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to