This is a simple project which reads files in the directory mentioned in the config file and indexes it. This then can be used to search the files present in the directory.
This is a way of trying to index the logs file in dgplug so that we can easily find the files in which a word has occured in the file.
This assumes that you have
Go installed and setup
All dependecies are added in
dep and we need to make sure we install
fresh although it is already added to the lock.
We need to make a directory that has to be indexed and put few files in it.
Put that as the
RootDirectory in the
I create a
log directory and put it in the conf.
For development purpose you can run
go run main.go
Now you need to create the index first so visit
Then you can search the file with
cd in the directory and run
fresh -c fresh.conf
This will run the server and start watching for any changes in the file, it does two things hot-reloading and auto-indexing.