Displaying 20 results from an estimated 90 matches for "writabledatabase".
2014 Feb 13
2
回复: A beginner in "Posting list encoding improvements"
...ox:/home/hurricanetong/xapian-1.2.17/xapian-core-1.2.17# sudo make install
[...]
then
root at hurricanetong-VirtualBox:/home/hurricanetong/workspace# g++ `xapian-config --cxxflags --libs` demo2.cpp
/tmp/ccRXtBxB.o: In function `main':
demo2.cpp:(.text+0x4a): undefined reference to `Xapian::WritableDatabase::WritableDatabase(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
demo2.cpp:(.text+0x73): undefined reference to `Xapian::WritableDatabase::~WritableDatabase()'
demo2.cpp:(.text+0x98): undefined reference to `Xapian::WritableDatabas...
2014 Feb 13
2
A beginner in "Posting list encoding improvements"
I uninstall xapian1.3 and install xapian-1.2.17
but i still failed
hurricanetong at hurricanetong-VirtualBox:~/workspace$ g++ `xapian-config --cxxflags --libs` demo2.cc
/tmp/cc2wsfDJ.o: In function `main':
demo2.cc:(.text+0x4a): undefined reference to `Xapian::WritableDatabase::WritableDatabase(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
demo2.cc:(.text+0x73): undefined reference to `Xapian::WritableDatabase::~WritableDatabase()'
demo2.cc:(.text+0x98): undefined reference to `Xapian::WritableDatabase:...
2014 Jun 19
2
About memory index/search in multithread program
hi,
Why xapian don't support memory index/search ?
I know there is a method can create memory datebase, like this:
Xapian::WritableDatabase db(Xapian::InMemory::open());
*But, if i use these in multithread program, i need create many
datebases!!*
Xapian::WritableDatabase db1(Xapian::InMemory::open()); //used in thread1
Xapian::WritableDatabase db2(Xapian::InMemory::open()); //used in thread2
because WritableDatabase object isn'...
2007 Aug 09
2
Closing a DB
Hi,
As part of my whole indexing thing, I want to move the databases
around, from within the code. So, I figured that the safest bet
would be to close the DB before attempting to move it.
But there's no Xapian::Database::close() or even
Xapian::WritableDatabase::close().
I have a global variable that holds the database, and I open it
in the main():
// globals
Xapian::WritableDatabase g_Xap;
int main( int argc, char ** argv )
{
g_Xap = Xapian::WritableDatabase( ... );
}
So, I was thinking, in order to close it successfully, i
could do this:
g_Xap...
2016 Feb 22
3
Database left unlocked by Tcl bindings
...ying to set up Tcl bindings for Notmuch
> > (https://notmuchmail.org/), which uses Xapian, that flintlock was not
> > being locked (I had lost updates).
>
> It seems to work for me, testing with this:
>
> package require Tcl 8
> package require xapian 1.0.0
> xapian::WritableDatabase db "tmp.db" $xapian::DB_CREATE_OR_OPEN
> xapian::WritableDatabase db2 "tmp.db" $xapian::DB_CREATE_OR_OPEN
eric at bruno [ ~ ]$ cat /proc/version
Linux version 3.13.300 (root at bruno) (gcc version 4.8.2 (GCC) ) #2 SMP
Tue Sep 16 21:01:43 BST 2014
eric at bruno [ ~ ]$ tclsh...
2016 Feb 06
2
Xapian::WritableDatabase: commit changes depending on the buffer size
...lt, the RAM usage increases drastically. Finally, i just run out of memory.
I think that the solution is to call commit() depending on the buffer actual size (in megabytes), but not based on the number of the indexed documents. So, is there any way to estimate the size of the buffer of the Xapian::WritableDatabase object?
P.S. may be somebody have other suggestions how to solve the problem?
2015 Oct 28
2
Trying to get Search::Xapian perl module to compile on win32
...NC=-IC:\Install\include " LIBS=-lxapian-22 -lzlib" XAPIAN_VERSION=1.2.21 "CXXFLAGS=-EHsc -TP"
Now when I run nmake, it gets past the compile portion and dies when linking with errors like:
Xapian.obj : error LNK2001: unresolved external symbol "public: __thiscall Xapian::WritableDatabase:
:WritableDatabase(class Xapian::WritableDatabase const &)" (??0WritableDatabase at Xapian@@QAE at ABV01@@Z)
Any clues on how to resolve the linking errors?
--
Dez.
-----Original Message-----
From: Olly Betts [mailto:olly at survex.com]
Sent: Wednesday, October 24, 2012 12:07 PM
To: De...
2016 Feb 21
5
Database left unlocked by Tcl bindings
I discovered, while trying to set up Tcl bindings for Notmuch
(https://notmuchmail.org/), which uses Xapian, that flintlock was not
being locked (I had lost updates).
I then found that opening a Xapian database for writing directly via
the Xapian Tcl bindings also silently fails to lock flintlock.
I have taken a copy of flint_lock.cc to play with, and I find that it
locks the file when called
2004 May 11
2
"Error reading block xxx: got end of file"
Xapian (0.7.5) is spitting out this error on a regular basis:
org.xapian.errors.DatabaseError: Error reading block 136618: got end of=20=
file
=A0=A0=A0=A0=A0=A0=A0 at=20
org.xapian.XapianJNI.writabledatabase_repalce_document(Native Method)
=A0=A0=A0=A0=A0=A0=A0 at=20
org.xapian.WritableDatabase.replaceDocument(WritableDatabase.java:67)
I don't have a gdb backtrace, only the Java stacktrace. :(
What would cause this "got end of file" error? The system on which=20
this is running is c...
2012 Jul 26
2
ruby bindings, ruby 1.9.3 and xapian
Hello,
I've problem with xapian or sth.
Ubuntu 8.04, ruby 1.9.3 with rvm, when Im trying to initialize
database, Im getting this error:
irb > require 'xapian'
==> true
irb > database = Xapian::WritableDatabase.new('/full_path/db/xapian_db/development', Xapian::DB_CREATE_OR_OPEN)
ArgumentError: Wrong arguments for overloaded method 'WritableDatabase.new'.
Possible C/C++ prototypes are:
WritableDatabase.new()
WritableDatabase.new(std::string const &path, int action)
Writable...
2005 Apr 08
3
Database Locking
Locking of Quartz databases is currently done with a lockfile. This
works well from the actual locking side, but the downside is that
the lock isn't released if a process doesn't destroy the
Xapian::WritableDatabase object. This is made worse because some
of the bindings don't call destructors (or don't do it reliably).
The obvious alternative is to use actual locking APIs. On Unix, this
mean fcntl. Windows has a suitable API too.
But the problem is that on Unix, fcntl locks are per process. So i...
2014 Feb 12
2
A beginner in "Posting list encoding improvements"
On 12 Feb 2014, at 14:58, "Hurricane Tong" <zhangshangtong.cpp at qq.com> wrote:
> hurricanetong at hurricanetong-VirtualBox:~/workspace$ g++ `xapian-config --cxxflags --libs` BuildIndexDemo.cpp
You want to use xapian-config-1.3 here, not xapian-config (which will be the installed version, not the trunk version you built).
I've just built trunk (on Mac OS, admittedly),
2005 Jul 15
2
Problem with Perl bindings (enquire)
...oks like one can open a Xapian database in read-only mode and do the
following:
$db = Search::Xapian::Database->new("/foo/bar/");
$enq = $db->enquire("XIDblub");
the same doesn't seem to be possible with a database opened in read-write
mode:
$db = Search::Xapian::WritableDatabase->new("/foo/bar/",
Search::Xapian::DB_CREATE_OR_OPEN);
$enq = $db->enquire("XIDblub");
I first thought that this would be caused by a missing wrapper in
Search::Xapian::WritableDatabase but when i duplicate the code from
Search...
2008 Nov 19
1
ruby xapian bindings and windows
Hi,
I've compiled xapian 1.0.9 (core and buildings) on Windows Xp, using
Lemur's nmake files[1].
I'm trying to use acts_as_xapian [2] on RubyOnRails, but I'm facing a
problem with the rebuild index process.
in acts_as_xapian, to rebuild the index, a new
Xapian::WritableDatabase is created with a different path, then
flush() is invoked; lastly, the new path is renamed to the old one.
At this point, the operation fails on Windows, since the flush()
method doesn't close the involved files, and on Windows renaming or
deleting open files is forbidden.
I tried to take a l...
2014 Feb 12
2
A beginner in "Posting list encoding improvements"
On 12 Feb 2014, at 08:55, Olly Betts <olly at survex.com> wrote:
> For GSoC projects, I'd recommend developing on Linux, or another
> Unix-like platform. I think everyone who has so far expressed an
> interest in mentoring uses Linux or Mac OS X, so we're much better
> placed to help with development on such platforms.
If you're on Windows, the way of doing this
2015 Jun 10
1
make check xapian-bindings-1.2.21 & Search-Xapian-1.2.21.0
...1, Tests=22, 1 wallclock secs ( 0.14 usr 0.02 sys + 0.22 cusr 0.01 csys = 0.39 CPU)
Result: PASS
PASS: t/tied.t
./t/valuerange.t .. ok
All tests successful.
Files=1, Tests=22, 1 wallclock secs ( 0.14 usr 0.01 sys + 0.26 cusr 0.02 csys = 0.43 CPU)
Result: PASS
PASS: t/valuerange.t
./t/writabledatabase.t .. 4/35
# Failed test 'check term exists'
# at ./t/writabledatabase.t line 72.
# Failed test 'check term exists'
# at ./t/writabledatabase.t line 86.
# Failed test 'check term exists'
# at ./t/writabledatabase.t line 93.
./t/writabledatabase.t .. 21/35
#...
2016 Feb 24
4
Database left unlocked by Tcl bindings
...s://notmuchmail.org/), which uses Xapian, that flintlock was not
>>>> being locked (I had lost updates).
>>>
>>> It seems to work for me, testing with this:
>>>
>>> package require Tcl 8
>>> package require xapian 1.0.0
>>> xapian::WritableDatabase db "tmp.db" $xapian::DB_CREATE_OR_OPEN
>>> xapian::WritableDatabase db2 "tmp.db" $xapian::DB_CREATE_OR_OPEN
>>
>>
>> eric at bruno [ ~ ]$ cat /proc/version
>> Linux version 3.13.300 (root at bruno) (gcc version 4.8.2 (GCC) ) #2 SMP
>> Tue...
2014 Jan 27
4
Perl Search::Xapian
...uld be great, Thanks.
----------------snip---------------
#!/usr/bin/perl
use strict;
use warnings;
unless ($#ARGV eq 1) { die "Usage: <cvsfile> <dbpath>\n" };
use Search::Xapian;
use Tie::Handle::CSV;
my $csvfile = $ARGV[0];
my $dbpath = $ARGV[1];
my $db = Search::Xapian::WritableDatabase->new(
path => $dbpath,
mode => "DB_CREATE_OR_OPEN",
);
# setup TermGenerator that'll be used in indexing.
my $tg = Search::Xapian::TermGenerator->new();
$tg->set_stemmer(Search::Xapian::Stem->new('en'));
# here is a for to loop thru all...
2014 Feb 12
2
A beginner in "Posting list encoding improvements"
On Wed, Feb 12, 2014 at 10:32:03PM +0800, Hurricane Tong wrote:
> I seem to run into some trouble.
> I succeeded in building the source code of Xapian in ubuntu,
> but when I write a demo c++ application
>
> [snip]
> I can't get it built.
>
>
> hurricanetong at hurricanetong-VirtualBox:~/workspace$ g++ -L/usr/local/lib -lxapian-1.3 BuildIndexDemo.cpp
Hmmm,
2007 Dec 17
1
Crashes with spelling enabled and perl.
Hi Guys,
Here's a simple test case that causes a segfault with the perl
bindings patched to enable spelling correction:
use strict;
use warnings;
use Search::Xapian;
my $db = Search::Xapian::WritableDatabase->new("test.db",
Search::Xapian::DB_CREATE_OR_OPEN);
if (!defined($db)) {
die("Failed to open xapian_database: $!");
}
my $indexer = Search::Xapian::TermGenerator->new();
$indexer->set_flags(Search::Xapian::FLAG_SPELLING);
my $document = Search::Xapian::Documen...