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

Avoid callback for outdated queries #29

Closed
bobylito opened this issue Mar 31, 2015 · 3 comments
Closed

Avoid callback for outdated queries #29

bobylito opened this issue Mar 31, 2015 · 3 comments
Assignees
Milestone

Comments

@bobylito
Copy link
Contributor

Depending on the network, it may happen that a request sent before another is received after. This should not happen, and shouldn't be left to the responsibility of the user.

@bobylito bobylito modified the milestone: v2.1 Mar 31, 2015
@vvo
Copy link
Contributor

vvo commented Apr 1, 2015

Do you mean we want to "cancel" cases like:

helper.search() //slow one, cancel it
helper.search() // fast one, get it

Would it be transparent for the user that he will only get results for second search? I guess if we are using an event emitter and the two requests were for the same search then it might not be a good idea to trigger it twice indeed.

But what if the user did two different searches?

@bobylito
Copy link
Contributor Author

bobylito commented Apr 1, 2015

The helper is not meant for doing "two different searches", the helper managed the state of the search : the whole state. If you are using 2 indexes, you probably should use two helper instances. Same for helpers based on two separates parts of a UI.

@bobylito bobylito closed this as completed Apr 1, 2015
@bobylito bobylito reopened this Apr 1, 2015
@bobylito
Copy link
Contributor Author

bobylito commented Apr 1, 2015

Kinda related with #31 (see the proposed fixed)

@bobylito bobylito self-assigned this Jun 5, 2015
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

2 participants