Attachment Unindex Content
attachment_unindex_content · OCA/server-tools
-
Security25/25No findings
-
Activity25/25Last human commit 2 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 8 Odoo series since 11.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE ir_attachment SET index_content=NULL WHERE index_content IS NOT NULL` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
This module disables the indexation of attachments content.
Attachment model has a field called 'index_content' where the content of the attachment is read and stored directly in the database. This field is useful in order to search content of a file. But most of cases it is not used, so, you can install this module in order to:
- Avoid Duplicating Data: Because indexation extracts text content
from files and put it on the database in order it could be searched,
but this implies you have the file data in your
filestoredirectory, and also part (or sometimes all) of that data in your database too. - Improve Performance: Since not all indexed files are plain text, they require extra process to read them.
Maybe you could try to uninstall modules like document in order to
disable its indexation features, but you could face the uninstallation
of other modules that could be useful for you (e.g, hr_recruitment
depends on that).
But even if you don't have document installed, you'd still have plain
text content indexation by default. As you can see in this SQL query
results, indexation is active even without it:
Using this module you will not require to uninstall any module to
disable the attachment content indexation, because we directly disable
it at ir.attachment base.
Also, after the installation, the index_content field on attachments
already recorded in database will be cleared.
Nothing is stored, but the field is still readable: when the database has
no content for an attachment, reading index_content indexes the file at
that moment and puts the result in the cache only. Code that reads the
field, as the website does to find a color in the CSS bundle, keeps working
with no copy of the content in the database. The cost is reading the file
of every attachment whose index_content is requested. Searching on the
field still finds nothing, because the column stays empty.
Dependencies
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 0
No views found for this module.
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 1
No new fields.
Public methods (0)No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
