Can not index document with ocr content

I have to config some indexes with my OCR content. But I can not configure my template index with dijango condition. This following image is my index configuration. I also choose to use with all of document types. Please help.

The index levels are not different conditions but actual folder levels. If you have a single level (invoice) all template conditions must be done in the same level as follows:

{% if 'invoice' in document.ocr_content|join:""|lower or 'invoice' in document.content|join:""|lower %}Invoice{% endif %}

Your template conditions would not have worked either because you were comparing the uppercase “INVOICE” to the lower case OCR text which would never match.

This template condition will place a reference to documents that have the word ‘invoice’ either in the OCR or the extracted document file text.

Always test and debug your templates in the sandbox before starting to work on the indexes, this will save you a lot of time.


So I think I need to learn about dijango template first to setup right condition. Thank you for help

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.