From f1d69768a894f562f002a67163da8a1199a96526 Mon Sep 17 00:00:00 2001 From: Magdalena Turska Date: Mon, 21 Jun 2021 14:51:50 +0200 Subject: [PATCH 1/5] new field-based index configuration --- collection.xconf | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/collection.xconf b/collection.xconf index 285a496..87612ef 100644 --- a/collection.xconf +++ b/collection.xconf @@ -2,12 +2,10 @@ - - - - - - + + + + From 4ff774ea93c5a2894d2b5c62ba9c258c78967728 Mon Sep 17 00:00:00 2001 From: Alexandra von Criegern Date: Mon, 21 Jun 2021 15:59:43 +0200 Subject: [PATCH 2/5] feat(index): Apply new field-based index configuration for "visits" --- .gitignore | 3 ++- collection.xconf | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cb03b90..3ac79a0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ build/* .existdb.json .DS_Store expath-pkg.xml -repo.xml \ No newline at end of file +repo.xml +.idea/* diff --git a/collection.xconf b/collection.xconf index 87612ef..5b3979b 100644 --- a/collection.xconf +++ b/collection.xconf @@ -6,6 +6,10 @@ + + + + @@ -16,5 +20,5 @@ - + From 4797ee22f17464fde14ec013e3155cb5b57dcdd8 Mon Sep 17 00:00:00 2001 From: Magdalena Turska Date: Mon, 5 Jul 2021 12:01:27 +0200 Subject: [PATCH 3/5] new index definitions: remove general collection.xconf and provide individual configurations for subcollections --- collection.xconf | 24 ------------------------ president-travels/collection.xconf | 27 +++++++++++++++++++++++++++ presidents/collection.xconf | 9 +++++++++ secretary-travels/collection.xconf | 26 ++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 24 deletions(-) delete mode 100644 collection.xconf create mode 100644 president-travels/collection.xconf create mode 100644 presidents/collection.xconf create mode 100644 secretary-travels/collection.xconf diff --git a/collection.xconf b/collection.xconf deleted file mode 100644 index 5b3979b..0000000 --- a/collection.xconf +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/president-travels/collection.xconf b/president-travels/collection.xconf new file mode 100644 index 0000000..19aead1 --- /dev/null +++ b/president-travels/collection.xconf @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/presidents/collection.xconf b/presidents/collection.xconf new file mode 100644 index 0000000..c7b402a --- /dev/null +++ b/presidents/collection.xconf @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/secretary-travels/collection.xconf b/secretary-travels/collection.xconf new file mode 100644 index 0000000..cd3e33e --- /dev/null +++ b/secretary-travels/collection.xconf @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 11a0bea48013a62cf6a180af9ebc8219fe115ec3 Mon Sep 17 00:00:00 2001 From: Magdalena Turska Date: Mon, 5 Jul 2021 12:02:42 +0200 Subject: [PATCH 4/5] minor adjustment --- secretary-travels/collection.xconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secretary-travels/collection.xconf b/secretary-travels/collection.xconf index cd3e33e..7f0f966 100644 --- a/secretary-travels/collection.xconf +++ b/secretary-travels/collection.xconf @@ -11,7 +11,7 @@ - + From 7479f7ec949115434a245642bb757e417c61614d Mon Sep 17 00:00:00 2001 From: Magdalena Turska Date: Mon, 5 Jul 2021 12:33:00 +0200 Subject: [PATCH 5/5] move index definitions and adjust pre-install --- pre-install.xql | 16 ++++++++++++++-- .../collection.xconf => president-travels.xconf | 0 presidents/collection.xconf => presidents.xconf | 0 .../collection.xconf => secretary-travels.xconf | 0 4 files changed, 14 insertions(+), 2 deletions(-) rename president-travels/collection.xconf => president-travels.xconf (100%) rename presidents/collection.xconf => presidents.xconf (100%) rename secretary-travels/collection.xconf => secretary-travels.xconf (100%) diff --git a/pre-install.xql b/pre-install.xql index 532a3ca..ae6fc72 100644 --- a/pre-install.xql +++ b/pre-install.xql @@ -27,6 +27,18 @@ declare function local:mkcol($collection, $path) { local:mkcol-recursive($collection, tokenize($path, "/")) }; -(: store the collection configuration :) +(: create the collection configuration collection :) local:mkcol("/db/system/config", $target), -xdb:store-files-from-pattern(concat("/system/config", $target), $dir, "*.xconf") \ No newline at end of file + +(: store the collection configurations :) +for $xconf in file:directory-list($dir, "*.xconf")/file:file/@name +let $data-dir := substring-before($xconf, ".xconf") +return + ( + local:mkcol-recursive(concat("/db/system/config/", $target), $data-dir), + xmldb:store-files-from-pattern( + concat("/db/system/config", $target, "/", $data-dir), + $dir, + $xconf + ) + ) diff --git a/president-travels/collection.xconf b/president-travels.xconf similarity index 100% rename from president-travels/collection.xconf rename to president-travels.xconf diff --git a/presidents/collection.xconf b/presidents.xconf similarity index 100% rename from presidents/collection.xconf rename to presidents.xconf diff --git a/secretary-travels/collection.xconf b/secretary-travels.xconf similarity index 100% rename from secretary-travels/collection.xconf rename to secretary-travels.xconf