fix search paging

This commit is contained in:
Oleg Belyaev 2025-03-23 14:25:15 +03:00
parent 6e7cf5a3f1
commit b89645a5cc
3 changed files with 21 additions and 10 deletions

View file

@ -3,8 +3,22 @@ declare namespace abv = "http://ossetic-studies.org/ns/abaevdict";
import module namespace abv-m = 'http://ossetic-studies.org/ns/abaevdict-mod' at './abv-mod.xqm';
let $doc := db:get('abaevdict_en','/xml/entry_az.xml')
return string(abv-m:make-html($doc, 'ru')/article[1]/@id)
for $a in [1,2,3]?*
return $a
(: let $doc-tr := $doc transform with {
replace node xquery:eval("/Q{http://www.tei-c.org/ns/1.0}entry[1]/Q{http://www.tei-c.org/ns/1.0}etym[1]/Q{http://www.tei-c.org/ns/1.0}mentioned[2]/Q{http://www.tei-c.org/ns/1.0}mentioned[18]", {'': .})
with <abv:mark>{xquery:eval("/Q{http://www.tei-c.org/ns/1.0}entry[1]/Q{http://www.tei-c.org/ns/1.0}etym[1]/Q{http://www.tei-c.org/ns/1.0}mentioned[2]/Q{http://www.tei-c.org/ns/1.0}mentioned[18]", {'': .})}</abv:mark>
}
return $doc :)
(: array{for $doc in collection('abaevdict_en/xml')
let $hits := for $node in $doc//text()
where $node contains text 'friend'
return path($node)
where count($hits) > 0
return {'entry_id': string($doc/tei:entry[1]/@xml:id), 'xpath': array{$hits}}} :)
(: let $nid := db:node-id($doc/tei:entry[1]/tei:note[1]) :)
(: return $nid :)
(: return xquery:eval('declare namespace tei = "http://www.tei-c.org/ns/1.0";//tei:note',{'': $doc}) :)
@ -15,8 +29,6 @@ return string(abv-m:make-html($doc, 'ru')/article[1]/@id)
(: import module namespace api = 'http://ossetic-studies.org/ns/abaevdict-api' at './restx_api.xq'; :)
(: abv-m:make-html(doc('abaevdict_en/xml/entry_az.xml')//tei:mentioned,'en') :)
(: abv-m:langname-by-id('inc-x-old-vaidika','en') :)
(: SERIALIZE AS JSONML :)