vuestorefront / vue-storefront-1

The open-source frontend for any eCommerce. Built with a PWA and headless approach, using a modern JS stack. We have custom integrations with Magento, commercetools, Shopware and Shopify and total coverage is just a matter of time. The API approach also allows you to merge VSF with any third-party tool like CMS, payment gateways or analytics. Newest updates: https://blog.vuestorefront.io. Always Open Source, MIT license.
https://www.vuestorefront.io
MIT License
18 stars 13 forks source link

Unable to render category page using ElasticSearch 7.12 #237

Closed bloodf closed 3 years ago

bloodf commented 3 years ago

From vue-storefront created by frflores11: vuestorefront/vue-storefront#5887

Prerequisites

Please answer the following questions for yourself before submitting an issue.

Check our forum:

https://forum.vuestorefront.io/

Is there something you don't understand? What is it? Describe it.

I'm trying to set up a store using VSF 1.12.2 and elasticsearch 7.12.1, however when I try to render a category page I got an error in the in the browser console and in the pm2 (api log) as follows: 2021-05-06 17:33:12: { root_cause: 0|api | [ { type: 'parsing_exception', 0|api | reason: 'No value specified for terms query', 0|api | line: 1, 0|api | col: 131 } ], 0|api | type: 'x_content_parse_exception', 0|api | reason: '[1:131] [bool] failed to parse field [filter]', 0|api | caused_by: 0|api | { type: 'x_content_parse_exception', 0|api | reason: '[1:131] [bool] failed to parse field [must]', 0|api | caused_by: 0|api | { type: 'parsing_exception', 0|api | reason: 'No value specified for terms query', 0|api | line: 1, 0|api | col: 131 } } }

I captured the elasticsearch traffic using wireshark, where I see that the category_ids search parameter is null: { "query": { "bool": { "filter": { "bool": { "must": [ { "terms": { "visibility": [ 2, 3, 4 ] } }, { "terms": { "status": [ 0, 1 ] } }, { "terms": { "category_ids": [ null ] } } ] } } } }, "aggs": { "agg_terms_color": { "terms": { "field": "color", "size": 10 } }, "agg_terms_color_options": { "terms": { "field": "color_options", "size": 10 } }, "agg_terms_erin_recommends": { "terms": { "field": "erin_recommends", "size": 10 } }, "agg_terms_erin_recommends_options": { "terms": { "field": "erin_recommends_options", "size": 10 } }, "agg_terms_price": { "terms": { "field": "price" } }, "agg_range_price": { "range": { "field": "price", "ranges": [ { "from": 0, "to": 50 }, { "from": 50, "to": 100 }, { "from": 100, "to": 150 }, { "from": 150 } ] } }, "agg_terms_size": { "terms": { "field": "size", "size": 10 } }, "agg_terms_size_options": { "terms": { "field": "size_options", "size": 10 } } } }

I've read some forums where other ElasticSearch users are reporting a similar issue (not in VSF but other application) when migrating to ElasticSearch 7.7...

my question is: is this a configuration problem in my setup or an issue associated to VSF incompatibility with ElasticSearch 7.12.1 ?

Thanks in advance!,

Can't find what you're looking for?

Keep the problem description concise and include:

Additional information

bloodf commented 3 years ago

It looks like the app could not find a category in ES by your URI. Maybe you do not have this category in ES, you use wrong URL structure, or the requested category does not exist.