Index_dir path


#1

Hi,

I am running several applications, and I need them to share their
indexed data. So instead of putting my index in the default location of

RAILS_ROOT/index/RAILS_ENV

I want it to appear in

RAILS_ROOT/…/index/RAILS_ENV

(ie in the parent directory of each of my root directories … I have
three apps working together)

In the acts_as_ferret file, I have changed line 73 to: index_base =
“#{RAILS_ROOT}/…/index”

In my console, I can see that the new path is reflected properly.

MyModel.class_index_dir
=> “./script/…/config/…/config/…/…/index/development/MyModel”

However, the index is STILL placed in the default location of
RAILS_ROOT/index/RAILS_ENV

Any ideas … ?

Thanks
Joerg


#2

Hi Joerg,

On Thu, Apr 20, 2006 at 05:39:11PM +0200, Joerg D. wrote:
[…]

In my console, I can see that the new path is reflected properly.

MyModel.class_index_dir
=> “./script/…/config/…/config/…/…/index/development/MyModel”

However, the index is STILL placed in the default location of
RAILS_ROOT/index/RAILS_ENV

Any ideas … ?

just guessing, maybe your running app doesn’t use your patched
acts_as_ferret.rb ?

I just tried to reproduce the problem, but everything worked fine here.

regards,
Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer removed_email_address@domain.invalid
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66


#3

Just did an SVN update now, and I am still having the same problem.
Maybe I was a bit vague … Basically, I want this structure:

index
production
content
development
content
myapp_1
app
components
config
db
doc
lib

myapp_2
app
components
config
db
doc
lib

As opposed to having the index folder inside each application. For this
I changed line 73 (inacts_as_ferret) to

index_base = “#{RAILS_ROOT}/…/index”

This should work … but it still creates the index folder inside the
application folder. Using the console, however, reveals that it has
picked up this index_base change - but seems to be ignoring it.

I’m running XP. Let me know if I can give you any more information.

Thanks
Joerg

On Thu, Apr 20, 2006 at 05:39:11PM +0200, Joerg D. wrote:
[…]

In my console, I can see that the new path is reflected properly.

MyModel.class_index_dir
=> “./script/…/config/…/config/…/…/index/development/MyModel”