algoliasearch-helper-js
algoliasearch-helper-js copied to clipboard
Get search request for backend usage
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);
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