FaissMetricType

Some algorithms support both an inner product version and a L2 search version.

Values

ValueMeaning
METRIC_INNER_PRODUCT0

< maximum inner product search

METRIC_L21

< squared L2 search

METRIC_L12

< L1 (aka cityblock)

METRIC_Linf3

< infinity distance

METRIC_Lp4

< L_p distance, p is given by metric_arg

METRIC_Canberra20

some additional metrics defined in scipy.spatial.distance

METRIC_BrayCurtis21
METRIC_JensenShannon22

Meta