Skip to content

Commit

Permalink
Merge pull request #10 from pentoai/troubleshoot-inconsistencies
Browse files Browse the repository at this point in the history
Updated README
  • Loading branch information
CarolinaHam authored Oct 25, 2022
2 parents 5f56eb0 + fe45075 commit 6218318
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ To set up the demo, run the following command:
vectory demo
```

You can specify the demo dataset with the `dataset_name` argument. See `vectory demo --help` for more information.
You can specify the demo dataset by adding the name as the next argument. See `vectory demo --help` for more information.


<p align="center">
Expand Down
35 changes: 35 additions & 0 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,41 @@ sqlite3.OperationalError: database is locked
```
Just stop the running instance of Vectory and try again.


### Index already exists

If adding an index to the database fails in a way we haven't anticipated, it might happen that the index is loaded in Elasticsearch but not in the database. This can be checked by comparing the indices on both places:

```python
from vectory.db.models import ElasticSearchIndexModel, Query
from vectory.es.client import ElasticKNNClient

es = ElasticKNNClient()
es_indices = es.list_indices()

db_indices = Query(ElasticSearchIndexModel).get()
```

`es_indices` and `db_indices` should be the same.

If the index is on Elasticsearch but not in the database, delete it from Elasticsearch and try again.

```python
from vectory.es.client import ElasticKNNClient

es = ElasticKNNClient()
es.delete_index(INDEX_NAME)
```

If the index is in the database but not on Elasticsearch, delete it from the database and try again.

```
from vectory.db.models import ElasticSearchIndexModel, Query
index = Query(ElasticSearchIndexModel).get(name=INDEX_NAME)[0]
index.delete_instance(recursive=False)
```

## Import errors

### No module `pkg_resources`
Expand Down

0 comments on commit 6218318

Please sign in to comment.