On Mon, 2006-07-31 at 19:17 +0900, David Balmain wrote: > 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.
Is it ok if the field isn't stored in the index? Anyone know how to set a field to be untokenized in acts_as_ferret? > 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. I'm only using dates so it should be alright. > By the way, what kind of times are we talking about here? 300 seconds for a 100MB index. Pedro. _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

