aboutsummaryrefslogtreecommitdiff
path: root/node_modules/algoliasearch/CHANGELOG.md
blob: 5e7654663921d41b2ec42848ccbb0410c330753c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
# CHANGELOG

## 3.30.0
>2018-08-01

* FIX(multi-query): property pass the `strategy` argument
  * as in [docs](https://www.algolia.com/doc/rest-api/search#method-param-strategy)
  * was originally put into url parameters instead of request body

## 3.29.0
>2018-06-20

* FEAT(analytics): add API methods for AB testing
  * find more info about the new feature here: https://blog.algolia.com/ab-testing-search/
  * adds a new method on client:
      import algoliasearch from 'algoliasearch';
      const client = algoliasearch('appid', 'apikey');
      const analytics = client.initAnalytics();
      analytics.getABTests().then(console.log)
  * see documentation here: https://www.algolia.com/doc/api-client/ab-test/
* CHORE(parse): remove parse build, not needed.
  * You can just install and `require('algoliasearch');`

## 3.28.0
>2018-06-13

* FEAT(cache): cache the requests instead of responses (#694)

  If you pass `_useRequestCache: true` as an option to the client then the cache behaviour will change. If you launch two requests at the same time then only one request will be done while the two callbacks/promises will still be called/resolved.

  Previously, the client would have made two requests instead of one.

  This is implemented by filling the cache as soon as the request launches instead of waiting for the response to fill it.
* FIX(parse): correct path to debug module (#702)

  fixes parse build, weirdly webpack is not throwing when importing an
  unkown module using target node
* TESTS: Make this CI green, fix unit and integration tests on every platform

## 3.27.1
>2018-05-03

* FIX: `client.searchForFacetValues` in older browsers
  * we use the polyfill implementation of Promise.all now instead of the native in 3.27.0
* FIX: `index.saveRule` throw when no objectID is given
* FEAT: deprecate index API key methods in favor of client ones
  * these methods will be removed, since you can add index restrictions to client API keys

## 3.27.0
>2018-04-16

* FEAT: add client.searchForFacetValues
  * this allows to request multiple search for facet values in a single call
  * note that this will do multiple requests (one per query)

## 3.26.0
>2018-03-21

* FEAT: allow disabling of dsn
  * in some cases (backend search while you do have global DSN), you want to disable DSN to avoid a round-robin around the whole world if DNS can't be resolved as expected, for example on GCP. (#675)

## 3.25.1
>2018-03-08

* FIX: fix protocol detection introduced in 3.25.0

## 3.25.0
>2018-03-07

* FEAT: use https by default (#670)
  * for very old devices https can be slow
  * we defaulted to sending API requests over http on http sites
  * this is now not really a performance bottleneck anymore
  * https is now default, unless specified differently when initializing

## 3.24.12
>2018-02-28

* FIX: Handle Node.js network errors more precisely (#669)

## 3.24.11
>2017-02-08

* FIX: allow `index.getSettings` without any arguments
  * this was a regression in 3.24.10
  * added tests

## 3.24.10
>2017-02-07

* FIX: correct `index.exportSynonyms` and `index.exportRules`
  * they had the wrong implementation until now
  * add some tests to prevent regression

## 3.24.9
>2017-12-29

* FIX: make sure long API keys are sent via the POST body
  * this wasn't the case in 3.24.8 because of a typo

## 3.24.8
>2017-12-13

* add multi cluster management methods
  * [ Assign or Move a userID to a cluster](https://algolia.com/doc/api-reference/api-methods/assign-user-id/): `assignUserID`
  * [Get userID with highest number of records per cluster](https://algolia.com/doc/api-reference/api-methods/get-top-user-id/): `getTopUserID`
  * [Returns the userID data stored in the mapping](https://algolia.com/doc/api-reference/api-methods/get-user-id/): `getUserID`
  * [List the clusters available in a multi-clusters setup for a single appID](https://algolia.com/doc/api-reference/api-methods/list-clusters/): `listClusters`
  * [List the userIDs assigned to a multi-clusters appID](https://algolia.com/doc/api-reference/api-methods/list-user-id/): `listUserIDs`
  * [Remove a userID and associated data from the multi-clusters](https://algolia.com/doc/api-reference/api-methods/remove-user-id/): `removeUserID`
  * [Search for userIDs](https://algolia.com/doc/api-reference/api-methods/search-user-id/): `searchUserIDs`

## 3.24.7
>2017-11-29

* don't throw an error when `copyIndex` without scope is used
  * if no scope is given, `settings`, as the default will be chosen

## 3.24.6
>2017-11-16

* add `index.exportSynonyms` and `index.exportRules`
  * they will get all of the synonyms or query rules on an index
* add a new `scope` argument to `copyIndex`
  * this is the third argument (from, to, scope)
  * it's an array with settings, synonyms or rules
  * if specified, that data will also be copied if you copy the index

## 3.24.5
>2017-10-02

* feat(deleteBy): add deleteBy
  * deleteByQuery is deprecated now
  * the same, but now it happens at the indexing side
  * no major changes should be seen, please report if any
  * https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#indexdeletebyquery

## 3.24.4
>2017-09-22

* chore(build): provide jsDelivr the right file (#599)

## 3.24.3
>2017-07-24

* chore(deprecation): remove deprecation from singular/plural methods; all these methods will stay existing
  * index.addObject(obj) or index.addObjects([obj])
  * index.partialUpdateObject(obj) or partialUpdateObjects([obj])
  * index.saveObject(obj) or index.saveObjects([obj])
  * index.deleteObject(objectID) or index.deleteObjects([objectID])
  * index.getObject(objectID) or index.getObjects([objectID])

## 3.24.2
>2017-07-24

* chore(deprecation): add deprecation message to all methods that will be removed in v4 (#573)
  * index.addObject(obj) --> index.addObjects([obj])
  * index.ttAdapter --> autocomplete.js
  * index.partialUpdateObject(obj) --> partialUpdateObjects([obj])
  * index.saveObject(obj) --> index.saveObjects([obj])
  * index.deleteObject(objectID) --> index.deleteObjects([objectID])
  * index.getObject(objectID) --> index.getObjects([objectID])
  * see https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated for more information

## 3.24.1
>2017-07-20

* feat(headers): add functions to remove and get extra headers (#572)
  * client.setExtraHeader('X-cool-header','hello there');
  * client.getExtraHeader('X-cool-header'); //hello there
  * client.unsetExtraHeader('X-cool-header');
  * client.getExtraHeader('X-cool-header'); //undefined
* feat(deprecation): use console.warn to be more visible
* refact(rules): Adapt to latest JSON schema for Query Rules

## 3.24.0
>2017-06-21

* feat(rules): Add query rules beta version, you cannot use this for now

## 3.23.0
>2017-06-08

* feat(places): Add places.getObject(); fixes algolia/places#381

## 3.22.3
>2017-05-29

* fix(dependency): Do not pin debug dependency anymore
fixes #556

## 3.22.2
>2017-05-18

* fix(partialUpdateObjects): allow createIfNotExists (#552)
  Much like partialUpdateObject, allow createIfNotExists
  fixes #551

## 3.22.1
>2017-03-13

* fix(packaging): put back envify in deps
  * browserify transforms are applied for node_modules/pkg

## 3.22.0
>2017-03-13


* feat(API): rename all *userKey[s] methods to *apiKey[s]
  * client/index.listUserKeys() => client/index.listApiKeys()
  * client/index.getUserKeyACL() => client/index.getApiKey()
  * client/index.deleteUserKey() => client/index.deleteApiKey()
  * client/index.addUserKey() => client/index.addApiKey()
  * client/index.udpateUserKey() => client/index.updateApiKey()
* fix(packaging): remove useless files for packaging (reduce package file size)

## 3.21.1
>2017-02-08


* fix(browse*): use POST instead of GET to avoid limits (#503)

## 3.21.0
>2017-02-06


* feat(x-algolia-agent): specify x-algolia-agent at search time
* fix(parse): check for `global` existence before erasing

## 3.20.4
>2017-01-16


* fix(retry strategy): handle cases were localStorage fails after success (#474)

  Before this commit we only checked for localStorage failures at:
  - page load
  - localStorage.setItem

  While in some situations websites could erase localStorage for the
  whole page at any moment (between requests) and we were not resilient to that.

* chore(forwardToSlave): deprecate forwardToSlaves in favour or forwardToReplicas

## 3.20.3
>2017-01-04


* fix(agent): ensure algolia agent is not duplicated by successive calls

## 3.20.2
>2016-12-19


* fix(nodejs): do not use let, 0.12 does not support it

## 3.20.1
>2016-12-17


* fix(nodejs): on timeout, destroy the right response

## 3.20.0
>2016-12-14


* feat(retry strategy): adjust retry strategy for all implementations
  - Retry strategy now shares the last known host for a specific appId across the current domain (browsers)
  or the current process (browsers without localStorage, Node.js). After 2 minutes we try to target back
  the first host (Usually DSN)
  - Retry strategy now shares the last known timeout multiplier that worked and set it back to default
  after 2 minutes
  - Retry strategy on Node.js now has a connect timeout of 2s
  - Retry strategy on browsers (JavaScript, not jQuery, not Angular.js, not React Native for now) now
  has a connect timeout of 1s
  - You can now get and set timeouts per client with .setTimeouts({connect, read, write}), .getTimeouts().
  Values are in ms.

## 3.19.2
>2016-11-28


* fix(facet search): rename index.searchFacet to index.searchForFacetValues

## 3.19.1
>2016-11-11


* fix(build): use regular debug module, issue with yui compressor was fixed here:
https://github.com/visionmedia/debug/pull/315

## 3.19.0
>2016-10-26


* feat(index.searchFacet): add method #345

## 3.18.1
>2016-08-31


* fix(client.search): accept very long API keys
  fixes #319

  also fix uglify-js version because it's buggy in IE8:
  https://github.com/mishoo/UglifyJS2/issues/1039

## 3.18.0
>2016-07-22


* fix(debug): only activate debug messages on NODE_ENV==='debug'
* feat(lite): add getObjects

## 3.17.0
>2016-07-06


* feat(errors): add statusCode to errors
* chore(shrinkwrap): completely remove shrinkwrap

## 3.16.0
>2016-06-22


* feat(index.setSettings): add forwardToSlaves option
index.setSettings({settings}, {forwardToSlaves}, cb);
see https://www.algolia.com/doc/rest#change-index-settings

## 3.15.1
>2016-06-16


* fix(getLogs): allow using the type parameter
  The syntax is now getLogs(params[, cb])
  fixes #232
* fix(json): avoid throwing when late JSON response
  fixes #284
* fix(nodejs): allow universal lite applications
  require('algoliasearch/lite') should work to
  facilitate universal applications builds using
  the lite build on frontend

fixes #283

## 3.15.0
>2016-06-07


* feat(synonyms): add new synonyms API

## 3.14.6
>2016-05-30


* fix(places): allow empty credentials

## 3.14.5
>2016-05-26


* fix(window): don't assume window is here

When required in a node context, we may load the browser build without
using it. Just for testing other parts of it.

## 3.14.4
>2016-05-25


* fix(lite): lite package should have browse and browseFrom

## 3.14.3
>2016-05-25


* fix(retry): also retry on non search methods when DNS failure

  Before this commit, methods with no fallback support (basically every
  method) would fail at retry if the DNS error occured before the API
  client timeout.

  The behavior is now:
  - when a method with a fallback errors because of DNS failure we will
  switch to JSONP right away
  - when a method with no fallback errors because of DNS failure we will
  still retry

  We could use the same mechanism for both (= always try all hosts
  before JSONP) but I am not confident doing this change within a patch
  or minor version. We have too litle data on how blocked XHRS are
  triggered (async, sync?).

  fixes #250

  * fix(request strategy): comply with retry spec, no early JSONP switch

    This commit brings more conformance with request strategy
    specification by only raising timeout when there's a timeout.

    It also stop trying to switch to JSONP asap and always try all hosts
    using XHRS before.

## 3.14.2
>2016-05-24


* fix(request strategy): increments hostIndex (host adress) on fallback

  When we are switching to fallback, increment host index so that JSONP
  will use another host.

  This issue was caused because we cannot distinguish CORS errors from DNS
  resolution errors in the browser.

  And the code for incrementing the host index was moved into the part
  that switches to the fallback in
  4ec5e6a1f8cd92924ce025d60646b3a47b7d8dca.

  Truth is that the current solution is not optimal as, in the browser,
  we are switching to JSONP when we can't resolve the server name.

  This is only done because we are not sure how CORS request can be
  blocked (synchronously, asynchronously).

  In a next version we would drop it and wait for real issues to show up.

## 3.14.1
>2016-05-12


* fix(retry strategy): retry on timeout was only using two hosts
* fix(errors): provide err.debugData with necessary debugging information
* fix(errors): force AlgoliaSearchError as default name
fixes #241

## 3.14.0
>2016-05-04


* feat(client.search): add strategy, fixes #208
* fix(shuffle): shuffle host array like we did
* feat(filesize): reduce filesize by removing lodash
  All build size down 26% (20kb => 14kb)
  New search-only build "algoliasearchLite[.min].js",
  weights 9.5Kb (down 50% from normal build)
  Also available as require('algoliasearch/lite');
* fix(parse): handle parse cloud env having process.env defined

## 3.13.1
>2016-03-24


* chore(dev): use phantomjs-prebuilt instead of phantomjs
fixes #209

## 3.13.0
>2016-02-23


* feat(initPlaces): add a static algoliasearch.initPlaces method

## 3.12.0
>2016-02-05


* fix(apiKey): put the apiKey in the POST body when feasible and key > 500 chars
* feat(falback): provide opts.useFallback to avoid using JSONP fallback

## 3.11.0
>2016-01-28


* feat(partialUpdateObject): add createIfNotExists option: partialUpdateObject(object, createIfNotExists) https://www.algolia.com/doc/rest#partially-update-an-object
* chore(dev): various fixes to the dev env

## 3.10.2
>2015-12-14


* fix(request strategy): always use XHR first then switch to fallback

  + add fallback for client.search

  Context: before this commit, when a user lost connectivity (or XHR was
  blocked, we cannot distinguish those events in browsers) then we
  forced using JSONP for the whole session.

  This led to a bug where you were stuck in a loop of non-available
  fallback even if connectivity was restored.

  This commit fixes this bug by always trying XHRS and fallbacking to
  JSONP on a per request basis.
* refactor(map): use lodash map instead of custom fn

## 3.10.1
>2015-12-11

* fix(nodejs): consistent timeouts between nodejs versions
  We now use basic setTimeout functionnality instead of
  req.setTimeout in nodejs to avoid inconsistencies between nodejs engines.
  In node 0.10, req.setTimeout was a socket inactivity timeout
  In node > 0.10? req.setTimeout is now a global timeout
  + Node.js timeout is now 30s global per request (then incremental)
  + Fixed an edge case where we had an uncaught exception in nodejs
  + We only support 0.10+ now, node 0.8 never worked

## 3.10.0
>2015-12-08

* feat(gzip): ask the API for gzipped answers (nodejs)

## 3.9.4
>2015-12-04

* fix(process.env): set process back to normal in node v4

## 3.9.3
>2015-12-01

* fix(parse): set default timeout to 7.5s (indexing purposes)

## 3.9.2
>2015-11-02

* feat: react native build beta

## 3.9.1
>2015-11-02

* fix: throw on really bad usage instead of silently failing
* fix: make angular build cache work

## 3.9.0
>2015-10-23

* feat: add similarSearch beta method
* feat: add new way to generate secured api key using query parameters

## 3.8.1
>2015-09-21


* fix: disable chunked encoding on empty body DELETE requests in Node.js

## 3.8.0
>2015-09-01


* test: node v4 is now the default testing env
* fix: always send a unique response to the user
* fix: use `lodash` by default, only use `lodash-compat` when building for the browser
* feat: add client.addAlgoliaAgent() to augment the sent x-algolia-agent
* chore: move all deps to ^version and add a shrinkwrap to allow reproducible builds

## 3.7.8
>2015-09-01


* fix: ignore $http.defaults.headers.common in angular build
* fix: force distinct false in deleteByQuery search
* docs: precise initialization option values

## 3.7.7
>2015-08-27

* fix: listen to socket errors in nodejs keepalive strategy

## 3.7.6
>2015-08-24

* fix: encodeURIComponent(cursor) in browseFrom()

## 3.7.5
>2015-07-23

* fix: withCredentials forced to false in Angular

## 3.7.4
>2015-07-20

* fix: JSON.stringify fix when Array.prototype.toJSON is defined (prototype.js < 1.7 bug)

## 3.7.3
>2015-07-09

* fix: make https over http proxy work

## 3.7.2
>2015-07-08

* fix: remove a git clone dependency on install (debug/ms/yui compressor issue)

## 3.7.1
>2015-07-08

* fix: do not call agent.destroy when there's no such method
* fix: do not rely on any "smart" port computing

## 3.7.0
>2015-06-18

* feat: allow passing `httpAgent` option to the nodejs client
allow more flexible proxy/keepAlive agents in some more complex environments

## 3.6.3
>2015-06-18

* fix: allow getting the debug log from the outside
  will be used by diag tool and possibly anyone aware of https://github.com/visionmedia/debug

## 3.6.2
>2015-06-17

* chore: add window.__algolia for easy debugging anywhere

## 3.6.1
>2015-06-16

* fix: parse cloud build fix
* fix: YUI compressor fix
  fixes #113
* test: automatic parse cloud build testing
* fix: add application id to final error message ("Cannot connect to..")

## 3.6.0
>2015-06-05

* feat: easy commonJS require of plugins
  fixes #109
* test: add dependency-check step in tests
* refactor: use lodash-compat instead of less known/used/shared modules
* chore: use uglifyjs instead of closure compiler
* feat: allow passing hosts as hosts.read, hosts.write
* feat: allow passing Algolia Agent as an option
* fix: CORS simple request for all browser builds
  fixes #111

## 3.5.0
>2015-06-03

* fix: send a descriptive timeout error when it occurs
* chore: add headers debugging
* fix: incremental wait waitTask
  will now wait 100ms * loopTickNumber * loopTickNumber
  fixes #102
* fix: do not use global when we know we will be in a browser
  browserify `global` is not always `window` can be <div id="global"></div>
  fixes #99
* feat: new browse()/browseFrom()/browseAll()
  - `browse(query, queryParameters)` now has the same signature than
  search(). You can use any `query` and `queryParameters`.
  - `browseFrom(cursor)` can be used as an efficient way to
  continue (next page) a previous `browse()` call. All browse responses now have a `cursor` property.
  - `browseAll(query, queryParameters)` can be used to get all
  the content of your index
    It returns an [EventEmitter](https://nodejs.org/api/events.html).

    Available events:
      - `result`
      - `end`
      - `error` (you should listen to it or it will throw)

    There's also `stop()` method on the event emitter so that you can
    stop browsing at any point.

  fixes #101
* fix: support typeahead 0.11
  fixes #105

## 3.4.0
>2015-05-23

* FIX: Remove debugging messages from builds
  fixes #91
  fixes #86
* FIX: Handle badly formatted JSON
  fixes #89
  fixes #90
* FIX: Stop bytes sent/received debug on node 0.12 when socket closes
* test: Test on only 3 browsers in travis
  fixes #61
* test: split desktop/mobile into a travis matrix, reduces travis timeouts
* feat: add client.batch()
* feature: getObjects now accepts attributesToRetrieve:
  signature: getObjects(objectIDs, attributesToRetrieve, callback)
* fix: send `x-algolia-agent` instead of `x-user-agent`
* fix: clone cached results hits sent
  fixes #79
* feat: New parameters for API keys
  Added description, referers, queryParameters
  ref: https://www.algolia.com/changes#released-##
  >2015-05-08
  
* fix: IE11 xhr cache was fixed by adding cache-control: no-cache in API headers
* test: add integration testing and rework the travis tasks

##  3.3.2
>2015-05-14

* FIX: more fixes to the use of $q() in the angular build, now compatible with 1.2.xx and tested

##  3.3.1
>2015-05-12

* FIX: Compatibility with AngularJS old promise implementation
  We now use $q.defer() instead of $q()

##  3.3.0
>2015-05-12

* FEATURE: expose window.algoliasearch = algoliasearch in jquery/angular plugins. So that
you can use the original algoliasearch() implem in plugins. Otherwise you would have to load both

##  3.2.4
>2015-05-11

* FIX: 15s inactivity timeout for nodejs implementation, should help high latency/low connection users
* CHORE: test on iojs2
* CHORE: debugging messages now more focused and less verbose
* PERF: use JSON.stringify only once per request

##  3.2.3
>2015-05-09

* FIX: Parse build requires a charset on requests

##  3.2.2
>2015-05-06

* FIX :  missing require (crypto) for node.js client (#84)

##  3.2.1
>2015-04-29

* add dist/ to npmjs repository, so cdnjs autoupdate works

##  3.2.0
>2015-04-24

* FEATURE: Parse build now uses V3 implementation
* FEATURE: Parse build now returns parse promises. https://parse.com/docs/js_guide#promises
* FEATURE: Automatically handle HTTP_PROXY HTTPS_PROXY environment variables
in Node.js client

##  3.1.0
>2015-04-14

* CHANGE: Node.js will now use http headers instead of inlining them into the api call as browsers are doing
* CHANGE: Ensure all headers (http, querystrings) are lowercased. Both are supported by our API, reduces FUD
* FEATURE: add index.getObjects()
* FEATURE: add index.deleteObjects()
* FIX: waitTask failure case when using promises, was not going through
* FEATURE: add index.deleteByQuery()
* FEATURE (Node.js): add client.enableRateLimitForward()
* FEATURE (Node.js): add client.disableRateLimitForward()
* FEATURE (Node.js): add client.useSecuredAPIKey()
* FEATURE (Node.js): add client.disableSecuredAPIKey()
* BREAKING CHANGE (Node.js): client.setTimeout renamed to client.setRequestTimeout
* TEST: add test around setRequestTimeout
* FEATURE (Node.js): add client.generateSecuredApiKey()
* FEATURE:
  - all clients are now exposing algoliasearch.ua
  - all requests are now sending x-user-agent containing for example 'Algoliasearch for vanilla JavaScript 3.0.7'
* FEATURE: add client.search()
  Search against multiple indices, equivalent of, multipleQueries, or
  startQueriesBatch+addQueryInBatch+sendQueriesBatch
* BREAKING CHANGE (Node.js): removed client.multipleQueries(), use client.search(queries)
* DEPRECIATION (browser): client.startQueriesBatch/addQueryInBatch/sendQueriesBatch
  Use client.search(queries)
* FEATURE: new HA implementation
  We now use two different DNS to perform all requests
  Removed the tld option as it's no more needed nor compatible with having a new HA implementation with different tlds (.com/.net)
* DEPRECIATION: client.addUserKeyWithValidity(), index.addUserKeyWithValidity()
  You can now use client.addUserKey(acls, params, cb), index.addUserKey(acls, params, cb)
* FEATURE: client|index.updateUserKey(key, acls, params, callback)
  Update a user key, provide acls and optional params
* BREAKING CHANGE (Node.js):
  As we now have addUserKey and updateUserKey, we removed:
    - client|index.addUserKeyWithValidityAndIndexes
    - client|index.updateUserKeyWithValidity
    - client|index.updateUserKeyWithValidityAndIndexes
  You can use client|index.addUserKey or client|index.updateUserKey to do
  deal with all you keys needs

##  3.0.7
>2015-04-10

* MIGRATION: throw on V2 .search() usage:
  - .search(query, cb, params)
  - .search(cb, params)
* FEATURE: add client.destroy() in Node.js implementation
  will destroy all keepalived connections and let the process exits if needed

##  3.0.6
>2015-04-03

* FIX: Webpack compatibility by removing packageify
  webpack does not interprets for now node_modules/* browserify transforms
* MISC: add release script

##  3.0.5
>2015-04-02

* FIX: lower the build size by requiring the good version/browser.js in browser
  builds. Previously we got the full `package.json` inlined

##  3.0.4
>2015-04-02

* FIX: Defaults to http when the protocol of the page is not http or
  https
* FIX: XDomainRequests no more aborted in IE9 #76

##  3.0.3
>2015-03-28


* FIX: Handle module loaders + cdn.jsdelivr.net/algoliasearch/latest usage
  When in this situation, the module loader would prevent the code
  detecting and loading the V2 to execute.
  Now fixed by prepending the migration-layer to the browserify bundle.
  It also removes the migration-layer code from the package managers (npm, bower) builds,
  where it makes no sense to have it
* FIX: load V2 using a DOMElement when V3 is loaded ASYNCHRONOUSLY with /latest/
  * tested on all majors browsers:
    Chrome stable
    Firefox stable
    IE 8, 9, 10, 11
  * tested on correponding customer websites
* FIX: better warning messages when using `latest` or trying to use V3 as V2

##  3.0.2
>2015-03-26


* temp /latest/ fix for some clients loading /latest/ in async mode

##  3.0.1
>2015-03-26


* fix npm usage, was missing a dependency

##  3.0.0
>2015-03-25


* V2 users, see the migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x
* BREAKING CHANGES:
  * `new AlgoliaSearch()` => `algoliasearch()` #40
    - The only exported global property is now `algoliasearch`
    - `opts`:
      - `dsnHost` removed, use `hosts:[dsnHost, other hosts]`
      - `dsn` removed, use `hosts:[non-dsn-host, non-dsn-host]`
      - `requestTimeoutInMs` renamed to `timeout`
      - `method` renamed to `protocol`. Protocol should be specified as `http:` or `https:`
      - `hosts` behavior changed, when using custom hosts:
        - no shuffling
        - no dsn host is prepended to the list
    - removed `AlgoliaExplainResults`, no obvious use ATM
    - calling algoliasearch() without an applicationID or apiKey will throw
    - Helper: `new AlgoliaSearchHelper()` => `algoliasearch.helper()`, same function signature
  * no more window.ALGOLIA_VERSION
    - you can find the version in algoliasearch.version
  * all api methods now use the (err, content) convention #43
    It means that instead of doing:
      ```js
        index.search(function found(success, content) {
          if (!success) {
            console.log('Error was:', content);
            return;
          }

          console.log('OK!', content);
        });
      ```
    You must do:
      ```js
        index.search(function found(err, content) {
          if (err) {
            console.log('Error was:', err);
            return;
          }

          console.log('OK!', content);
        });
      ```
    This is in par with most asynchronous APIS accepted/de vfacto conventions.
    It helps being compatible with control flow libraries like `async` and
    helps reduce WTF moments of Node.JS developers used to cb(err, content)
  * client.getLogs(cb[, offset, length]) is now .getLogs([offset, length, cb])
  * client.listIndexes(cb[, page]) => .listIndexes([page, cb])
  * client|index.addUserKeyWithValidity(acls, validity, maxQueriesPerIPPerHour, maxHitsPerQuery, cb) => client|index.addUserKeyWithValidity(acls, params, cb) where params = {validity:, maxQueriesPerIPPerHour:, maxHitsPerQuery:}
  * client.sendQueriesBatch(cb, delay) => client.sendQueriesBatch(cb)
  * index.addObject(content[, callback, objectID]) => index.addObject(content[, objectID, callback])
  * index.getObject(objectID[, callback, attributes]) => index.getObject(objectID[, attrs, callback])
  * index.search(query, callback[, params, delay]) => index.search(query[, params callback]) or index.search(params[, cb]) with params = {query: 'some thing'}
    We removed the delay option which should really be implemented by the module consumer. It's really a throttle/debounce of the search functions
  * index.browse(page, cb[, hitsPerPage]) => index.browse(page[, hitsPerPage, cb])
  * no more opts.jsonp in algoliasearch()
    Previously used as a way to force/disable jsonp. The request strategy is now more robust and does not
    requires jsonp: param
    * JSON2.js is no more included in the main build.
      If you need to support IE7 <= or IE8 quirks, add this:
        ```html
        <!--[if lte IE 7]>
        <script src="//cdn.jsdelivr.net/json2/0.2/json2.min.js"></script>
        <![endif]-->
        ```
    * removed AlgoliaSearchHelper
      Please see https://github.com/algolia/algoliasearch-helper-js if you need the helper
  * NEW FEATURES:
    * UMD compatibiliy #41
      - algoliasearch can now be used with any module loader
      - build is now done with browserify
      - no more grunt
  * All calls are now returning promises #45
    If there's a callback given to an API call, you won't get a promise.
    Here are the different promises implementations we use:
    - Native promises by default (https://github.com/jakearchibald/es6-promise/)
    - AngularJS promises for AngularJS plugin
    - jQuery promises for jQuery plugin
* FIXES:
  * do not retry when server sends 4xx or 1xx
  * distinguish jQuery/AngularJS request timeouts from errors and thus retry when timeout
  * JSONP fallback when jQuery/AngularJS request error
* MISC:
  * Externalize plugins and request implementations
  * some linting fixes
  * test suite, including request strategy test suite
  * IE10 should now behave as a CORS supported XMLHttpRequest browser, as it is
  * running tests on many browsers, using saucelabs
  * removed vendor/
    - vendor/json2.js
    - vendor/jquery.typeahead.js now on cdnjs (examples)

##  2.9.2
>2015-02-03

* Fixed calls to `.search(function() {})`, `.search(null, function() {})`, `.search(undefined, function() {})
* Fixed shared cache amongst instances

##  2.9.1
>2015-02-03

* Fixed listIndexes pagination, not working if page=0

##  2.9.0
>2015-01-13

* Angular.js & jQuery compatibility (returning promises)
* Helper: ability to exclude facets

##  2.8.6
>2015-01-13

* Search helper: ability to set default facet filters

##  2.8.5
>2015-01-07

* Avoid CORS preflight request

##  2.8.4
>2014-12-31

* Fixed a bug in JSONP fallback on multi-queries and getObject when a secured API Key was used (X-Algolia-TagFilters parameter was not set, resulting in a 403 permission denied error)

##  2.8.3
>2014-12-30

* Helper optimization: number of nested queries is now driven by the number of refined disjunctive facets only

##  2.8.2
>2014-12-23

* Increase the request timeout after each retry

##  2.8.1
>2014-12-09

* Enabled DSN by default (is working even if only one datacenter is selected)

##  2.8.0
>2014-11-28

* Move to algolia.net by default

##  2.7.5
>2014-11-25

* Expose one option to select the TTL (prepare migration to .net, allow to gain some milliseconds compared to .io)

##  2.7.4
>2014-11-12

* Expose more options (jsonp & requestTimeoutInMs)
* Change the way the JSONP fallback works

##  2.7.3
>2014-10-29

* Reintroduced Algolia Custom Headers (X-Algolia-*) on queries. It was removed to try to remove the CORS OPTIONS query but this has no impact because this is a POST action.

##  2.7.2
>2014-10-27

* Fixed browse method (author @muertet)

##  2.7.{0,1}
>2014-10-15

* Refactor the AlgoliaSearch constructor to allows optional/named arguments

##  2.6.6
>2014-10-07

* Fixed bower integration

##  2.6.5
>2014-09-26

* Optimize disjunctive queries that were retrieving useless attributes

##  2.6.4
>2014-09-23

  * Fixed CORS handling issue on IE8/IE9

##  2.6.3
>2014-09-23

  * Fixed IE11-based AJAX calls

##  2.6.2
>2014-09-20

  * Updated package manager description files: npm and jsdelivr

##  2.6.1
>2014-09-20

  * Fixed JSONP call: 'X-Algolia-TagFilters' and 'X-Algolia-UserToken' were not included in the URL.

##  2.6.0
>2014-09-06

  * Improved retry strategy with implementation of a timeout on network call.
    Upgrade to this version is highly recommended

##  2.5.4
>2014-09-04

* Removed the OPTIONS request for the first isalive query of for all search queries

##  2.5.3
>2014-07-23

* AlgoliaSearchHelper: add missing getIndex/setIndex
* listIndexes is now paginable

##  2.5.2
>2014-06-05

* AlgoliaSearchHelper: add getter/setter methods

##  2.5.1
>2014-05-14

* Fixed listIndexes call (trailing slash not compatible with our API anymore)

##  2.5.0
>2014-05-09

* If CORS is not available, use JSONP

##  2.4.7
>2014-04-23

* Ability to instantiate multiple AlgoliaSearchHelper

##  2.4.6
>2014-04-05

* Fixed IE 8/9 support of secured API keys

##  2.4.5
>2014-03-30

* Improved AlgoliaExplainResults helper handling array-based attributes as well.

##  2.4.4
>2014-03-19

* Improved the `waitTask` method, ensuring it sleeps 100ms before recalling the API.

##  2.4.3
>2014-03-12

* Removed invalid character from source code (could cause a parse error in IE8/9)

##  2.4.2
>2014-02-24

* Added support of secured API Key (SecurityTags & UserToken headers)

##  2.4.1
>2014-02-18

* Removed dependency on jquery

##  2.4.0
>2014-02-10


* Move to official Typeahead.js release (0.10.1)
* Remove getTypeAheadTransport* functions

##  2.3.8
>2014-01-16


* Ability to customize getTypeAheadTransport parameters once instantiated

##  2.3.7
>2014-01-08


* Remove extra encodeURI
* Travis integration

##  2.3.6
>2014-01-06


* Missing encodeURI
* Added "distinct" documentation

##  2.3.5
>2013-12-06


* Added browse methods

## 2.3.4-1
>2013-12-04


* Fixed IE9 bug while reading onload's event
* Here and there typos

## 2.3.0
>2013-11-07


* Added new ACL features (maxQueriesPerIPPerHour & maxHitsPerQuery)

## 2.2.0
>2013-11-07


* Added clearIndex method

## 2.1.0
>2013-11-03


* Auto-detect protocol to used based on current location
* Added auto-complete & instant-search examples

## 2.0.1
>2013-10-15


* Gruntification
* Embed typeahead.js