Last active
November 27, 2020 08:14
-
-
Save claudius108/37aea79dd3c2f61f83ffd6748f264425 to your computer and use it in GitHub Desktop.
local:add-index-configuration-file()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare function local:add-index-configuration-file($collection-path as xs:string) { | |
let $index-collection-path := $system-config-collection-path || $collection-path | |
return ( | |
if (not(xmldb:collection-available($index-collection-path))) | |
then local:create-collections-recursively($system-config-collection-path, tokenize($collection-path, "/")) | |
else () | |
, | |
xmldb:store-files-from-pattern($index-collection-path, $dir, "modules/indexes" || $collection-path || "/*.xconf") | |
, | |
xmldb:reindex($collection-path) | |
) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment