diff --git a/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml b/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml
new file mode 100644
index 0000000000..6ba802840d
--- /dev/null
+++ b/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml
@@ -0,0 +1,409 @@
+
+
+
+
+ Record-status
+
+
+ Encoding-level
+
+
+
+
+ Local-Number
+
+
+
+
+ Kind-of-record
+
+
+ Descriptive-cataloging-rules
+
+
+ Subject-heading-thesaurus
+
+
+ Heading-use-main-or-added-entry
+
+
+ Heading-use-subject-added-entry
+
+
+ Heading-use-series-added-entry
+
+
+
+
+ Personal-name:w
+ Personal-name:p
+ Personal-name:s
+
+
+ Personal-name-heading:w
+ Personal-name-heading:p
+ Personal-name-heading:s
+ Heading:w
+ Heading:p
+ Heading:s
+
+
+
+ Personal-name-see-from:w
+ Personal-name-see-from:p
+ Personal-name-see-from:s
+ See-from:w
+ See-from:p
+ See-from:s
+
+
+
+ Personal-name-see-also-from:w
+ Personal-name-see-also-from:p
+ Personal-name-see-also-from:s
+ See-also-from:w
+ See-also-from:p
+ See-also-from:s
+
+
+
+
+ Corporate-name:w
+ Corporate-name:p
+
+
+ Corporate-name-heading:w
+ Corporate-name-heading:p
+ Corporate-name-heading:s
+ Heading:w
+ Heading:p
+ Heading:s
+
+
+
+ Corporate-name-see-from:w
+ Corporate-name-see-from:p
+ Corporate-name-see-from:s
+ See-from:w
+ See-from:p
+ See-from:s
+
+
+
+ Corporate-name-see-also-from:w
+ Corporate-name-see-also-from:p
+ Corporate-name-see-also-from:s
+ See-also-from:w
+ See-also-from:p
+ See-also-from:s
+
+
+
+
+ Meeting-name:w
+ Meeting-name:p
+
+
+ Meeting-name-heading:w
+ Meeting-name-heading:p
+ Meeting-name-heading:s
+ Heading:w
+ Heading:p
+ Heading:s
+
+
+
+ Meeting-name-see-from:w
+ Meeting-name-see-from:p
+ Meeting-name-see-from:s
+ See-from:w
+ See-from:p
+ See-from:s
+
+
+
+ Meeting-name-see-also-from:w
+ Meeting-name-see-also-from:p
+ Meeting-name-see-also-from:s
+ See-also-from:w
+ See-also-from:p
+ See-also-from:s
+
+
+
+
+ Title-uniform:w
+ Title-uniform:p
+
+
+ Title-uniform-heading:w
+ Title-uniform-heading:p
+ Title-uniform-heading:s
+ Heading:w
+ Heading:p
+ Heading:s
+
+
+
+ Title-uniform-see-from:w
+ Title-uniform-see-from:p
+ Title-uniform-see-from:s
+ See-from:w
+ See-from:p
+ See-from:s
+
+
+
+ Title-uniform-see-also-from:w
+ Title-uniform-see-also-from:p
+ Title-uniform-see-also-from:s
+ See-also-from:w
+ See-also-from:p
+ See-also-from:s
+
+
+
+
+ Chronological-term:w
+ Chronological-term:p
+
+
+ Chronological-term-heading:w
+ Chronological-term-heading:p
+ Chronological-term-heading:s
+ Heading:w
+ Heading:p
+ Heading:s
+
+
+
+ Chronological-term-see-from:w
+ Chronological-term-see-from:p
+ Chronological-term-see-from:s
+ See-from:w
+ See-from:p
+ See-from:s
+
+
+
+ Chronological-term-see-also-from:w
+ Chronological-term-see-also-from:p
+ Chronological-term-see-also-from:s
+ See-also-from:w
+ See-also-from:p
+ See-also-from:s
+
+
+
+
+
+ Subject-topical:w
+ Subject-topical:p
+
+
+ Subject-topical-heading:w
+ Subject-topical-heading:p
+ Subject-topical-heading:s
+ Heading:w
+ Heading:p
+ Heading:s
+
+
+
+ Subject-topical-see-from:w
+ Subject-topical-see-from:p
+ Subject-topical-see-from:s
+ See-from:w
+ See-from:p
+ See-from:s
+
+
+
+ Subject-topical-see-also-from:w
+ Subject-topical-see-also-from:p
+ Subject-topical-see-also-from:s
+ See-also-from:w
+ See-also-from:p
+ See-also-from:s
+
+
+
+
+ Name-geographic:w
+ Name-geographic:p
+
+
+ Name-geographic-heading:w
+ Name-geographic-heading:p
+ Name-geographic-heading:s
+ Heading:w
+ Heading:p
+ Heading:s
+
+
+
+ Name-geographic-see-from:w
+ Name-geographic-see-from:p
+ Name-geographic-see-from:s
+ See-from:w
+ See-from:p
+ See-from:s
+
+
+
+ Name-geographic-see-also-from:w
+ Name-geographic-see-also-from:p
+ Name-geographic-see-also-from:s
+ See-also-from:w
+ See-also-from:p
+ See-also-from:s
+
+
+
+
+ Term-genre-form:w
+ Term-genre-form:p
+
+
+ Term-genre-form-heading:w
+ Term-genre-form-heading:p
+ Term-genre-form-heading:s
+ Heading:w
+ Heading:p
+ Heading:s
+
+
+
+ Term-genre-form-see-from:w
+ Term-genre-form-see-from:p
+ Term-genre-form-see-from:s
+ See-from:w
+ See-from:p
+ See-from:s
+
+
+
+ Term-genre-form-see-also-from:w
+ Term-genre-form-see-also-from:p
+ Term-genre-form-see-also-from:s
+ See-also-from:w
+ See-also-from:p
+ See-also-from:s
+
+
+
+
+ General-subdivision:w
+ General-subdivision:p
+ General-subdivision:s
+ Subdivision:w
+ Subdivision:p
+ Subdivision:s
+
+
+
+ General-subdivision-see-from:w
+ General-subdivision-see-from:p
+ General-subdivision-see-from:s
+ Subdivision-see-from:w
+ Subdivision-see-from:p
+ Subdivision-see-from:s
+
+
+
+ General-subdivision-see-also-from:w
+ General-subdivision-see-also-from:p
+ General-subdivision-see-also-from:s
+ Subdivision-see-also-from:w
+ Subdivision-see-also-from:p
+ Subdivision-see-also-from:s
+
+
+
+
+ Geographic-subdivision:w
+ Geographic-subdivision:p
+ Geographic-subdivision:s
+ Subdivision:w
+ Subdivision:p
+ Subdivision:s
+
+
+
+ Geographic-subdivision-see-from:w
+ Geographic-subdivision-see-from:p
+ Geographic-subdivision-see-from:s
+ Subdivision-see-from:w
+ Subdivision-see-from:p
+ Subdivision-see-from:s
+
+
+
+ Geographic-subdivision-see-also-from:w
+ Geographic-subdivision-see-also-from:p
+ Geographic-subdivision-see-also-from:s
+ Subdivision-see-also-from:w
+ Subdivision-see-also-from:p
+ Subdivision-see-also-from:s
+
+
+
+
+ Chronological-subdivision:w
+ Chronological-subdivision:p
+ Chronological-subdivision:s
+ Subdivision:w
+ Subdivision:p
+ Subdivision:s
+
+
+
+ Chronological-subdivision-see-from:w
+ Chronological-subdivision-see-from:p
+ Chronological-subdivision-see-from:s
+ Subdivision-see-from:w
+ Subdivision-see-from:p
+ Subdivision-see-from:s
+
+
+
+ Chronological-subdivision-see-also-from:w
+ Chronological-subdivision-see-also-from:p
+ Chronological-subdivision-see-also-from:s
+ Subdivision-see-also-from:w
+ Subdivision-see-also-from:p
+ Subdivision-see-also-from:s
+
+
+
+
+ Form-subdivision:w
+ Form-subdivision:p
+ Form-subdivision:s
+ Subdivision:w
+ Subdivision:p
+ Subdivision:s
+
+
+
+ Form-subdivision-see-from:w
+ Form-subdivision-see-from:p
+ Form-subdivision-see-from:s
+ Subdivision-see-from:w
+ Subdivision-see-from:p
+ Subdivision-see-from:s
+
+
+
+ Form-subdivision-see-also-from:w
+ Form-subdivision-see-also-from:p
+ Form-subdivision-see-also-from:s
+ Subdivision-see-also-from:w
+ Subdivision-see-also-from:p
+ Subdivision-see-also-from:s
+
+
+
+ authtype
+
+
diff --git a/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xml b/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xml
new file mode 100644
index 0000000000..f1c4dc75eb
--- /dev/null
+++ b/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xml
@@ -0,0 +1,983 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lcsh
+
+
+ lcac
+
+
+ mesh
+
+
+ nal
+
+
+ cash
+
+
+ notapplicable
+
+
+ aat
+
+
+ sears
+
+
+ rvm
+
+
+
+
+
+
+
+ notdefined
+
+
+
+
+ notdefined
+
+
+
+
+
+
+
+
diff --git a/etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl b/etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl
new file mode 100644
index 0000000000..f1b16d28bc
--- /dev/null
+++ b/etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl
@@ -0,0 +1,281 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ marc:controlfield[@tag='
+
+ ']
+
+
+
+ substring(.,
+
+ ,
+
+ )
+
+
+
+ //marc:datafield[@tag='
+
+ ']/marc:subfield[@code='
+
+ ']
+
+
+
+ lcsh
+ lcac
+ mesh
+ nal
+ cash
+ notapplicable
+ aat
+ sears
+ rvm
+
+
+
+
+
+
+
+
+ notdefined
+
+
+ notdefined
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ substring(.,
+
+ ,
+
+ )
+
+
+
+
+
+
+
+
+
+ marc:controlfield[@tag='
+
+ ']
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ substring(.,
+
+ ,
+
+ )
+
+
+ .
+
+
+
+
+
+
+
+
+
+
+
+ marc:datafield[@tag='
+
+ ']
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ contains('
+
+ ', @code)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ marc:datafield[@tag='
+
+ ']
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ contains('
+
+ ', @code)
+
+
+
+
+
+
+ contains('
+
+ ', @code)
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+