violinparts Posted August 21, 2018 Posted August 21, 2018 That's what I mean. I bet it shows up also on your site.
violinparts Posted August 21, 2018 Posted August 21, 2018 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.
doclucas Posted August 21, 2018 Author Posted August 21, 2018 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.
doclucas Posted August 21, 2018 Author Posted August 21, 2018 @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. :) 1
violinparts Posted August 21, 2018 Posted August 21, 2018 The issue - %20 - persists. It does not solve the issue, just getting worse. The search does not show anything now after pressing enter. For now, I will remove the elasticsearch back to my savvysearch module.
violinparts Posted August 21, 2018 Posted August 21, 2018 Sorry. It works in the results after choosing force recompile template in performance. %20 is gone in search result. Thanks. But %20 still shows up in search bar after pressing enter. This needs to be resolved too.
doclucas Posted August 21, 2018 Author Posted August 21, 2018 @violinparts Please check my revised post for fixes. Be sure to clear cache after the edits.
Beeta Posted August 21, 2018 Posted August 21, 2018 @doclucas how about add here? https://github.com/thirtybees/elasticsearch
doclucas Posted August 21, 2018 Author Posted August 21, 2018 @foolab @dosbiner done: https://github.com/thirtybees/elasticsearch/pull/57
dynambee Posted August 22, 2018 Posted August 22, 2018 @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?
dynambee Posted August 22, 2018 Posted August 22, 2018 @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.
violinparts Posted August 22, 2018 Posted August 22, 2018 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.
doclucas Posted August 22, 2018 Author Posted August 22, 2018 @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. :)
doclucas Posted August 26, 2018 Author Posted August 26, 2018 @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. 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
the.rampage.rado Posted August 27, 2018 Posted August 27, 2018 Just a noob question from a noob like me - I've still not tested elasticsearch but read about it few months ago. The question is - can we run this search indexing module/thing without separate server to run the backend of the service? Can I run it in my server that's hosting my site?
doclucas Posted August 27, 2018 Author Posted August 27, 2018 @the-rampage-rado Absolutely. If it is a dedicated server or a VPS you can normally set it up yourself on that, or in all cases, ask your hosting provider to setup elasticsearch 5 service if possible.
violinparts Posted August 27, 2018 Posted August 27, 2018 @doclucas Hi, How or where can I find that security token for the cron url? Also, I find the fix for cronjobs module seems to be already there in cronjobs module 2.1.3. Am I correct?
doclucas Posted August 27, 2018 Author Posted August 27, 2018 The token should appear on the cronjobs page, in the blue section, as you can see (blurred) in my screenshot. The fix is not in 2.1.3, you should manually fix the code.
doclucas Posted August 27, 2018 Author Posted August 27, 2018 @violinparts said in Setting up elasticsearch module: You mean on the cronjobs module page? ?
violinparts Posted August 27, 2018 Posted August 27, 2018 Where to find the security token? On the cron links on the Cron module page token= ............... ? My other modules that come with cron links have their own security tokens.
doclucas Posted August 27, 2018 Author Posted August 27, 2018 yep, token=... in the blue section of the cronjobs module page, as you can see blurred out in my screenshot above
Recommended Posts