Repository: erikbern/ann-benchmarks
Issue: Does hnswlib support cosine?
Root cause: Documentation Deficiency

https://github.com/erikbern/ann-benchmarks/blob/3aedc8a314aba1c7d42b64e7ff9f3944e6822a93/ann_benchmarks/algorithms/hnswlib.py#L17
 
it says l2 is only supported right now,but some results given include hnswlib in angular datasets

Given the explicit mapping 

https://github.com/erikbern/ann-benchmarks/blob/3aedc8a314aba1c7d42b64e7ff9f3944e6822a93/ann_benchmarks/algorithms/hnswlib.py#L11

the comment seems obsolete. @yurymalkov knows the details.

the recall of hnswlib calculated by cosine is almost near 1, i'm afraid that i
got something wrong 

Yes. The comment is obsolete. Sorry for that.

> Yes. The comment is obsolete. Sorry for that.
But the results using 'angular' are strange,  any other place should i  modify?
Computing knn metrics
 18:                                       hnswlib ({'M': 48, 'efConstruction': 500})        0.999     5071.112
Computing knn metrics
 19:                                       hnswlib ({'M': 96, 'efConstruction': 500})        0.999     4770.435
Computing knn metrics
 20:                                       hnswlib ({'M': 24, 'efConstruction': 500})        0.999     5865.324
Computing knn metrics
 21:                                       hnswlib ({'M': 96, 'efConstruction': 500})        0.999     4783.114
Computing knn metrics
 22:                                       hnswlib ({'M': 24, 'efConstruction': 500})        0.999     5938.484
Computing knn metrics
 23:                                       hnswlib ({'M': 48, 'efConstruction': 500})        0.999     5134.158
Computing knn metrics
 24:                                       hnswlib ({'M': 48, 'efConstruction': 500})        0.999     5126.021
Computing knn metrics
 25:                                       hnswlib ({'M': 24, 'efConstruction': 500})        0.999     6026.878
Computing knn metrics
 26:                                       hnswlib ({'M': 48, 'efConstruction': 500})        0.999     5100.455
Computing knn metrics
 27:                                       hnswlib ({'M': 48, 'efConstruction': 500})        0.999     5100.383
Computing knn metrics
 28:                                       hnswlib ({'M': 48, 'efConstruction': 500})        0.999     4897.699
Computing knn metrics
 29:                                       hnswlib ({'M': 96, 'efConstruction': 500})        0.999     4701.244
Computing knn metrics
 30:                                       hnswlib ({'M': 12, 'efConstruction': 500})        0.996     8373.049
Computing knn metrics
 31:                                       hnswlib ({'M': 96, 'efConstruction': 500})        0.999     4560.704
Computing knn metrics
 32:                                       hnswlib ({'M': 96, 'efConstruction': 500})        0.999     4781.114
Computing knn metrics
 33:                                       hnswlib ({'M': 96, 'efConstruction': 500})        0.999     4775.249
Computing knn metrics
 34:                                       hnswlib ({'M': 96, 'efConstruction': 500})        0.999     4763.902
Computing knn metrics
 35:                                       hnswlib ({'M': 24, 'efConstruction': 500})        0.999     6049.380
Computing knn metrics
 36:                                       hnswlib ({'M': 12, 'efConstruction': 500})        0.996     8376.394
Computing knn metrics
 37:                                       hnswlib ({'M': 48, 'efConstruction': 500})        0.999     5112.205
Computing knn metrics
 38:                                       hnswlib ({'M': 24, 'efConstruction': 500})        0.999     5962.867
Computing knn metrics
 39:                                       hnswlib ({'M': 12, 'efConstruction': 500})        0.996     8246.157
Computing knn metrics
 40:                                       hnswlib ({'M': 12, 'efConstruction': 500})        0.996     8281.041
Computing knn metrics
 41:                                       hnswlib ({'M': 12, 'efConstruction': 500})        0.996     7552.361
Computing knn metrics
 42:                                       hnswlib ({'M': 24, 'efConstruction': 500})        0.999     5766.260
Computing knn metrics
 43:                                       hnswlib ({'M': 12, 'efConstruction': 500})        0.996     7962.226
Computing knn metrics
 44:                                       hnswlib ({'M': 12, 'efConstruction': 500})        0.996     8349.921
Computing knn metrics
 45:                                       hnswlib ({'M': 24, 'efConstruction': 500})        0.999     6074.580