Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][ADD] Connector typesense #168

Open
wants to merge 11 commits into
base: 16.0
Choose a base branch
from

Conversation

MrTango
Copy link
Contributor

@MrTango MrTango commented Nov 8, 2023

This is now fully working implementation of the Typesense backend.
Typesence is a free API compatible alternative to Algolia and easier to use than Elastic Search or Solr.

  • Functional implementation of Typesense backend
  • Add tests
  • Finish documentation

@sebastienbeau this needs the other two (#166 #167) PR's merged.

@MrTango MrTango marked this pull request as draft November 8, 2023 12:21
@MrTango MrTango force-pushed the connector_typesense branch 2 times, most recently from 0d1c09b to 315789c Compare November 8, 2023 12:39
@MrTango MrTango changed the title Connector typesense [16.0][ADD] Connector typesense Nov 8, 2023
@MrTango MrTango marked this pull request as ready for review January 9, 2024 11:05
@MrTango
Copy link
Contributor Author

MrTango commented Jan 9, 2024

@sebastienbeau @simahawk @lmignon i would be happy to here some feedback from you.
Also please check if the readme stuff is correct, as I'm not quite sure if i understand how this in build together.

Copy link
Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @MrTango for this contribution. I'd like to propose a first series of comments, but this seems to be going in the right direction. Great to have a new implementation for this new search engine which looks very interesting.

connector_typesense/models/ts_backend.py Outdated Show resolved Hide resolved
connector_typesense/models/ts_backend.py Outdated Show resolved Hide resolved
connector_typesense/models/ts_index.py Outdated Show resolved Hide resolved
connector_typesense/models/ts_backend.py Outdated Show resolved Hide resolved
connector_typesense/models/ts_index.py Outdated Show resolved Hide resolved
@@ -1,6 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
setup_requires=["setuptools-odoo"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be modified.

@@ -1,6 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
setup_requires=["setuptools-odoo"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be modified.

@@ -1,6 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
setup_requires=["setuptools-odoo"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be modified.

@@ -1,6 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
setup_requires=["setuptools-odoo"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be modified.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this came from the pre-commit command, is there something wrong in the config than?

@@ -1,6 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
setup_requires=["setuptools-odoo"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be modified.

@MrTango
Copy link
Contributor Author

MrTango commented Jan 9, 2024

thx @lmignon for your commends, I'll have a look at them.
One thing which is not clear to me is, how a can control the json data which is given to the connector.
I only see something like this there, no matter what product config i have:

{
    "id": 7,
    "name": "Office Design Software"
}

I would like to export more details of a product.
Any hints how to do that?
@simahawk @sebastienbeau

@lmignon
Copy link
Contributor

lmignon commented Jan 10, 2024

thx @lmignon for your commends, I'll have a look at them. One thing which is not clear to me is, how a can control the json data which is given to the connector. I only see something like this there, no matter what product config i have:

{
    "id": 7,
    "name": "Office Design Software"
}

I would like to export more details of a product. Any hints how to do that? @simahawk @sebastienbeau

The transformation to json is the responsibility of the serializer configured on your index. You can register your specific serializer. For example into the shoinvader project the shopinvader_search_engine addon defines specific serializer for products and categories based on pydantic schema. (https://github.com/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_search_engine). You can also uses a generic serializer provided by https://github.com/OCA/search-engine/tree/16.0/connector_search_engine_serializer_ir_export and using the ir.exports rules to serialize records to json.

@MrTango
Copy link
Contributor Author

MrTango commented Jan 13, 2024

thx for the tips, i found now also that it is using ir.export model and i can define the fields for the model there.

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 19, 2024
@MrTango
Copy link
Contributor Author

MrTango commented May 20, 2024

Sorry for the delay, i'll continue to work on this next month.

@lmignon lmignon added no stale Use this label to prevent the automated stale action from closing this PR/Issue. and removed stale PR/Issue without recent activity, it'll be soon closed automatically. labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no stale Use this label to prevent the automated stale action from closing this PR/Issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants