Skip to Content

Contributors

elasticsearch configure indexing

Dear odoo community.

While trying to install and run shopinvader project, I got an error that elasticsearch is connected successfully but there is no any document.

I tried to make index by hand outside odoo and it succeeded.

I guess the issue is related to configuration index filed which is in Se Index Config model.

The default value for that field is {} but I am sure it must be changed.

Can someone tell me how to set the value for that field please?

by Mohamed Alkobrosly - 03:42 - 25 Sep 2024

Follow-Ups

  • Re: elasticsearch configure indexing
    I have now all the required modules installed successfully, but I guess I have to make some configurations after installing "shopinvader_v2_app_demo" module.

    I am not sure if it is related to fast api, as I see it is installed by the demo module.

    So I don't know what should be filled in the "Root Path" field, I need help please as I have taken a long journey to set up the dependencies.

    I still need the configurations complete without missing any of them.

    Thanks

    On Wed, Sep 25, 2024 at 6:37 PM Mignon, Laurent <notifications@odoo-community.org> wrote:
    If you are comfortable with k8s,  you can use the shopinvader-infra-demo16 repository (https://github.com/shopinvader/shopinvader-infra-demo16) to quickly get a running env with all the required dependencies.

    On Wed, Sep 25, 2024 at 5:22 PM mohamed alkobrosly <notifications@odoo-community.org> wrote:

    Thanks Mignon for helping me.

    In fact the channel connector repository was not pulled.

    I pulled it and installed sale_channel_search_engine_product module, then the json config index was correct and pushed to elasticsearch.

    I have to confirm that I linked a channel with search engine, also there is a default demo channel is connected with search engine.

    Despite all of this no any products or categories are fetched to search engine.

    there were many queued jobs are running successfully but none of them could fetch any products.

    I think there must be a link between channel and products but I don't know really.

    The main issue with OCA modules is that there is no description to guide me.

    may there there are some modules need to be installed to fetch the products or may be some other configuration.

    I am trying this with no templates yet, if it is necessary please tell me where to find nextjs template

    I tried to download the images but it didn't succeed

    thanks Mignon too


    On Wed, Sep 25, 2024, 09:33 Mignon, Laurent <notifications@odoo-community.org> wrote:
    Hi Mohamed,

    If you use the shopinvader demo app and the nuxtjs template the following index configuration should work for the product:
    {"settings": {"analysis": {"char_filter": {"replace": {"type": "mapping", "mappings": ["&=> and "]}}, "filter": {"word_delimiter": {"type": "word_delimiter", "split_on_numerics": false, "split_on_case_change": true, "generate_word_parts": true, "generate_number_parts": true, "catenate_all": true, "preserve_original": true, "catenate_numbers": true}}, "analyzer": {"default": {"type": "custom", "char_filter": ["html_strip", "replace"], "tokenizer": "whitespace", "filter": ["lowercase", "word_delimiter"]}}, "index": {"sort.field": ["main", "id"], "sort.order": ["desc", "asc"]}}}, "mappings": {"properties": {"categories": {"type": "nested", "properties": {"id": {"type": "integer"}, "level": {"type": "integer"}, "name": {"type": "keyword"}, "url_key": {"type": "keyword"}}}, "url_key": {"type": "keyword"}, "variant_attributes": {"properties": {"color": {"type": "text", "fielddata": true}}}, "main": {"type": "boolean"}, "id": {"type": "integer"}, "redirect_url_key": {"type": "keyword"}}}}

    For the category, you should set:
    {"settings": {"index": {"sort.field": ["id"], "sort.order": ["asc"]}}, "mappings": {"properties": {"url_key": {"type": "keyword"}, "redirect_url_key": {"type": "keyword"}, "id": {"type": "integer"}}}}


    In the demo app we use a specific addon to define the products to be exported to elasticsearch: 'sale_channel_search_engine_product'. Therefore on a channel, you must link the channel to a search engine. Once it's done, all the products linked to this sales channel will be exported to elasticsearch. 

    image.png
    image.png


    If you plan to come to the OCA days or Odoo XP I'll be happy to help you configure your env to get everything working.

    Regards,

    lmi

    On Wed, Sep 25, 2024 at 3:42 AM mohamed alkobrosly <notifications@odoo-community.org> wrote:
    Dear odoo community.

    While trying to install and run shopinvader project, I got an error that elasticsearch is connected successfully but there is no any document.

    I tried to make index by hand outside odoo and it succeeded.

    I guess the issue is related to configuration index filed which is in Se Index Config model.

    The default value for that field is {} but I am sure it must be changed.

    Can someone tell me how to set the value for that field please?

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Mohamed Alkobrosly - 01:26 - 29 Sep 2024
  • Re: elasticsearch configure indexing
    If you are comfortable with k8s,  you can use the shopinvader-infra-demo16 repository (https://github.com/shopinvader/shopinvader-infra-demo16) to quickly get a running env with all the required dependencies.

    On Wed, Sep 25, 2024 at 5:22 PM mohamed alkobrosly <notifications@odoo-community.org> wrote:

    Thanks Mignon for helping me.

    In fact the channel connector repository was not pulled.

    I pulled it and installed sale_channel_search_engine_product module, then the json config index was correct and pushed to elasticsearch.

    I have to confirm that I linked a channel with search engine, also there is a default demo channel is connected with search engine.

    Despite all of this no any products or categories are fetched to search engine.

    there were many queued jobs are running successfully but none of them could fetch any products.

    I think there must be a link between channel and products but I don't know really.

    The main issue with OCA modules is that there is no description to guide me.

    may there there are some modules need to be installed to fetch the products or may be some other configuration.

    I am trying this with no templates yet, if it is necessary please tell me where to find nextjs template

    I tried to download the images but it didn't succeed

    thanks Mignon too


    On Wed, Sep 25, 2024, 09:33 Mignon, Laurent <notifications@odoo-community.org> wrote:
    Hi Mohamed,

    If you use the shopinvader demo app and the nuxtjs template the following index configuration should work for the product:
    {"settings": {"analysis": {"char_filter": {"replace": {"type": "mapping", "mappings": ["&=> and "]}}, "filter": {"word_delimiter": {"type": "word_delimiter", "split_on_numerics": false, "split_on_case_change": true, "generate_word_parts": true, "generate_number_parts": true, "catenate_all": true, "preserve_original": true, "catenate_numbers": true}}, "analyzer": {"default": {"type": "custom", "char_filter": ["html_strip", "replace"], "tokenizer": "whitespace", "filter": ["lowercase", "word_delimiter"]}}, "index": {"sort.field": ["main", "id"], "sort.order": ["desc", "asc"]}}}, "mappings": {"properties": {"categories": {"type": "nested", "properties": {"id": {"type": "integer"}, "level": {"type": "integer"}, "name": {"type": "keyword"}, "url_key": {"type": "keyword"}}}, "url_key": {"type": "keyword"}, "variant_attributes": {"properties": {"color": {"type": "text", "fielddata": true}}}, "main": {"type": "boolean"}, "id": {"type": "integer"}, "redirect_url_key": {"type": "keyword"}}}}

    For the category, you should set:
    {"settings": {"index": {"sort.field": ["id"], "sort.order": ["asc"]}}, "mappings": {"properties": {"url_key": {"type": "keyword"}, "redirect_url_key": {"type": "keyword"}, "id": {"type": "integer"}}}}


    In the demo app we use a specific addon to define the products to be exported to elasticsearch: 'sale_channel_search_engine_product'. Therefore on a channel, you must link the channel to a search engine. Once it's done, all the products linked to this sales channel will be exported to elasticsearch. 

    image.png
    image.png


    If you plan to come to the OCA days or Odoo XP I'll be happy to help you configure your env to get everything working.

    Regards,

    lmi

    On Wed, Sep 25, 2024 at 3:42 AM mohamed alkobrosly <notifications@odoo-community.org> wrote:
    Dear odoo community.

    While trying to install and run shopinvader project, I got an error that elasticsearch is connected successfully but there is no any document.

    I tried to make index by hand outside odoo and it succeeded.

    I guess the issue is related to configuration index filed which is in Se Index Config model.

    The default value for that field is {} but I am sure it must be changed.

    Can someone tell me how to set the value for that field please?

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Laurent Mignon - 05:35 - 25 Sep 2024
  • Re: elasticsearch configure indexing

    Thanks Mignon for helping me.

    In fact the channel connector repository was not pulled.

    I pulled it and installed sale_channel_search_engine_product module, then the json config index was correct and pushed to elasticsearch.

    I have to confirm that I linked a channel with search engine, also there is a default demo channel is connected with search engine.

    Despite all of this no any products or categories are fetched to search engine.

    there were many queued jobs are running successfully but none of them could fetch any products.

    I think there must be a link between channel and products but I don't know really.

    The main issue with OCA modules is that there is no description to guide me.

    may there there are some modules need to be installed to fetch the products or may be some other configuration.

    I am trying this with no templates yet, if it is necessary please tell me where to find nextjs template

    I tried to download the images but it didn't succeed

    thanks Mignon too


    On Wed, Sep 25, 2024, 09:33 Mignon, Laurent <notifications@odoo-community.org> wrote:
    Hi Mohamed,

    If you use the shopinvader demo app and the nuxtjs template the following index configuration should work for the product:
    {"settings": {"analysis": {"char_filter": {"replace": {"type": "mapping", "mappings": ["&=> and "]}}, "filter": {"word_delimiter": {"type": "word_delimiter", "split_on_numerics": false, "split_on_case_change": true, "generate_word_parts": true, "generate_number_parts": true, "catenate_all": true, "preserve_original": true, "catenate_numbers": true}}, "analyzer": {"default": {"type": "custom", "char_filter": ["html_strip", "replace"], "tokenizer": "whitespace", "filter": ["lowercase", "word_delimiter"]}}, "index": {"sort.field": ["main", "id"], "sort.order": ["desc", "asc"]}}}, "mappings": {"properties": {"categories": {"type": "nested", "properties": {"id": {"type": "integer"}, "level": {"type": "integer"}, "name": {"type": "keyword"}, "url_key": {"type": "keyword"}}}, "url_key": {"type": "keyword"}, "variant_attributes": {"properties": {"color": {"type": "text", "fielddata": true}}}, "main": {"type": "boolean"}, "id": {"type": "integer"}, "redirect_url_key": {"type": "keyword"}}}}

    For the category, you should set:
    {"settings": {"index": {"sort.field": ["id"], "sort.order": ["asc"]}}, "mappings": {"properties": {"url_key": {"type": "keyword"}, "redirect_url_key": {"type": "keyword"}, "id": {"type": "integer"}}}}


    In the demo app we use a specific addon to define the products to be exported to elasticsearch: 'sale_channel_search_engine_product'. Therefore on a channel, you must link the channel to a search engine. Once it's done, all the products linked to this sales channel will be exported to elasticsearch. 

    image.png
    image.png


    If you plan to come to the OCA days or Odoo XP I'll be happy to help you configure your env to get everything working.

    Regards,

    lmi

    On Wed, Sep 25, 2024 at 3:42 AM mohamed alkobrosly <notifications@odoo-community.org> wrote:
    Dear odoo community.

    While trying to install and run shopinvader project, I got an error that elasticsearch is connected successfully but there is no any document.

    I tried to make index by hand outside odoo and it succeeded.

    I guess the issue is related to configuration index filed which is in Se Index Config model.

    The default value for that field is {} but I am sure it must be changed.

    Can someone tell me how to set the value for that field please?

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Mohamed Alkobrosly - 05:21 - 25 Sep 2024
  • Re: elasticsearch configure indexing
    Hi Mohamed,

    If you use the shopinvader demo app and the nuxtjs template the following index configuration should work for the product:
    {"settings": {"analysis": {"char_filter": {"replace": {"type": "mapping", "mappings": ["&=> and "]}}, "filter": {"word_delimiter": {"type": "word_delimiter", "split_on_numerics": false, "split_on_case_change": true, "generate_word_parts": true, "generate_number_parts": true, "catenate_all": true, "preserve_original": true, "catenate_numbers": true}}, "analyzer": {"default": {"type": "custom", "char_filter": ["html_strip", "replace"], "tokenizer": "whitespace", "filter": ["lowercase", "word_delimiter"]}}, "index": {"sort.field": ["main", "id"], "sort.order": ["desc", "asc"]}}}, "mappings": {"properties": {"categories": {"type": "nested", "properties": {"id": {"type": "integer"}, "level": {"type": "integer"}, "name": {"type": "keyword"}, "url_key": {"type": "keyword"}}}, "url_key": {"type": "keyword"}, "variant_attributes": {"properties": {"color": {"type": "text", "fielddata": true}}}, "main": {"type": "boolean"}, "id": {"type": "integer"}, "redirect_url_key": {"type": "keyword"}}}}

    For the category, you should set:
    {"settings": {"index": {"sort.field": ["id"], "sort.order": ["asc"]}}, "mappings": {"properties": {"url_key": {"type": "keyword"}, "redirect_url_key": {"type": "keyword"}, "id": {"type": "integer"}}}}


    In the demo app we use a specific addon to define the products to be exported to elasticsearch: 'sale_channel_search_engine_product'. Therefore on a channel, you must link the channel to a search engine. Once it's done, all the products linked to this sales channel will be exported to elasticsearch. 

    image.png
    image.png


    If you plan to come to the OCA days or Odoo XP I'll be happy to help you configure your env to get everything working.

    Regards,

    lmi

    On Wed, Sep 25, 2024 at 3:42 AM mohamed alkobrosly <notifications@odoo-community.org> wrote:
    Dear odoo community.

    While trying to install and run shopinvader project, I got an error that elasticsearch is connected successfully but there is no any document.

    I tried to make index by hand outside odoo and it succeeded.

    I guess the issue is related to configuration index filed which is in Se Index Config model.

    The default value for that field is {} but I am sure it must be changed.

    Can someone tell me how to set the value for that field please?

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Laurent Mignon - 08:30 - 25 Sep 2024