Hello, that's great :) Indexes are the "killer" feature of Mayan. They allow automatic categorization of documents.
Once created, indexes are updated automatically when the document type, metadata or tags change. When you change the structure of an index by editing its template you need to trigger a rebuild using the "Rebuil Index" entry on the Tools menu. This is also needed if you create a new index and already have uploaded documents in the system.
For a document type index. These are the steps required:
1. Create a new index and name it "By document type" and add a similar entry for the name. The name is an identifier in case you want to reference this index in other parts of Mayan. That is why it is formatted like a variable name (no spaces, special characters).
2. Create a new child node template under the "Root" node.
3a. Use the following text for the template: {{ document.document_type }}
3b. Click on "Link documents". This is to put links to the corresponding documents of the document type being generated. Sometimes you want an index level with other sub index levels, in those cases you keep "Link documents".
4. Associate this index with the document type you want it to react to. Use the "Document types" button of the index.
5. Rebuild the index using the Tools menu.
There will by a new entry under the "Index" main menu. Every time a document is uploaded or modified a link will appear under the corresponding document type. If you create a new document type don't forget to associate it with the index.
When you become comforntable with index template you can create mult level indexes. For example: A top level for each document type and sub level for the value of a metadata field like "supplier" or "organization". All the properties of a document can be used as source for the index levels. The index template also support conditional statements for even more intricate index structures.
{% if document.metadata_value_of.invoice_number.0 == "A" %}Accounting
{% if document.metadata_value_of.invoice_number.0 == "H" %}Human Resources
{% endif %}
This creates an index level whose value changes based on the first character of the invoice number of the document for different departments.
I'll start an "Index recipes" page on the wiki (
wiki.mayan-edms.com) so users can add their own indexes for specific use cases.