refactoring
diff --git a/src/main/resources/db/mysql/V1.3__triggers.sql b/src/main/resources/db/mysql/V1.3__triggers.sql
new file mode 100644
index 0000000..687a10a
--- /dev/null
+++ b/src/main/resources/db/mysql/V1.3__triggers.sql
@@ -0,0 +1,15 @@
+-- indices
+DELIMITER $$
+create trigger delete_policy after delete on resource_store
+for each row begin
+    delete from policy_store where target_id=OLD.id;
+end; $$
+
+CREATE TRIGGER tree_entry_insert AFTER INSERT ON resource_store FOR EACH ROW BEGIN
+	INSERT INTO resource_tree (parent_id, child_id, depth, name_path)
+	VALUES (NEW.id, NEW.id, 0, NEW.name);
+	INSERT INTO resource_tree (parent_id, child_id, depth, name_path)
+	SELECT parent_id, NEW.id, depth + 1, concat(name_path,"/",NEW.name) FROM resource_tree WHERE child_id = NEW.parent_id;
+END; $$
+
+DELIMITER ;
\ No newline at end of file
diff --git a/src/main/resources/db/mysql/V1.4__indices.sql b/src/main/resources/db/mysql/V1.4__indices.sql
new file mode 100644
index 0000000..32a0211
--- /dev/null
+++ b/src/main/resources/db/mysql/V1.4__indices.sql
@@ -0,0 +1,5 @@
+-- todo: are this automatically adapted when refactoring?
+CREATE INDEX group_index ON group_users(user_id, group_id);
+CREATE INDEX policy_index ON group_ref(policy_id);
+CREATE UNIQUE INDEX resource_tree_index ON resource_tree (parent_id, depth, child_id);
+CREATE UNIQUE INDEX param_unique ON param_store (p_key, p_value);
diff --git a/src/main/resources/index-goe-lucene5/_0.cfe b/src/main/resources/index-goe-lucene5/_0.cfe
new file mode 100644
index 0000000..72246bc
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_0.cfe
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_0.cfs b/src/main/resources/index-goe-lucene5/_0.cfs
new file mode 100644
index 0000000..d15185a
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_0.cfs
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_0.si b/src/main/resources/index-goe-lucene5/_0.si
new file mode 100644
index 0000000..d66ea34
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_0.si
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_1.cfe b/src/main/resources/index-goe-lucene5/_1.cfe
new file mode 100644
index 0000000..221e372
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_1.cfe
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_1.cfs b/src/main/resources/index-goe-lucene5/_1.cfs
new file mode 100644
index 0000000..6b998a4
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_1.cfs
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_1.si b/src/main/resources/index-goe-lucene5/_1.si
new file mode 100644
index 0000000..18b647a
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_1.si
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_2.cfe b/src/main/resources/index-goe-lucene5/_2.cfe
new file mode 100644
index 0000000..0b8386b
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_2.cfe
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_2.cfs b/src/main/resources/index-goe-lucene5/_2.cfs
new file mode 100644
index 0000000..f9828fd
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_2.cfs
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_2.si b/src/main/resources/index-goe-lucene5/_2.si
new file mode 100644
index 0000000..ddcd167
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_2.si
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_3.cfe b/src/main/resources/index-goe-lucene5/_3.cfe
new file mode 100644
index 0000000..2eaa97b
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_3.cfe
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_3.cfs b/src/main/resources/index-goe-lucene5/_3.cfs
new file mode 100644
index 0000000..f2ec38e
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_3.cfs
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_3.si b/src/main/resources/index-goe-lucene5/_3.si
new file mode 100644
index 0000000..c1fbcdf
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_3.si
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_4.cfe b/src/main/resources/index-goe-lucene5/_4.cfe
new file mode 100644
index 0000000..34cda7d
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_4.cfe
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_4.cfs b/src/main/resources/index-goe-lucene5/_4.cfs
new file mode 100644
index 0000000..224beae
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_4.cfs
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/_4.si b/src/main/resources/index-goe-lucene5/_4.si
new file mode 100644
index 0000000..84a3366
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/_4.si
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/segments_1 b/src/main/resources/index-goe-lucene5/segments_1
new file mode 100644
index 0000000..1cb809a
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/segments_1
Binary files differ
diff --git a/src/main/resources/index-goe-lucene5/write.lock b/src/main/resources/index-goe-lucene5/write.lock
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/main/resources/index-goe-lucene5/write.lock
diff --git a/src/main/resources/index-kustvakt-example.zip b/src/main/resources/index-kustvakt-example.zip
new file mode 100644
index 0000000..33c4b5c
--- /dev/null
+++ b/src/main/resources/index-kustvakt-example.zip
Binary files differ
diff --git a/src/main/resources/kustvakt.info b/src/main/resources/kustvakt.info
new file mode 100644
index 0000000..32b65d1
--- /dev/null
+++ b/src/main/resources/kustvakt.info
@@ -0,0 +1,2 @@
+kustvakt.version=${project.version}
+kustvakt.name=${project.name}