-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add or operator for Elasticsearch filters and use exists if value is null
#3834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add or operator for Elasticsearch filters and use exists if value is null
#3834
Conversation
* Update translations * Fix border rounded bug in footer newsletter input * Bugfix for category header when loaded client-site * Add todo comment
* Prefetch category-extras data without VSF asyncData method to prevent bug with `routeStore.route` in getters (vuestorefront/vue-storefront#3328)
…od which is not cached to have a correct categories array when switching route from client-side
Remove default homepage and its assets and bugfix for getCurrentCategory
* Add small improvement to getters like in official PR for this bug * Add some styling to placeholder home page
* Small improvements * Transform parameter values type in `getCategoryByParams` to category value type
… parameters are added (#47)
* Add support for fetching multiple entries at once of CMS (particularly `Storyblok`) via `icmaa-cms/list` action abstract method * Add `icmaa-spotify` module to populate state with Spotify recommendations * Improve `icmaa-category` overwrites for `catalog-next` module * Improve some namespacing of `icmaa-cms` mutations * Improve namespacing of custom `icmaa`-module getters * Use module names for our imports
* Improve icmaa-category/list * Improve category-header styling (Draft) * Bugfix for headers z-index
* For footer service logos and language-flags
* Create module inheritation for store-view configs * Add default store-view meta-data (DRAFT) * Add href-lang and canonical tags
* Remove unused CSS class (Tailwind) using PurgeCSS * Add `postcss-clean` for minification of CSS
…ntegration-branch
…re now been merged
* Show just current path if no category is in parameters
* And hide error message in products
* Update README.md for `icmaa-url`
* Show default category header image if mobile image is missing * Give custom url rewrites a higher priority
* Improve `ProductListingWidget` * Load products using `bodybuilder` query * Change products if cluster changes * Remove custom search-adapter including the and/or options – we do this using a plain `bodybuilder` query * Set cluster on product and category pages using custom mixin
…update-from-divante
|
Related to #3934 |
andrzejewsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good for me 👍
|
@cewald can you rebase with the current develop branch? I wanted to do this on my own but I don't have access to your repository. |
…cmaa/vue-storefront into feature/elasticsearch-with-and-or-null
|
@andrzejewsky Sorry, but I messed up this branch by rebasing it with the wrong branch (too many repos, branches and remotes :)). I re-added the changes to a clean branch and opened up a new PR #3960 so we can close this one. |
|
Thanks Christian |
Related issues
I needed a possibility to simply add an
or/shouldfilter to thequickSearchByQuerymethod.This wasn't possible yet, so I extended the
prepareElasticsearchQueryBodymethod of the ElasticSearch search-adapter to accept anoroperator in the value property.I also added an ES
existsfilter if the value isnullif you just wan't the field to benull.Short description and why it's useful
I had to make a product query where I wanted a collection of products with a specific value or an empty one. This wasn't possible yet because all filters are chained as 'AND' filters.
Now you can make query like this (
orin the last two lines) to show all products withcustom_attributeis2or3orcustom_attributeis just empty (null):In our use-case the products have clusters, so I wan't to show products to the customer which have his current cluster OR if there are not enough of them just regular products without a cluster.
With this changes I can make queries like this to the ES while I still can use all the advantages of
quickSearchByQuery:If you think it isn't an essential functionallity, just ignore and close this PR.
But I thought this might come in handy.
Which environment this relates to
Check your case. In case of any doubts please read about Release Cycle
developbranch and want to merge it back todevelopreleasebranch and want to merge it back toreleasehotfixormasterbranch and want to merge it back tohotfixUpgrade Notes and Changelog
IMPORTANT NOTICE - Remember to update
CHANGELOG.mdwith description of your changeContribution and currently important rules acceptance