Repository
OCA/search-engine · module folder · Try on Runboat
Module version
1.1.0
Category
Generic Modules
Folder size
0.26 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/search-engine
Last tracking update
2026-08-07 08:43:07
Authors
Camptocamp, Akretion, ACSONE SA/NV, Odoo Community Association (OCA)
Maintainers
Camptocamp, Akretion, ACSONE SA/NV, Odoo Community Association (OCA)
Committers
Simone Orsi, GitHub, Laurent Mignon (ACSONE), Denis Roussel, Ivàn Todorovich, sbejaoui, Thomas Binsfeld, François Honoré, hparfr, Florian da Costa, Sébastien BEAU, clementmbr, David Beal, kobros-tech, Benjamin Willig, Weblate, Arnaud LAYEC, Florian Mounier, beau sebastien, OCA-git-bot, oca-travis, Mourad EL HADJ MIMOUNE, oca-ci, Quentin Groulard, Héctor Villarreal Ortega, Laurent-Corron, Benoît, chafique.delli
Odoo dependencies
OCA/queue:
OCA/server-env:
OCA/server-tools:
odoo/odoo:
- web
- bus
Python dependencies
typing-extensions, unidecode, requests
System dependencies
None
Required by
connector_algolia, connector_elasticsearch, connector_search_engine_serializer_ir_export, connector_typesense, sale_channel_search_engine, search_engine_image_thumbnail, search_engine_serializer_pydantic
Description
Base module for connecting Odoo with external search engines. This addon
is intended to be used as a base for other addons that implement
specific search engines. It's designed to be easily extensible and
modular.

Code Analysis

Views touched (12)
XML IDNameModelTypeStatus
se_backend_form_view se.backend form New
se_backend_tree_view se.backend.tree (in connector_search_engine) se.backend list New
se_binding_state_updater_form_view se.binding.state.updater.form (in connector_search_engine) se.binding.state.updater form New
se_binding_view_form se.binding form New
se_binding_view_search se.binding search New
se_binding_view_tree se.binding list New
se_index_config_form_view se.index.config.form (in connector_search_engine) se.index.config form New
se_index_config_tree_view se.index.config.tree (in connector_search_engine) se.index.config list New
se_index_form_view se.index.form se.index form New
se_index_kanban_view se.index kanban New
se_index_search_view se.index search New
se_index_tree_view se.index list New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (7)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (6)
  • backend_type Selection
    required=True selection=[] string='Type'
  • binding_count Integer
    compute='_compute_binding_count'
  • binding_ids One2many → se.binding
    args: 'se.binding', 'backend_id'
  • index_ids One2many → se.index
    args: 'se.index', 'backend_id'
  • index_prefix_name Char
    help='Prefix for technical indexes tech name. You could use this to change index names based on current env.'
  • name Char
    required=True
Public methods (3)
  • action_open_bindings(self)
  • action_test_connection(self)
  • get_adapter(self, index=None) -> SearchEngineAdapter
    Return an instance of the adapter for this backend

New fields (11)
  • backend_id Many2one → se.backend
    readonly=True related='index_id.backend_id' store=True string='Search Engine Backend' args: 'se.backend'
  • data Json
    prefetch=False readonly=True
  • data_display Text
    compute='_compute_data_display' help='Include this in debug mode to be able to inspect index data.'
  • date_recomputed Datetime
    readonly=True
  • date_synchronized Datetime
    readonly=True
  • error Text
  • index_id Many2one → se.index
    ondelete='cascade' readonly=True required=True string='Index' args: 'se.index'
  • record_id Reference
    compute='_compute_record_id' readonly=True selection=<expr>
  • res_id Integer
    help='ID of the target record in the database' readonly=True string='Record ID'
  • res_model Selection
    readonly=True selection=<expr>
  • state Selection
    default='to_recompute' readonly=True args: [('to_recompute', 'To recompute'), ('recomputing', 'Recomputing'), ('to_export', 'To export'), ('exporting', 'Exporting'), ('done', 'Done'), ('invalid_data', 'Invalid Data'), ('recompute_error', 'Fail to Recompute'), ('to_delete', 'To Delete'), ('deleting', 'Deleting')]
Public methods (10)
  • create(self, vals_list) -> Self
    @api.model_create_multi
    Create a binding and compute its JSON.
  • delete_record(self) -> str
  • export_record(self) -> str
  • get_export_data(self) -> <expr>
    Public method to retrieve export data.
  • jobify_recompute_json(self, force_export: bool=False)
    Create batch job for records to recompute the json.
  • recompute_from_owner(self)
  • recompute_json(self, force_export: bool=False)
    "Compute index record data as JSON.
  • record(self) -> models.Model
    @property
  • unlink(self)
  • write(self, vals) -> bool
    Write a binding and compute its JSON.

New fields (1)
  • state Selection
    required=True selection=<expr> string='New state'
Public methods (1)
  • doit(self)

New fields (15)
  • backend_id Many2one → se.backend
    ondelete='cascade' required=True string='Backend' args: 'se.backend'
  • batch_exporting_size Integer
    default=1000 help='Batch size for exporting element'
  • batch_recomputing_size Integer
    default=50 help='Batch size for recomputing element'
  • binding_ids One2many → se.binding
    args: 'se.binding', 'index_id', 'Binding'
  • color Integer
    compute='_compute_count_binding' string='Color Index'
  • config_id Many2one → se.index.config
    comodel_name='se.index.config' help='Index configuration record' string='Config'
  • count_all Integer
    compute='_compute_count_binding'
  • count_done Integer
    compute='_compute_count_binding'
  • count_error Integer
    compute='_compute_count_binding'
  • count_pending Integer
    compute='_compute_count_binding'
  • custom_tech_name Char
    help="Take control of index technical name. The final index name is still computed and contains in any case: backend index name prefix and language if given. If no custom name is provided, model's normalized name will be used."
  • lang_id Many2one → res.lang
    required=False string='Lang' args: 'res.lang'
  • model_id Many2one → ir.model
    domain=<expr> ondelete='cascade' required=True string='Model' args: 'ir.model'
  • name Char
    compute='_compute_name' store=True
  • serializer_type Selection
    args: []
Public methods (19)
  • action_open_bindings(self)
  • batch_recompute(self, force_export: bool=False) -> None
    Recompute all the bindings of the index marked as to_recompute.
  • batch_sync(self, force_export: bool=False) -> None
  • clear_index(self) -> None
  • delete_obsolete_item(self, item_ids: <expr>)
  • export_all_settings(self) -> None
    @api.model
  • export_settings(self) -> None
  • force_batch_sync(self) -> None
  • generate_batch_recompute_per_index(self, domain: <expr>=None) -> None
    @api.model
    Generate a job for each index to recompute. This method is usually called by a cron. It will generate a job for each index to recompute. The recompute process will recompute the bindings marked as to_recompute.
  • generate_batch_sync_per_index(self, domain: <expr>=None) -> None
    @api.model
    Generate a job for each index to sync. This method is usually called by a cron. It will generate a job for each index to sync. The sync will export the bindings marked as to_export. and will delete the bindings marked as to_delete.
  • json_validator(self) -> JsonValidator
    @property
  • model_serializer(self) -> ModelSerializer
    @property
  • recompute_all_binding(self, force_export: bool=False)
  • recompute_all_index(self, domain=None) -> None
    @api.model
  • recompute_and_export_all_binding(self) -> None
  • reindex(self) -> None
    Reindex records according.
  • resynchronize_all_bindings(self)
    Force sync between Odoo records and index records. This method will iter on all item in the index of the search engine if the corresponding binding do not exist on odoo it will create a job that delete all this obsolete items. You should not use this method for day to day job, it's only an helper for recovering your index after corruption. You can also drop index but this will introduce downtime, so it's better to force a resynchronization
  • se_adapter(self) -> SearchEngineAdapter
    @property
  • write(self, vals)

New fields (2)
  • body_str Text
    compute='_compute_body_str' default='{}' inverse='_inverse_body_str' tracking=True
  • name Char
    required=True
Public methods (0)

No public methods.

New fields (5)
  • count_se_binding_done Integer
    compute='_compute_count_binding'
  • count_se_binding_error Integer
    compute='_compute_count_binding'
  • count_se_binding_pending Integer
    compute='_compute_count_binding'
  • count_se_binding_total Integer
    compute='_compute_count_binding'
  • se_binding_ids One2many → se.binding
    comodel_name='se.binding' compute='_compute_binding_ids' compute_sudo=True string='Seacrh Engine Bindings'
Public methods (3)
  • open_se_binding(self)
  • unlink(self)
  • write(self, vals)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…