Jump to content
thirty bees forum

Setting up elasticsearch module


doclucas

Recommended Posts

Setting up elasticsearch module is pretty simple. The module has been pretty much been pre set-up. Make sure that your server or hosting is already installed with the elasticsearch plugin - also known as PHP client for Elasticsearch.

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.

Link to comment
Share on other sites

You can just ask your hosting support to install it. Good hosting should do it for your for free. But I am not sure your hosting support would do it if you are on a shared hosting. If you are on a VPS, there is no reason your support will not do it for you. If you are on Cloudways, it is already installed by default. You only need to enable it.

Link to comment
Share on other sites

I run a dedicated CentOS 6.9 server with cPanel/WHM, self managed. I assume you already had it pre-installed, so no worries, thanks anyway. If anyone can explain the full installations details, I'd appreciate it. I already followed the instructions here: https://github.com/elastic/elasticsearch-php Added the entry to thbees/composer.json ran composer update It seems to have installed it, but when I go to the BO, and click "Full reindex" it says "Unable to connect with the Elasticsearch server. Has the connection been configured?" The connection is pre-configured on "http://localhost:9200" Not sure how to proceed.

Link to comment
Share on other sites

I had to install and start the service as well. Followed the instructions here: https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html Tested in SSH using curl 'http://localhost:9200/?pretty' and it seems to be running fine Now in the BO, when I click the "reindex" button, the rotating circle just rotates endlessly. Checking chrome console log, it shows a non-stopping loop of XHR finished loading: GET "https://..../index.php?controller=AdminModules&token=6c77f5aa67344cd534ce5135a352fdd5&configure=elasticsearch&tab_module=front_office_features&module_name=elasticsearch&ajax=1&action=indexRemaining".

Am I doing something wrong?

Link to comment
Share on other sites

I have completely removed TB installation. Installed again the same way (via softaculous, TB 1.0.6). Logged in to the BO without changing any setting. Logged in via SSH as root to re-confirm elasticsearch service is running. Installed the module (this time without doing the composer.json steps). Tried clicking the index buttons, same problems as I wrote above.

Does this module work for anyone on a fresh 1.0.6 installation?

Link to comment
Share on other sites

My XHR result shows: { "success": true, "indexed": 0, "total": 8, "nbErrors": 8, "errors": [ { "id_lang": 1, "id_shop": 1, "id_product": 1, "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed." }, { "id_lang": 1, "id_shop": 1, "id_product": 2, "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed." }, { "id_lang": 1, "id_shop": 1, "id_product": 3, "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed." }, { "id_lang": 1, "id_shop": 1, "id_product": 4, "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed." }, { "id_lang": 1, "id_shop": 1, "id_product": 5, "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed." }, { "id_lang": 1, "id_shop": 1, "id_product": 6, "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed." }, { "id_lang": 1, "id_shop": 1, "id_product": 7, "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed." }, { "id_lang": 1, "id_shop": 1, "id_product": 8, "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed." } ] }

Link to comment
Share on other sites

Note that I am using Elasticsearch version: 6.3.2 for php 7+ I think some things changed in Elasticsearch since version 5, but I am not sure if the module is meant for version 5 or 6 or both or if this issue is related at all.

Would appreciate any help.

Link to comment
Share on other sites

elasticsearch version 5.4 is for php 5+. My server is php 7+, so can't use that version. Interestingly the above github issue reported has also tried using ES versions 2.4.6 and 5.6.7, with similar results to mine. Also my TB is 1.0.6, not 1.0.4, although I don't know if the issue is with the TB version itself.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

If you never use the "manufacturer" attribute, I assume you can use your "manufacturer" field as "brand" by putting the brand names you sell in there when you add or update products. That should work, at least as a sufficient workaround. As for the 20%, I don't have this issue on my installation and I don't see it on your website either: https://rackmetro.com/#q=pop%20movies

alt text

Link to comment
Share on other sites

That's really strange. Have you tried to press enter next to the two words search?

%20 shows in between - as you see in my attachment - on Firefox and Chrome. It does not show up on Safari.

You will see it when you press Enter next to two words - on Chrome, Firefox, Android.

Link to comment
Share on other sites

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