Loading TOC...

MarkLogic 10 Product Documentation
search:check-options

search:check-options(
   $options as element(search:options),
   [$strict as xs:boolean?]
) as element(search:report)*

Summary

This function verifies that options XML is properly structured. Used in debugging, normally not in production. Returns the empty sequence on success, otherwise it returns one or more error messages inside <report> elements.

Parameters
options Options that define the search grammar and control the search. See the description for $options for the function search:search.
strict If true, index settings are additionally verified. The default is false.

Example

xquery version "1.0-ml";
import module namespace search = "http://marklogic.com/appservices/search"
    at "/MarkLogic/appservices/search/search.xqy";

search:check-options(
    <options xmlns="http://marklogic.com/appservices/search">
      <grammar>
        <joiner strength="10" apply="infix"
                element="cts:or-query">|</joiner>
        <joiner strength="20" apply="infix"
                element="cts:and-query">&amp;</joiner>
      </grammar>
    </options>)
=>
()

      

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.