Start a new topic
Solved

Search in other fields in the searchanise search widget

 Hi all,

I'm developing a module to integrate Searchanise into the ecommerce module of Odoo.


I managed to get most of the basic stuff working: Storefronts registration, product synchronization, search widget and very basic search queries.

In doing so, I am also writing a general purpose Python Wrapper for the Searchanise APIs: https://github.com/LeartS/PSAW


I installed the standard searchanise instant search widget into the ecommerce, but the instant results seems to look for matches only in the title of the products, while I want it to look also in some of my custom fields (which I passed as text_search = 'Y' and weight=x as needed).

Is there a way I can make the search widget match also other fields in addition to the product title?

Hello!


Please let me check this case with the product development team and will update you at the earliest.


Thank you.

Dear Leonardo,

Our software architects informed me that additional fields should be passed in the following way:
<cs:attribute name="search_words" type="text" text_search="Y" weight="100"><![CDATA[some extra search data]]></cs:attribute>


For example:

<entry>
    <id>2</id>
    <title><![CDATA[test]]></title>
    <summary><![CDATA[test description]]></summary>
    <link href="test/2" />
    <cs:price>15</cs:price>
    <cs:quantity>20</cs:quantity>
    <cs:product_code><![CDATA[1234]]></cs:product_code>
    <cs:image_link></cs:image_link>
    <cs:attribute name="search_words" type="text" text_search="Y" weight="100"><![CDATA[some extra search data]]></cs:attribute>
    <cs:attribute name="extra" type="text" text_search="Y" weight="500"><![CDATA[some extra search data]]></cs:attribute>
</entry>

 

I hope this information will help you.


Thank you.

Thanks Mariya,
That is what I'm doing for synchronization, as documented in the API Docs.

My problem is different: once I have uploaded my products with all my custom attributes working correctly, using the format you provided, I want to use the Searchanise search widget to search in those custom attributes that are correctly indexed. At the moment it will display instant suggestions based only on the product title.

 

Dear Leonardo,

Please post a ticket using the Support form on your Searchanise settings page and provide us with your API key so we could examine the issue.

Thank you.
Login or Signup to post a comment