On 7/31/06, Pedro Côrte-Real <[EMAIL PROTECTED]> wrote:
> I'm using acts_as_ferret to index one of my rails models. Right after I
> start the app the first request that orders by some ferret field will
> take very long. Subsequent ones seem to be fast. I guess some caching is
> going on. Any tips on solving this?
>
> Pedro.

You guessed correctly. The sort fields are cached. You can easily
preload the cache by running a search when you start up your app. You
should also be careful what fields you sort on. You should only sort
on untokenized fields. You can also speed up sorting by dates by
lowering the precision that you use. For example, if you are storing
the date with time to the nearest second, eg 2006-08-01 10:13:24 you
may get a much faster sort by only storing up to the nearest day, ie
2006-08-01. By the way, what kind of times are we talking about here?

Cheers,
Dave
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to