--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: faiss excerpt: | DuckDB Community Extensions Provides access to faiss indices from DuckDB. extension: name: faiss description: Provides access to faiss indices from DuckDB. version: 0.12.2 language: C++ build: cmake license: MIT maintainers: - JAicewizard - arjenpdevries excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads" requires_toolchains: "fortran;omp" repo: github: "duckdb-faiss-ext/duckdb-faiss-ext" ref: "c8fb12d213fc232c98c61f8b230cfa13c52c6f26" docs: hello_world: | -- Generate semi-random input data and queries -- Note that the dimensionality of our data will be 5 CREATE TABLE input AS SELECT i AS id, apply(generate_series(1, 5), j-> CAST(hash(i*1000+j) AS FLOAT)/18446744073709551615) AS data FROM generate_series(1, 1000) s(i); CREATE TABLE queries AS SELECT i AS id, apply(generate_series(1, 5), j-> CAST(hash(i*1000+j+8047329823) AS FLOAT)/18446744073709551615) AS data FROM generate_series(1, 10) s(i); -- Create the index and insert data into it CALL FAISS_CREATE('name', 5, 'IDMap,HNSW32'); CALL FAISS_ADD((SELECT id, data FROM input), 'name'); -- On linux, with cuda, we can move the index to the GPU -- CALL FAISS_TO_GPU('name', 0); -- Get 10 results with uneven id SELECT id, UNNEST(FAISS_SEARCH_FILTER('name', 10, data, 'id%2==1', 'rowid', 'input')) FROM queries; -- Get 10 results with even id SELECT id, UNNEST(FAISS_SEARCH_FILTER('name', 10, data, 'id%2==0', 'rowid', 'input')) FROM queries; -- Get 10 results SELECT id, UNNEST(FAISS_SEARCH('name', 10, data)) FROM queries; extended_description: | The FAISS extension allows DuckDB users to store vector data in faiss, and query this data, making reliable vector search more accessible. On all linux platforms, this platform also supports GPU indexes, you can move a supported index to the GPU using `CALL FAISS_MOVE_GPU({index_name}, {gpu number})`. Currently only CUDA is supported, note that GPU support may be split into a separate extension in the future. Some (most) indices are not supported for gpus, however this is very easily resolvable. Please open an issue over at our repository in order to get this resolved! extension_star_count: 33 extension_star_count_pretty: 33 extension_download_count: 2964 extension_download_count_pretty: 3.0k image: '/images/community_extensions/social_preview/preview_community_extension_faiss.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ✅ | ❌ | ✅ | ✅ | ✅ | | Linux ARM64 | ✅ | ❌ | ✅ | ✅ | ✅ | | macOS AMD64 | ❌ | ❌ | ✅ | ✅ | ❌ | | macOS ARM64 | ✅ | ❌ | ✅ | ✅ | ✅ | | Windows AMD64 | ✅ | ❌ | ✅ | ✅ | ✅ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions | function_name | function_type | description | comment | examples | |-------------------------|---------------|-------------|---------|----------| | __faiss_create_mask | table | NULL | NULL | | | faiss_add | table | NULL | NULL | | | faiss_create | table | NULL | NULL | | | faiss_create_params | table | NULL | NULL | | | faiss_destroy | table | NULL | NULL | | | faiss_load | table | NULL | NULL | | | faiss_manual_train | table | NULL | NULL | | | faiss_save | table | NULL | NULL | | | faiss_search | scalar | NULL | NULL | | | faiss_search_filter | scalar | NULL | NULL | | | faiss_search_filter_set | scalar | NULL | NULL | | | faiss_to_gpu | table | NULL | NULL | | ### Overloaded Functions This extension does not add any function overloads. ### Added Types This extension does not add any types. ### Added Settings This extension does not add any settings.