Jump to content
thirty bees forum

Setting up elasticsearch module


doclucas

Recommended Posts

Yeah, I agree with you about this and about the need for a cron or a hook/function to auto index new products upon or after submission, but unfortunately the only developer who worked on the module is currently absent. Hopefully one of the expert developers here can assist with that.

Link to comment
Share on other sites

@violinparts said in Setting up elasticsearch module:

I believe it will be annoying to many users. Something that needs to be fixed by TB quickly.

Doesn't show up though on Safari.

Here is a fix for the space %20 issue:

1) edit /modules/elasticsearch/views/templates/hook/vue/results.html.tpl

Find: {l s='Search:' mod='elasticsearch'} <strong>%% query %%</strong>

Change to: {l s='Search:' mod='elasticsearch'} <strong>%% decodeURI(query) %%</strong>

2) edit /modules/elasticsearch/views/templates/hook/vue/main-search.html.tpl

Find: :value="query"

Change to: :value="decodeURI(query)"

3) Clear cache in your BO (performance page).

Please note that you may need to implement these changes on the same files but in other folders if you use a supported theme other than the community theme. So, for example, if you use warehouse theme (which is supported), edit the same files in the warehouse theme folder of the module (eg. modules/elasticsearch/views/templates/themes/warehouse/hook/vue)

Hope this helps. :)

  • Like 1
Link to comment
Share on other sites

@doclucas said in Setting up elasticsearch module:

Thanks @violinparts @dosbiner I have installed Elasticsearch version: 5.6.10 and it now indexes fine in the BO. I think it's extremely important to write that it is only compatible with ES v5 and is not compatible with v6, both on the module download page and inside the module page itself (in the BO).

I believe the PS module was written to work with ES 5.4 (used by Cloudways) and ES 6.0 as those were the two commonly available versions at the time. At one point I had an ES 6.0 server set up for testing purposes and it worked okay. I don't have it running at the moment though so I can't test further. Maybe @lesley can comment on the expected compatibility?

Link to comment
Share on other sites

@violinparts said in Setting up elasticsearch module:

How to replace the word "manufacturer" with "brand" in elasticsearch filter? Didn't find in translations.

Future version Must never use the word "manufacturer." Manufacturers of one product line can be one, two, several or more. They can be in China, Poland, Vietnam, etc - anywhere in the world. It's impossible to know.

What matters is brand - again Brand. Who, where a product is manufactured, no one gives a shit.

This is a long running issue with Prestashop that has been inherited by thirty bees. There is nowhere to add "Brand" info for items but they have "Manufacturer" info. You can change the terms in the translation files. One PS discussion about this is here.

Link to comment
Share on other sites

I understand that, and I know how to change manufacturer to brand and manufacturers to brands in translations. And I have made such changes from the first time I began to use PS and TB.

However, I do not find manufacturer in Elasticsearch module translations.

The word "manufacturer" - in relation to Elasticsearch module - shows up when searching - in my site case rackmetro.com - using brand or brands.

Again, nowhere in Elasticsarch module translations can I find the field manufacturer where I can translate the word to brand.

Link to comment
Share on other sites

@dynambee said in Setting up elasticsearch module:

@doclucas said in Setting up elasticsearch module:

Thanks @violinparts @dosbiner I have installed Elasticsearch version: 5.6.10 and it now indexes fine in the BO. I think it's extremely important to write that it is only compatible with ES v5 and is not compatible with v6, both on the module download page and inside the module page itself (in the BO).

I believe the PS module was written to work with ES 5.4 (used by Cloudways) and ES 6.0 as those were the two commonly available versions at the time. At one point I had an ES 6.0 server set up for testing purposes and it worked okay. I don't have it running at the moment though so I can't test further. Maybe @lesley can comment on the expected compatibility?

ES v6 has implemented some changes in the way the client and server communicate that are not backward compatible, Is it possible you were actually running it on v5 and not v6? I have tried this on several NIX boxes and Windows boxes without success. Only ES v5 works, no matter what configuration I tried, but I would love to see a proof that it is working on v6 and the way to make it happen. :)

Link to comment
Share on other sites

@violinparts said in Setting up elasticsearch module:

One issue I find with the official module is that it does NOT provide cron for indexing. So, I find that I have to manually index every time after I listed products for the products to be included in search.

I just found out that the module already has a built-in cron option. All you need to do is just add the following cron job to the thirtybees cronjobs module: https://www.example.com/module/elasticsearch/cron?token=[YOURSITESECURITY_TOKEN] (replace example.com with your site's address and [YOURSITESECURITY_TOKEN] with your site's FO security token.

Tested and works perfectly fine.

alt text

When using the cronjobs module, I highly recommend that you implement the following fix until it gets re-released with it already implemented: https://forum.thirtybees.com/post/20351

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...