0

I thought my Elasticsearch is configured correctly. 'Test connection' in the admin panel is successful and the quick search there shows many entries as dropdown, as you can see in the screenshot below. I have already reindexed - if this is all what is required to build up data in Elasticsearch.

Product quick search in admin panel

But I have two problems:

  1. If I enter something into the search box, the response takes about a second. Shouldn't it be much faster? This concerns frontend and admin panel.

  2. In the quick search of the frontend I see only the already entered terms in the dropdown list. See the image below. Shouldn't there be entries similar to the admin panel?

Product quick search in frontend

As you can see, I have searched for 'print' and already hit the Enter button. Then I typed 'print' into the search box again, to show what I get offered during typing. Actually, there are more products that match to 'print', but I can see only what I have entered already. This shouldn't be like that, right?

The browser's request is https://my-domain.com/search/ajax/suggest/?q=print&_=1597670046451 and the response is:

[{title":"print","num_results":"253"},{"title":"Printer 20","num_results":"241"}] 

If I search for 'print' on the command line, I get the following:

$ curl -i http://es_machine:9200/_search?pretty=true&q=print
{
  "took" : 1,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 768,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "g6master_product_1_v3",
        "_type" : "document",
        "_id" : "1",
        "_score" : 1.0,
        "_source" : {
          "store_id" : "1",
          "sku" : "T_121985",
          "status" : "1",
          "status_value" : "Enabled",
          "visibility" : "4",
          "tax_class_id" : "2",
          "tax_class_id_value" : "Taxable Goods",
          "name" : "Printer 15 - Textplatte",
          "url_key" : "textplatte-colop-printer-15",
          "description" : ".....",
          "short_description" : "....",
          "category_ids" : [
            3,
            4,
            5,
            6
          ],
          "position_category_3" : "0",
          "name_category_3" : "Produkte",
          "position_category_4" : "10000",
          "name_category_4" : "Textplatten",
          "position_category_5" : "0",
          "name_category_5" : "Colop Printer Line",
          "position_category_6" : "0",
          "name_category_6" : "ALL",
          "price_0_1" : "10.680000",
          "price_1_1" : "10.680000",
          "price_2_1" : "10.680000",
          "price_3_1" : "10.680000"
        }
      },
      {
        "_index" : "g6master_product_1_v3",
        "_type" : "document",
        "_id" : "2",
        .
        .
        .

Currently, I don't know if this is how it should be and also where to find and fix the problem. What could be wrong? Any hints are much appreciated!

1 Answer 1

1

if you are really looking for better search you need to mess with elasticsearch config files in magento, customize it, and test.

but usually even enterprise version search sucks, this is why they install Smile ElasticSearch Suite. https://github.com/Smile-SA/elasticsuite

this will extend magento default search functionality and a lot more.

welcome to magento "not a bug, is a feature" world...

1
  • Yeah, a featue... One should see all in a positive way. My assumption currently is, that ES is just a base that does not get used very much in the default Magento setup. The default behaviour seems to use ES in the frontend only when the search result page gets shown, but not when you are typing in the search box, what I find quite poor. I have had expected that the search in M2.4 is much better than before. Now I think, without another extension nothing has improved.
    – robsch
    Aug 24, 2020 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.