Displaying 1 result from an estimated 1 matches for "in_mem_index".
2006 Jul 05
1
search speed eclipsed by retrieval speed
...'s useful:
I have created an index that is stored on disk. I''d like to read it back 
into memory and use a RAMDirectory to see what speed improvements I can 
get by using that.
Here''s what I''m doing to create the index:
  ram_dir = Ferret::Store::RAMDirectory.new
  in_mem_index = Ferret::Index::IndexWriter.new(ram_dir, :create => 
true)
  # ... add stuff to the index
  in_mem_index.optimize
  in_mem_index.close
  index = Ferret::Index::Index.new(:dir => ram_dir)
  index.persist(''path/to/index'', true)
  index.close
I use a RAMDirectory when init...