Hi Erik,

I did consider this but I think having separate indexes per locale is 
slightly cleaner and seemed a more logical approach to me. A rebuild can 
be ordered for one locale without having to affect the other indices. 
The overhead of switching indices when the locale changes is minimal, 
and no filtering is required so it should be slightly faster as well 
overall. Also each individual index is only as large as the data 
available in that locale.

In my particular case I'm using a single index and searching through 
multiple models at the same time. Since my application uses 4 locales, I 
have 4 indices, one shared index per locale. I think perhaps that if 
one-index-per-model schema is used then storing the locale within each 
record is perhaps a better option.

Another advantage I see to this is that if this becomes a part of 
acts_as_ferret then most users will have to do very little to have 
localised ferret searching.

This works well for my use-case but I'd add both possibilities to the 
acts_as_ferret documentation.

Regards,

Saimon

Erik Hatcher wrote:
> Did you consider using a single index, but add a locale field to
> every record to allow easy filtering by selected locale?  If so, what
> are the advantages to separate indexes?
> 
>   Erik


-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to