Skip to content

Instantly share code, notes, and snippets.

@mdouze
Created August 1, 2019 15:41
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdouze/e4bdb404dbd976c83fe447e529e5c9dc to your computer and use it in GitHub Desktop.
Save mdouze/e4bdb404dbd976c83fe447e529e5c9dc to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CaucherWang
Copy link

IndexFlatIP finds the minimum IP distance instead of the maximum. What if I want to find maximum IP similarity neighbors? Note that IP can be negative and positive, querying with the opposite vector will return the largest negative ones.

@mdouze
Copy link
Author

mdouze commented Sep 26, 2023

IndexFlatIP returns the maximum IP distances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment