Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions connector_typesense/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
===================
connector_typesense
===================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f09633c3af59b153f0eba3f876a9835676c430a6f39dd0dfa3545a924c80bc11
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsearch--engine-lightgray.png?logo=github
:target: https://github.com/OCA/search-engine/tree/16.0/connector_typesense
:alt: OCA/search-engine
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/search-engine-16-0/search-engine-16-0-connector_typesense
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/search-engine&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This addon provides the bases to implement addons to export information to
Typesense_ indexes.

.. _Typesense: https://typesense.org

**Table of contents**

.. contents::
:local:

Installation
============

This package requires a typesense search engine running.
Please read this for a [quick docker based setup](https://typesense.org/docs/guide/install-typesense.html#option-2-local-machine-self-hosting).

Configuration
=============

You have to configure (Host, Port, Protocol, Typesense API Key) in a new backend form view:

Search Engine > Configuration > Backends

Usage
=====

We recommend to use the typesense-dashboard for managing your typesense server.
I will allow you to configure the mapping of index with a nice UI.
Please take a look here: https://github.com/bfritscher/typesense-dashboard/releases

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/search-engine/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/search-engine/issues/new?body=module:%20connector_typesense%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Derico
* Kencove

Contributors
~~~~~~~~~~~~

* Maik Derstappen <md@derico.de>
* Mohamed Alkobrosli <malkobrosly@kencove.com>
* Sebastien BEAU <sebastien.beau@akretion.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/search-engine <https://github.com/OCA/search-engine/tree/16.0/connector_typesense>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions connector_typesense/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import tools
22 changes: 22 additions & 0 deletions connector_typesense/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2024 Derico
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "connector_typesense",
"category": "Connector",
"summary": "Connector For Typesense Search Engine",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Derico, Kencove, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/search-engine",
"maintainers": [],
"depends": ["connector_search_engine"],
"data": [
"views/ts_backend.xml",
],
"demo": [
"demo/backend_demo.xml",
],
"external_dependencies": {"python": ["typesense>=1.1.0", "requests"]},
"installable": True,
}
14 changes: 14 additions & 0 deletions connector_typesense/demo/backend_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2025 Kencove
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="backend_1" model="se.backend">
<field name="name">Demo Typesense Backend</field>
<field name="tech_name">demo_typesense_backend</field>
<field name="backend_type">typesense</field>
<field name="ts_server_host">typesense</field>
<field name="ts_server_port">8108</field>
<field name="ts_server_protocol">http</field>
<field name="ts_api_key">xyz</field>
</record>
</odoo>
1 change: 1 addition & 0 deletions connector_typesense/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import se_backend
43 changes: 43 additions & 0 deletions connector_typesense/models/se_backend.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright 2024 Derico
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models

from ..tools.adapter import TypesenseAdapter


class SeBackend(models.Model):
_inherit = "se.backend"

backend_type = fields.Selection(
selection_add=[("typesense", "Typesense")],
ondelete={"typesense": "cascade"},
string="Type",
required=True,
)
ts_server_host = fields.Char(
string="Typesense host",
groups="connector_search_engine.group_connector_search_engine_manager",
)
ts_server_port = fields.Char(
string="Typesense port",
groups="connector_search_engine.group_connector_search_engine_manager",
)
ts_server_protocol = fields.Char(
string="Typesense protocol",
groups="connector_search_engine.group_connector_search_engine_manager",
)
ts_server_timeout = fields.Integer(
string="Typesense server timeout",
groups="connector_search_engine.group_connector_search_engine_manager",
)
ts_api_key = fields.Char(
help="Typesense Api Key",
groups="connector_search_engine.group_connector_search_engine_manager",
)

def _get_adapter_class(self):
if self.backend_type == "typesense":
return TypesenseAdapter
else:
return super()._get_adapter_class()
3 changes: 3 additions & 0 deletions connector_typesense/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
You have to configure (Host, Port, Protocol, Typesense API Key) in a new backend form view:

Search Engine > Configuration > Backends
3 changes: 3 additions & 0 deletions connector_typesense/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Maik Derstappen <md@derico.de>
* Mohamed Alkobrosli <malkobrosly@kencove.com>
* Sebastien BEAU <sebastien.beau@akretion.com>
4 changes: 4 additions & 0 deletions connector_typesense/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This addon provides the bases to implement addons to export information to
Typesense_ indexes.

.. _Typesense: https://typesense.org
2 changes: 2 additions & 0 deletions connector_typesense/readme/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This package requires a typesense search engine running.
Please read this for a [quick docker based setup](https://typesense.org/docs/guide/install-typesense.html#option-2-local-machine-self-hosting).
3 changes: 3 additions & 0 deletions connector_typesense/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
We recommend to use the typesense-dashboard for managing your typesense server.
I will allow you to configure the mapping of index with a nice UI.
Please take a look here: https://github.com/bfritscher/typesense-dashboard/releases
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading