description |
---|
How to setup up fylr to use Optical Character Recognition (OCR) to write the human-readable contents of a pixel-based file into the index, thus making in searchable. |
{% hint style="warning" %} Large files / large amount of files may temporarily slow down your instance due to increased processing requirements.
Some OCR jobs may fail to produce correct output because of source quality (fonts, external artifacts, DPI).
Special characters, pages structures and editorial features (tables, headers, footnotes etc.) are not filtered and may produce nonsensical contents. {% endhint %}
By default, OCR is only applied to PDF files. This Tutorial will expand on adding other file types besides PDF.
- navigate to readme, into the file-worker
- Uncheck "Use Default Settings"
- Expand "CUSTOM METADATA"
- You will find the OCR Recipe configured to only write PDFs file contents to the index
- Add the extensions you want OCR applied to and written to the index
Example configuration of OCR to include JP(E)G, PNG, EPUBS
The recipe configuration offers more options, those are not necessarily required to run OCR on new files.
- Create a new record using the plus-icon
- As soon as you save, the OCR is beginning
- Locate the newly created record and open in detail view
fylr detail view of example record
- use the highlighted Info section to access the data available in index
- in the "advanced" tab, you will find the indexed contents of the image under "_fulltext"
Info section of a fylr record displaying the indexed OCR output
To leverage OCR in the fylr search, make sure include the textual contents of your files in the search result by enabling the checkbox inside the menu at the far right end of the searchbar.
Now you can find records by searching the human readable contents of files - just type in the search bar as usual.
OCR image-to-text will run when indexing a file. Consult regenerating-preview-images.md for a Tutorial on how to reindex one or more records.