algoliasearch-helper-js icon indicating copy to clipboard operation
algoliasearch-helper-js copied to clipboard

Get search request for backend usage

Open bobylito opened this issue 8 years ago • 1 comments

Sometimes we want to be able to create the client compatible search query so that we can replicate the search with any API client. For example, this can be used for making a "download all results" feature, that will rely on doing a browse all on the backend side.

Proposed API

var query = helper.getHitsQueryParameters();
var browser = client.browseAll(query);

bobylito avatar Jan 18 '17 09:01 bobylito

So we already have the feature, in the form of the getQuery method on the helper. However it is poorly named and will create confusions with setQuery.

  • [ ] Make sure it works with browseAll (or document which feature/methods it should be used with)
  • [ ] Rename the method
  • [ ] Document it

bobylito avatar Jun 08 '17 21:06 bobylito