Skip to content

Commit

Permalink
array systématique pour les filtres (réouverture de #519)
Browse files Browse the repository at this point in the history
  • Loading branch information
emchateau committed Jul 18, 2020
1 parent 98c0b21 commit 5a0da60
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions models/tei.xqm
Expand Up @@ -823,9 +823,9 @@ declare function getSearch($queryParams as map(*)) as map(*) {
'text' : $queryParams?text,
'quantity' : getQuantity($results, 'résultat', 'résultats'),
'filters' : map{
'persons' : getDistinctMaps($results?indexes?persons, map{}),
'places' : getDistinctMaps($results?indexes?places, map{}),
'objects' : getDistinctMaps($results?indexes?objects, map{})
'persons' : array{ getDistinctMaps($results?indexes?persons, map{}) },
'places' : array{ getDistinctMaps($results?indexes?places, map{}) },
'objects' : array{ getDistinctMaps($results?indexes?objects, map{}) }
}
}
let $content := fn:subsequence($results, $queryParams?start, $queryParams?count)
Expand Down Expand Up @@ -1202,11 +1202,11 @@ declare function getIndexNominumItem($queryParams as map(*)) as map(*) {
'occupation' : $entry/tei:occupation/node(),
'note' : array{$entry/tei:note},
'autorities' : array{
for $idno in $entry/tei:idno
return map{
'autority' : $idno/@type,
'identifier' : $idno/node()}
},
for $idno in $entry/tei:idno
return map{
'autority' : $idno/@type,
'identifier' : $idno/node()}
},
'uuid' : fn:string($uuid),
'path' : '/indexNominum/',
'url' : $gdp.globals:root || '/indexNominum/' || $uuid,
Expand Down

0 comments on commit 5a0da60

Please sign in to comment.