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

Handling tags in the helper? #91

Closed
bobylito opened this issue Jun 2, 2015 · 4 comments
Closed

Handling tags in the helper? #91

bobylito opened this issue Jun 2, 2015 · 4 comments
Milestone

Comments

@bobylito
Copy link
Contributor

bobylito commented Jun 2, 2015

We have an API to handle the tags. Right now, it's very bare bone (use of the most level apis, string based...). At the very least, we should have an API that provides a basic add/remove/list the tags used for filtering :

helper.addTag( "tag" );
helper.removeTag( "tag" );
helper.listTags() // []
@bobylito bobylito added this to the 2.1.0 milestone Jun 2, 2015
@redox
Copy link
Contributor

redox commented Jun 2, 2015

I would go for addTagRefinement, removeTagRefinement (getRefinements or getTagRefinements) then because it's exactly like the facets & numerics.

@pixelastic
Copy link
Contributor

I agree to keep the consistency with a set of *Refinement methods. Maybe
a clearTags also, to remove them all.

On Tue, Jun 2, 2015 at 10:20 PM, Sylvain Utard notifications@github.com
wrote:

I would go for addTagRefinement, removeTagRefinement (getRefinements or
getTagRefinements) then because it's exactly like the facets & numerics.


Reply to this email directly or view it on GitHub
#91 (comment)
.

@redox
Copy link
Contributor

redox commented Jun 2, 2015

So maybe here I would see the same logic than getRefinements(attribute) -> what about clearRefinements(attribute):

clearRefinements("_tags");
clearRefinements("my_facet_attribute");
clearRefinements("my_numeric_attribute");

Maybe that's only sugar in the AlgoliaSearchHelper on top of 4 clearTagRefinements(), clearFacetRefinements(facet), clearDisjunctiveFacetRefinements(facet) and clearNumericalRefinements(attribute) of the SearchParameters.

@bobylito
Copy link
Contributor Author

bobylito commented Jun 5, 2015

Not sure about the clearRefinements(_tags), i don't feel like it would be obvious for users that this is the attribute of the _tags because we don't have to specify it when manipulating tags.

bobylito pushed a commit that referenced this issue Jun 15, 2015
  * 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
dhayab pushed a commit to algolia/instantsearch that referenced this issue Jul 10, 2023
dhayab pushed a commit to algolia/instantsearch that referenced this issue Jul 10, 2023
  * 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants