How to truncate the vector database?
marijnl opened this issue · 6 comments
Hi @marijnl, could you please give me more details on this issue? What kind of truncation are you pointing to?
No activity, closing. Please reopen if the issue persists.
What I mean is how to truncate the vector and document database? Its a bit cumbersome to test indexing if I cant empty the databases easily. Maybe someone can provide us with a way to connect a database explorer to both dbs?
Here is a quick and dirty solution to truncate the dbs.
Dont know if all traces are gone now but seems to work
docker exec -it <container_id> bash # spawn root shell within aquiladb docker
pm2 stop all # stop all services
rm -rf /data/* # remove database data
pm2 start all # start all services again
@marijnl, if you are looking forward to take down the whole database after / for quick experimentation, you actually don't need to run commands inside the container itself. Just take down the running container and spin off a new one. Do not mount any host system volume to the container when you're doing it.
to stop a container: docker stop <container id>
to delete a stopped container: `docker rm '
to cleanup unused volumes (temporary ones created during your experimentation): docker volume prune
to spin off a container without a mount volume: docker run -d -i -p 50051:50051 -t ammaorg/aquiladb:latest
Above commands will work but it doesn't delete the document database, which will cause unwanted behaviors in the long run.
Yes you're right, thats much better solution