From 7b0bd7bb57934505b84c4ea39cefeb89af07a4af Mon Sep 17 00:00:00 2001 From: Geert Josten Date: Tue, 13 May 2014 22:04:00 +0200 Subject: [PATCH] Partial fix for #161, use admin function to create index def instead of copying xml from ml-config --- deploy/lib/xquery/setup.xqy | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/deploy/lib/xquery/setup.xqy b/deploy/lib/xquery/setup.xqy index c09efc33..44db9e87 100644 --- a/deploy/lib/xquery/setup.xqy +++ b/deploy/lib/xquery/setup.xqy @@ -1423,7 +1423,16 @@ declare function setup:add-range-element-indexes-R( { if ($index-configs) then setup:add-range-element-indexes-R( - admin:database-add-range-element-index($admin-config, $database, $index-configs[1]), + admin:database-add-range-element-index($admin-config, $database, + admin:database-range-element-index( + $index-configs[1]/db:scalar-type, + $index-configs[1]/db:namespace-uri, + $index-configs[1]/db:localname, + $index-configs[1]/db:collation, + ($index-configs[1]/db:range-value-positions/xs:boolean(.), false())[1], + ($index-configs[1]/db:invalid-values, "reject")[1] + ) + ), $database, fn:subsequence($index-configs, 2)) else @@ -1473,7 +1482,18 @@ declare function setup:add-range-element-attribute-indexes-R( { if ($index-configs) then setup:add-range-element-attribute-indexes-R( - admin:database-add-range-element-attribute-index($admin-config, $database, $index-configs[1]), + admin:database-add-range-element-attribute-index($admin-config, $database, + admin:database-range-element-attribute-index( + $index-configs[1]/db:scalar-type, + $index-configs[1]/db:parent-namespace-uri, + $index-configs[1]/db:parent-localname, + $index-configs[1]/db:namespace-uri, + $index-configs[1]/db:localname, + $index-configs[1]/db:collation, + ($index-configs[1]/db:range-value-positions/xs:boolean(.), false())[1], + ($index-configs[1]/db:invalid-values, "reject")[1] + ) + ), $database, fn:subsequence($index-configs, 2)) else