This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
feat(facets): when * is present, only send that parameter #874
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Haroenv
requested review from
a team,
tkrugg and
francoischalifour
and removed request for
a team
October 6, 2021 09:35
Upon reflection, I realised that the behaviour with |
tkrugg
reviewed
Oct 6, 2021
When * is present in facets, we don't need to request the individual facet values of each facet that's declared, as * will already request it. With a new parameter "expandWildcardFacets", we filter out all facets that aren't * itself or -something. The new parameter doesn't add "*" automatically, it still To decide: - is "-something" worth caring about? - when * isn't present, should no facets be requested or the default ones? - is this the right location, maybe the client cache should have similar logic instead? see: https://github.com/algolia/algoliasearch-helper-js/issues/391
Haroenv
force-pushed
the
feat/wildcard-facets
branch
from
October 7, 2021 13:50
caf3814
to
2fcd00b
Compare
Haroenv
commented
Oct 7, 2021
Haroenv
changed the title
feat(facets): add expandWildcardFacets parameter to process * in facets
feat(facets): when * is present, only send that parameter
Oct 7, 2021
francoischalifour
approved these changes
Oct 8, 2021
Co-authored-by: François Chalifour <francoischalifour@users.noreply.github.com>
Haroenv
added a commit
that referenced
this pull request
Oct 8, 2021
Haroenv
added a commit
to algolia/instantsearch
that referenced
this pull request
Oct 8, 2021
dhayab
pushed a commit
to algolia/instantsearch
that referenced
this pull request
Jul 10, 2023
…goliasearch-helper-js#874) * feat(facets): add expandWildcardFacets parameter to process * in facets When * is present in facets, we don't need to request the individual facet values of each facet that's declared, as * will already request it. With a new parameter "expandWildcardFacets", we filter out all facets that aren't * itself or -something. The new parameter doesn't add "*" automatically, it still To decide: - is "-something" worth caring about? - when * isn't present, should no facets be requested or the default ones? - is this the right location, maybe the client cache should have similar logic instead? see: https://github.com/algolia/algoliasearch-helper-js/issues/391 * remove reference to non-existing - * don't inject * * rephrase * remove the parameter, by default! * Update src/requestBuilder.js * fix * Update test/spec/requestBuilder.js Co-authored-by: François Chalifour <francoischalifour@users.noreply.github.com> Co-authored-by: François Chalifour <francoischalifour@users.noreply.github.com>
dhayab
pushed a commit
to algolia/instantsearch
that referenced
this pull request
Jul 10, 2023
* ci(circle): update node image (algolia/algoliasearch-helper-js#875) algolia/algoliasearch-helper-js@d9a3e10 * feat(facets): when * is present, only send that parameter (algolia/algoliasearch-helper-js#874) algolia/algoliasearch-helper-js@d1282bb
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When
*
is present in facets, we don't need to request the individual facet values of each facet that's declared, as*
will already request it.We keep only
*
if it is present. If no*
is present, the facets stay as-is.see: algolia/instantsearch#5723
Alternatively to this PR, similar logic could be part of the algoliasearch client cache, but that has as downside that it requires an update to the search client, also custom implementations and older clients