Carl Youngblood
2005-Dec-09 01:34 UTC
[Ferret-talk] what exactly does close_dir option do?
I''m trying to figure out if I should be setting close_dir to true or false when I access my index. It seems like this has something to do with the state that the index is left in after one process is finished using it, but it''s not clear exactly what this does. Can anybody explain further? Thanks, Carl
On 12/9/05, Carl Youngblood <carl at youngbloods.org> wrote:> I''m trying to figure out if I should be setting close_dir to true or > false when I access my index. It seems like this has something to do > with the state that the index is left in after one process is finished > using it, but it''s not clear exactly what this does. Can anybody > explain further?Hi Carl, When you create an Index you can pass a path or you can pass an actual Directory object like this; dir = Store::FSDirectory.new("/path/to/index") index = Index::Index.new(:dir => dir, :close_dir =>true) Setting close_dir to true will automatically close the Directory object when you close the Index. If you are not creating the Directory object yourself there is no need to worry about the :close_dir option. Hope that helps, Dave