Displaying 2 results from an estimated 2 matches for "open_writ".
Did you mean:
open_writer
2010 Aug 20
1
Support for backends in Search::Xapian
The attached adds XS wrappers for back-ends:
use Search::Xapian;
my $db = Search::Xapian::Remote::open_writable( "biggles", 10252 );
my $db = Search::Xapian::Flint::open_writable( "testdb" );
my $db = Search::Xapian::InMemory::open_writable();
All the best,
Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xapian_backend_patch.diff
Type: text...
2007 Mar 01
2
FerretHash
...;'tempfile''
class FerretHash
def initialize(name=nil)
#make temp file name
unless path
tf=Tempfile.new("ferrethash_#$$")
name=tf.path
tf.close
File.unlink name
end
#open new ferret index with temp name
@name=name
open_writer
end
def open_writer
@writer and return
#a schema for the hash...
fis=Ferret::Index::FieldInfos.new
fis.add_field(:key, :index=>:untokenized, :store=>:no,
:term_vector=>:no)
fis.add_field(:value, :index=>:no, :store=>:yes, :term_vector=>:no)...