Hi Pete
Everything looks right there. What's the output when you create a new
post from script/console on the server? Do you see any indexing output
from Sphinx? If so, seems like everything is set up correctly, and a
likely cause is that the PATH isn't quite right for passenger by
default so it can't find the indexer binary when within a normal web
request.
You may need to set bin_path in your config/sphinx.yml file to
wherever indexer is located (which can be checked by running `which
indexer` in the command line on the server).
Cheers
--
Pat
On 10/07/2009, at 4:02 AM, praethorian wrote:
>
> Hey everybody,
>
> I really do like ts plugin and I am trying to work it out how to set
> up my app to index my posts as soon as they are posted.
>
>
> DEPLOY.rb
> task :after_update_code, :roles => [:app, :db] do
> # link database configuration
> run "ln -nfs #{shared_path}/config/database.yml #{release_path}/
> config/database.yml"
> run "cd #{current_path} && rake ts:stop"
> end
>
> desc "Stop the webserver with the old release and start the server for
> the new release"
> namespace :deploy do
> task :restart, :roles => :app do
> run "cd #{current_path} && rake ts:index && rake ts:start"
> run "/usr/local/etc/rc.d/mongrel_cluster restart"
> end
> end
>
> -----------------------------------------------------------
>
> POST model
> define_index do
> # fields
> indexes title, :as => :post_title, :sortable => true
> indexes body, :as => :post_body
> indexes annotation, :as => :post_annotation
> indexes user.username, :as => :author, :sortable => true
>
>
> # attributes
> has user_id
> has editorial, :as => :editorial
> has for_public, :as => :public
>
> set_property :delta => true
> #set_property :delta => {:field => :updated_on, :threshold =>
> 1.day}
> end
>
> ---------------------------------------------------------
>
> I've added delta to my post table in DB.
>
>
> all works fine, but all my new posts are searchable after when I
> deploy my app (ts:index), but I would like to be indexed straightaway
> after they were created.
> Are there any bits and pieces I am missing? Any help would be
> appreciated. Thank you very much.
>
> Cheers,
> Pete
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---