Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

feature/2167 #390

Merged
merged 14 commits into from
Jan 13, 2020
Merged

feature/2167 #390

merged 14 commits into from
Jan 13, 2020

Conversation

pkarw
Copy link
Contributor

@pkarw pkarw commented Dec 28, 2019

Related PR: https://github.com/DivanteLtd/vue-storefront/pull/3962/files

I've moved the ElasticSearch query construction to the api. There is an additional parameter request_format; when search-query the Elastic query is constructed server-side - on the API level.

I've moved the Query Builder to separate repository: https://github.com/DivanteLtd/storefront-query-builder which is now shared with vue-storefront and will be shared with storefront-api projects.

This is Work in Progress and not ready to merge. Bc. some config variables have currently missed the query is being constructed wrong way and it results with no aggregation and no products.

TODO:

  • fix the config parameters in order to get the right query object,
  • modify queryBuilder in the graphql resolvers to use this new storefront-query-builder library,

@pkarw
Copy link
Contributor Author

pkarw commented Dec 30, 2019

  • The response_format query parameter to the /api/catalog endpoint. Currently there is just one additional format supported: response_format=compact. When used, the response format got optimized by: a) remapping the results, removing the _source from the hits.hits; b) compressing the JSON fields names according to the config.products.fieldsToCompact; c) removing the JSON fields from the product.configurable_children when their values === parent product values; overall response size reduced over -70% - @pkarw
  • The support for SearchQuery instead of the ElasticSearch DSL as for the input to /api/catalog - using storefront-query-builder package - @pkarw - Remove Elastic DSL / bodybuilder from frontend vue-storefront#2167

@pkarw pkarw changed the title [WIP] Feature/2167 feature/2167 Dec 30, 2019
package.json Outdated Show resolved Hide resolved
@pkarw
Copy link
Contributor Author

pkarw commented Dec 30, 2019

Thanks! OK I've used # as for now. npm is definitely the right idea: https://www.npmjs.com/package/storefront-query-builder

what's your npm login? @andrzejewsky and yours? I'll add you to the VueStorefront org on npm guys

@ResuBaka
Copy link
Collaborator

My Account is resubaka on npm. @pkarw

package.json Outdated Show resolved Hide resolved
@@ -96,7 +96,7 @@
"resource-router-middleware": "^0.6.0",
"sharp": "^0.23.4",
"soap": "^0.25.0",
"storefront-query-builder": "https://github.com/DivanteLtd/storefront-query-builder.git",
"storefront-query-builder": "^0.0.9",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be changed to 0.0.*

So we don't get possible breaking changes, as 0.1.0 could have breaking changes in it when you go after semver versioning.

@andrzejewsky andrzejewsky merged commit dfada8a into develop Jan 13, 2020
pkarw added a commit to ResuBaka/storefront-api that referenced this pull request Jan 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants