Hi All,
I'm trying to get the total number of results returned after executing a
query.
The below code is working fine, but returns only 10 results (default
page-length). But the total result count is 69.
(:All the import statements are provided :)
let $exportQuery :=
'{"query":{"and-query":{"queries":[{"range-constraint-query":{"constraint-name":"city","value":["Paris
01"]}}]}}}'
let $options := xdmp:http-get("http://localhost:6024/v1/config/query/all",
<options xmlns="xdmp:http">
<authentication method="digest">
<username>admin</username>
<password>admin</password>
</authentication>
<format xmlns="xdmp:document-get">xml</format>
</options>)//search:options
let $query := json:transform-from-json($exportQuery,$sut:json-config-query)
let $searchResults := search:resolve($query, $options)
return $searchResults
I was trying to use the "search:estimate" command to get the total count of
results. But when I execute the command
let $totalItems := search:estimate($query) (:$query being the same as
above code:)
it is throwing some exception.
How do I use search:parse on this $query, which is transformed from json?
I need the $totalItems to return 69.
Any help on this regard would be helpful.
Thanks,
Sini
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general