OdooWiki OCA HUB

Attachment Unindex Content

attachment_unindex_content folder_open OCA/server-tools open_in_new
Tools License: AGPL-3

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 filestore directory, 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:

[](https://user-images.githubusercontent.com/442938/67894113-45d27a80-fb2e-11e9-9a22-ba43d8b444c5.png)

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.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Stops Odoo from storing the text content of attachments in the database, saving space and avoiding duplicate data. Existing stored content is cleared when the module is installed.

This module turns off the automatic indexing of attachment content. Normally, when a file is uploaded, Odoo reads its text and saves it in the database so the file can be searched by its content. With this module installed, that step no longer happens.

What changes for users:

  • New attachments are no longer indexed: their text content is not written into the database.
  • When the module is installed, the content already stored for existing attachments is erased in one go.
  • Searching attachments by their inner text will no longer find results, because that text is not kept.

Behind the scenes, the module touches the attachment model (ir.attachment). It disables the indexing routine and, when something still asks for the stored content (for example, reading a colour from a CSS file), it reads the value directly from the file on the fly without saving it. Nothing is written back to the database.

There are no new menus, screens, buttons or reports. The module works silently in the background and depends on the standard attachment indexing module. Its main benefits are less duplicated data (the file stays in the file store, not copied into the database) and faster uploads, since files no longer need to be processed to extract text.

Depends on

attachment_indexation

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 7 confirmed, 2 with no information of 9 versions.

Sources · Odoo 15.0

Confirmed on 2026-11-03 in branch 15.0 of OCA/server-tools.

terminal Installation and usage

No verified information

Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.