Skip to content

Commit

Permalink
Revert "Add Save&Load section under FAISSDocumentStore"
Browse files Browse the repository at this point in the history
This reverts commit 4466140.
  • Loading branch information
ZanSara committed Sep 20, 2021
1 parent 4466140 commit 2da9986
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions docs/latest/components/document_store.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,36 +63,6 @@ from haystack.document_store import FAISSDocumentStore
document_store = FAISSDocumentStore(faiss_index_factory_str="Flat")
```

#### Save & Load

FAISS document stores can be saved to disk and reloaded:

```python
from haystack.document_store import FAISSDocumentStore

document_store = FAISSDocumentStore(faiss_index_factory_str="Flat")

# Generates two files: my_faiss_index.faiss and my_faiss_index.json
document_store.save("my_faiss_index.faiss")

# Looks for the two files generated above
new_document_store = FAISSDocumentStore.load("my_faiss_index.faiss")

assert new_document_store.faiss_index_factory_str == "Flat"
```

While `my_faiss_index.faiss` contains the index, `my_faiss_index.json`
contains the parameters used to inizialize it (like `faiss_index_factory_store`).
This configuration file is necessary for `load()` to work. It simply contains
the initial parameters in a JSON format.
For example, a hand-written configuration file for the above FAISS index could look like:

```json
{
faiss_index_factory_store: 'Flat'
}
```

<div style={{ marginBottom: "3rem" }} />

### In Memory
Expand Down

0 comments on commit 2da9986

Please sign in to comment.