Using the index_factory in python, I'm not sure how you would create an exact index using the inner product metric. According to this page in the wiki, the index string for both is the same. I already added some vectors to an exact index (it also uses PCA pretransform) using the L2 metric, then tried changing the metric type on the index itself - the distance results were the same before and after. Do I need to create and train the index, then change the metric type before adding any vectors?
OS: Linux
Faiss version: v1.2.1
Faiss compilation options: installed with Conda
Running on :
N/A
index_factory takes a second optional argument for the metric type. I believe the Python bindings would pass the parameter through with something like this:
index = faiss.index_factory(16, "Flat", faiss.METRIC_INNER_PRODUCT)
Closing this, as @Enet4 solved it. Feel free to keep commenting if you have related questions.
Most helpful comment
index_factorytakes a second optional argument for the metric type. I believe the Python bindings would pass the parameter through with something like this: