当我使用代码中声明的为变量 $Start 设置的不同值执行以下代码时,每次获取的总计数值不断变化 -
import module namespace search = "http://marklogic.com/appservices/search" at "/MarkLogic/appservices/search/search.xqy";
let $SearchWord := 'AB:"nuclear power plant" OR AB:"nuclear power station"'
let $SearchOption :=
<options xmlns="http://marklogic.com/appservices/search">
<constraint name="AB">
<word>
<element ns="" name="ti"/>
<term-option>case-insensitive</term-option>
<term-option>diacritic-insensitive</term-option>
<term-option>punctuation-insensitive</term-option>
<term-option>whitespace-insensitive</term-option>
</word>
</constraint>
</options>
let $Start := 1
let $pageLength := 10
let $SearchResponse := search:search($SearchWord, $SearchOption, $Start, $pageLength)
return $SearchResponse