[Mayan EDMS: 2654] Index by document type

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2654] Index by document type

Valen
Hi!

I seem to have understand the concept of indices and it is great!

I would like to build a simple 1 level index (for now) with the document type as first level. I have not managed to access the type, how do I do that? Is it at all possible?

Also: I have not found this in the docs, are the indices build regularly or only manually? If the latter, can I then make a cron-job using the API?

Thanks and have a great day!

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2655] Re: Index by document type

rosarior
Administrator
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.




On Sunday, August 19, 2018 at 3:45:48 AM UTC-4, Valen wrote:
Hi!

I seem to have understand the concept of indices and it is great!

I would like to build a simple 1 level index (for now) with the document type as first level. I have not managed to access the type, how do I do that? Is it at all possible?

Also: I have not found this in the docs, are the indices build regularly or only manually? If the latter, can I then make a cron-job using the API?

Thanks and have a great day!

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

Screenshot from 2018-08-19 23-40-44.png (10K) Download Attachment
Screenshot from 2018-08-19 23-41-09.png (83K) Download Attachment
Screenshot from 2018-08-19 23-41-31.png (18K) Download Attachment
Screenshot from 2018-08-19 23-41-48.png (8K) Download Attachment
Screenshot from 2018-08-19 23-42-07.png (25K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2665] Re: Index by document type

Valen
Hi!

Thank you very much! Works as advertised.

Yes indexing is a killer feature! I managed to make an index "original date" in conjunction with the document analyzer regexing the date out of the documents. Works very well. I can make a recipe for that in the wiki too, if you like.

The main issue I have is the state of the documentation in this case, I had no idea that I could access the document type that way. Is there already an overview of how to access the data associated with an document with templating? I get metadata and analyzer data, but what about the built in stuff like document type (answered here), langauge, filename etc. An overview for that would be nice.

Thank you very much and have a great day!

On Monday, August 20, 2018 at 6:02:33 AM UTC+2, Roberto Rosario wrote:
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 (<a href="http://wiki.mayan-edms.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwiki.mayan-edms.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFN1fZa0z8NZnKChFtRfmhQFMgmJA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwiki.mayan-edms.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFN1fZa0z8NZnKChFtRfmhQFMgmJA&#39;;return true;">wiki.mayan-edms.com) so users can add their own indexes for specific use cases.




On Sunday, August 19, 2018 at 3:45:48 AM UTC-4, Valen wrote:
Hi!

I seem to have understand the concept of indices and it is great!

I would like to build a simple 1 level index (for now) with the document type as first level. I have not managed to access the type, how do I do that? Is it at all possible?

Also: I have not found this in the docs, are the indices build regularly or only manually? If the latter, can I then make a cron-job using the API?

Thanks and have a great day!

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2668] Re: Index by document type

Valen
In reply to this post by rosarior
BTW I found a bug (maybe?): If I make a more complex index defenition, it will become a multiline configuration. When I mount that with the fuse (the other killer feature!), the folder names are all wacky because of the newlines not stripped away like in the web UI....

On Monday, August 20, 2018 at 6:02:33 AM UTC+2, Roberto Rosario wrote:
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 (<a href="http://wiki.mayan-edms.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwiki.mayan-edms.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFN1fZa0z8NZnKChFtRfmhQFMgmJA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwiki.mayan-edms.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFN1fZa0z8NZnKChFtRfmhQFMgmJA&#39;;return true;">wiki.mayan-edms.com) so users can add their own indexes for specific use cases.




On Sunday, August 19, 2018 at 3:45:48 AM UTC-4, Valen wrote:
Hi!

I seem to have understand the concept of indices and it is great!

I would like to build a simple 1 level index (for now) with the document type as first level. I have not managed to access the type, how do I do that? Is it at all possible?

Also: I have not found this in the docs, are the indices build regularly or only manually? If the latter, can I then make a cron-job using the API?

Thanks and have a great day!

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.