Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.08 KB

README.md

File metadata and controls

34 lines (22 loc) · 1.08 KB

go-faiss

Go Reference

Go bindings for Faiss, a library for vector similarity search.

Install

First you will need to build and install Faiss:

git clone https://github.com/facebookresearch/faiss.git
cd faiss
cmake -B build -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_C_API=ON -DBUILD_SHARED_LIBS=ON .
make -C build
sudo make -C build install

Building will produce the dynamic library faiss_c. You will need to install it in a place where your system will find it (e.g. /usr/lib on Linux). You can do this with:

sudo cp build/c_api/libfaiss_c.so /usr/lib

Now you can install the Go module:

go get github.com/DataIntelligenceCrew/go-faiss

Usage

API documentation is available at https://pkg.go.dev/github.com/DataIntelligenceCrew/go-faiss. See the Faiss wiki for more information.

Examples can be found in the _example directory.