Scout indexing artifacts (`.index-shm`, `.index-wal`): should I .gitignore?
I reindex my key model after generating some mock data. As a result, two files appeared, storage.model.index-shm and storage/index-wal. They are considered untracked by Git, as they are not in .gitignore.
I tried to find some examples of .gitignore files related to Scout, but I didn't find any of these unusual extensions in these examples. I guess I am using TNT search.
My question is: Are these files supposed to be source-controlled? I would guess they aren't, because they are tightly coupled with database data, but not the app itself. Am I right? Thanks a lot.
No, these files should not be source-controlled as they are specific to the search index and not the application code. It is recommended to add them to the .gitignore file to avoid unnecessary commits and clutter in the repository.
To ignore these files in Git, add the following lines to your .gitignore file:
/storage/*.index-shm
/storage/*.index-wal
This will ignore any .index-shm and .index-wal files in the storage directory.