Search code examples
graphdb

Rebuilding autocomplete index after having erased a repository in GraphDB


I'm trying to rebuild the autocomplete index after having updated a repository in GraphDB.

I deleted all statements with the REST API (not the repo, just its content):

curl -X DELETE http://localhost:7200/repositories/my_repo/statements

And then I reloaded other statements from a file in a similar fashion:

curl -X POST -H "Content-Type:application/x-turtle" \\
-T my_file.ttl http://localhost:7200/repositories/my_repo/statements

After that, I rebuilt the autocomplete index through the workbench.

It seemed the right way, but it didn't work. For example, if I go in the visual graph section, also old items are proposed in the drop-down list as valid options, even if they are not present anymore. It's kind of like old entries are still present in the index. How can I align the index to current items?


Solution

  • A way to rebuild the autocomplete index is to delete its folder, located in /data/repositories/your_repo/storage/autocomplete. The next time you initiate GraphDB you will need to enable again autocomplete.