Skip to content

FAISS in OpenSearch: Support HNSW for cosine #2913

@tstadel

Description

@tstadel

As a user I want to use FAISS's HNSW for cosine similarity too with OpenSearchDocumentStore.

According to https://opensearch.org/docs/latest/search-plugins/knn/knn-index/ FAISS plug-in only supports dot product and l2. So we have to normalize vectors before indexing/searching.

  • normalize vectors manually at index time
  • normalize vectors manually at query time
  • use dot_product space under the hood

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions