Ferret and capistrano, how to keep the indexes?


#1

Hi, i’m using capistrano to deploy the application, but every time i
deploy it change all the directory, so i lost also the ferret’s indexes.
Is it possible to keep them in order to prevent the reindex on each
deploy?


#2

sure, put the ferret index directory in the capistrano shared directory,
and have capistrano symlink it in. The same way the log/ and tmp/
directories are handled.

Example:
In my deploy.rb file, I added (edited) :

desc “Set up the shared index”
task :after_setup, :roles => [:app, :web] do
run “mkdir -p -m 777 #{shared_path}/index”
end

desc “symlink the index”
task :after_update, :roles => [:app, :web] do
run “ln -nfs #{shared_path}/index #{current_release}/index”
end

Alain


#3

sure, put the ferret index directory in the capistrano shared directory,
and have capistrano symlink it in. The same way the log/ and tmp/
directories are handled.

John.

On Fri, 2007-06-15 at 15:21 +0200, mike wrote:

Hi, i’m using capistrano to deploy the application, but every time i
deploy it change all the directory, so i lost also the ferret’s indexes.
Is it possible to keep them in order to prevent the reindex on each
deploy?


http://johnleach.co.uk