Skip to content

Commit

Permalink
Added toubleshooting case
Browse files Browse the repository at this point in the history
  • Loading branch information
Patco96 committed Oct 25, 2022
1 parent 9fa9e6d commit fe45075
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ es_indices = es.list_indices()
db_indices = Query(ElasticSearchIndexModel).get()
```

`es_indices` and `db_indices` should be the same. If they aren't, you can delete the index from Elasticsearch and add it again to the database.
`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
Expand All @@ -47,6 +49,15 @@ 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 fe45075

Please sign in to comment.