-
Notifications
You must be signed in to change notification settings - Fork 46
Ability to get all refined values #70
Comments
@redox should it work for any kind of refinement? Or should we have different methods for each type of refinement? |
Hmmm, I would say any kind: addRefine('c1', 'v1');
addDisjunctiveRefine('d1', 'v1');
addDisjunctiveRefine('d1', 'v2');
addRefine('c2', 'v1');
addExclude('c2', 'v2');
getRefinements('c1') -> ['v1']
getRefinements('d1') -> ['v1', 'v2']
getRefinements('c2') -> ['v1', '-v2'] // with a "-" ? -> not sure about that one |
Humm different types of refinements. I see three options here :
I would vote for the last one but each solution has its pros/cons |
The use case was to efficiently/quickly build a list of all active refinements on top of the page, with the ability to remove filters clicking on them. The last option should work, not yet sure it's the most efficient way to do it because of the switch/case on the type of the facet that could make things more complex. Ideally I would like to write something like on top on my hits:
|
The |
I'm ok with you latter comment but don't you think that each kind of facetting has its own UI? |
They have their own UI in the facets, but if you want to add something on top of the results page they could share the same. But also, it's so easier to use because you just don't need to think about their types. |
👍 Go then! :) |
FIX #70 Ability to get all refined values : helper.getRefinements()
* FIX : #29 Avoid callback for outdated queries * FIX : #64 Sum up the processing time of all queries * FIX : #92 Parameters that can be set in the dashboard shouldn't have defaults * FIX : #62 Make sure disctinct is set to false when it's not possible to use distinct in Algolia * FEATURE : #91 Support for tags (with support for the raw format #98) * FEATURE : #70 Ability to get all refined values : helper.getRefinements( facetname ) * FEATURE : #51 multiple filters for a single conjunctive facet (tests) * FEATURE : Ability to modify any parameter of the state easily (#76 #84 #12) * FEATURE : #69 Ability to know if a facet is refined, whatever the value * FEATURE : #86 Expose SearchParameters, AlgoliaSearchHelper, SearchResults to users directly in the builds * FEATURE : #25 let the user do a clearRefinement with a function as a filter * REFACTORING : SearchParameters is immutable (#14) * REFACTORING : Ensure SearchParameters is totally frozen (#14) * LIB : Update lodash version to 3.9.x
…ature/getRefinements FIX algolia/algoliasearch-helper-js#70 Ability to get all refined values : helper.getRefinements()
* FIX : algolia/algoliasearch-helper-js#29 Avoid callback for outdated queries * FIX : algolia/algoliasearch-helper-js#64 Sum up the processing time of all queries * FIX : algolia/algoliasearch-helper-js#92 Parameters that can be set in the dashboard shouldn't have defaults * FIX : algolia/algoliasearch-helper-js#62 Make sure disctinct is set to false when it's not possible to use distinct in Algolia * FEATURE : algolia/algoliasearch-helper-js#91 Support for tags (with support for the raw format #98) * FEATURE : algolia/algoliasearch-helper-js#70 Ability to get all refined values : helper.getRefinements( facetname ) * FEATURE : algolia/algoliasearch-helper-js#51 multiple filters for a single conjunctive facet (tests) * FEATURE : Ability to modify any parameter of the state easily (algolia/algoliasearch-helper-js#76 #84 #12) * FEATURE : algolia/algoliasearch-helper-js#69 Ability to know if a facet is refined, whatever the value * FEATURE : algolia/algoliasearch-helper-js#86 Expose SearchParameters, AlgoliaSearchHelper, SearchResults to users directly in the builds * FEATURE : algolia/algoliasearch-helper-js#25 let the user do a clearRefinement with a function as a filter * REFACTORING : SearchParameters is immutable (algolia/algoliasearch-helper-js#14) * REFACTORING : Ensure SearchParameters is totally frozen (algolia/algoliasearch-helper-js#14) * LIB : Update lodash version to 3.9.x
Something like
helper.getRefinements(facet) -> ["value1", "value2", ...]
The text was updated successfully, but these errors were encountered: