# Faiss

## Description

The [Faiss](https://github.com/facebookresearch/faiss) online store provides support for materializing feature values and performing vector similarity search using Facebook AI Similarity Search (Faiss). Faiss is a library for efficient similarity search and clustering of dense vectors, making it well-suited for use cases involving embeddings and nearest-neighbor lookups.

## Getting started

In order to use this online store, you'll need to install the Faiss dependency. E.g.

`pip install 'feast[faiss]'`

## Example

{% code title="feature\_store.yaml" %}

```yaml
project: my_feature_repo
registry: data/registry.db
provider: local
online_store:
  type: feast.infra.online_stores.faiss_online_store.FaissOnlineStore
  dimension: 128
  index_path: data/faiss_index
  index_type: IVFFlat    # optional, default: IVFFlat
  nlist: 100             # optional, default: 100
```

{% endcode %}

**Note:** Faiss is not registered as a named online store type. You must use the fully qualified class path as the `type` value.

The full set of configuration options is available in [FaissOnlineStoreConfig](https://rtd.feast.dev/en/master/#feast.infra.online_stores.faiss_online_store.FaissOnlineStoreConfig).

## Functionality Matrix

The set of functionality supported by online stores is described in detail [here](/reference/online-stores/overview.md#functionality). Below is a matrix indicating which functionality is supported by the Faiss online store.

|                                                           | Faiss |
| --------------------------------------------------------- | ----- |
| write feature values to the online store                  | yes   |
| read feature values from the online store                 | yes   |
| update infrastructure (e.g. tables) in the online store   | yes   |
| teardown infrastructure (e.g. tables) in the online store | yes   |
| generate a plan of infrastructure changes                 | no    |
| support for on-demand transforms                          | yes   |
| readable by Python SDK                                    | yes   |
| readable by Java                                          | no    |
| readable by Go                                            | no    |
| support for entityless feature views                      | yes   |
| support for concurrent writing to the same key            | no    |
| support for ttl (time to live) at retrieval               | no    |
| support for deleting expired data                         | no    |
| collocated by feature view                                | yes   |
| collocated by feature service                             | no    |
| collocated by entity key                                  | no    |
| vector similarity search                                  | yes   |

To compare this set of functionality against other online stores, please see the full [functionality matrix](/reference/online-stores/overview.md#functionality-matrix).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.feast.dev/reference/online-stores/faiss.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
