Advantages of using :single_index?

Hi all,

Google returns two results for this:
http://www.google.ca/search?q=acts_as_ferret+shared_index+option&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:fr:official&client=firefox-a

Both point to the ChangeLog, so I don’t really know if anybody used a
shared index. From the RDoc, I know the option makes AAF “use a
Ferret index that is shared by all classes…” What would be the
advantages / disadvantages of doing so ?

We’re using a DRb Server to handle the search with multiple Mongrel
receiving the queries.

Thanks !

François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/

On Apr 6, 2007, at 19:15, François Beausoleil wrote:

Both point to the ChangeLog, so I don’t really know if anybody used a
shared index. From the RDoc, I know the option makes AAF “use a
Ferret index that is shared by all classes…” What would be the
advantages / disadvantages of doing so ?

We’re using a DRb Server to handle the search with multiple Mongrel
receiving the queries.

it’s basically about speed… the bigger your index gets, the better it
might be to have separate indexes. it also depends on your
queries, if you do single-model-searches or cross-model-searches
most of the time…

If your database isn’t that huge and/or you do a lot of searches
over all models (multi searches), you might want to use the
single_index… it might speed up searching but might also slow
down indexing…

so the real answer is: it depends :slight_smile:

Ben

Hello Benjamin,

2007/4/6, Benjamin K. [email protected]:

If your database isn’t that huge and/or you do a lot of searches
over all models (multi searches), you might want to use the
single_index… it might speed up searching but might also slow
down indexing…

Well, that was exactly what I wanted to know. We’re basically going
to use the index to do multi model searches exclusively, so my
answer’s right there.

Thanks !

François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/